using CommunityToolkit.Mvvm.Input; using DataVM.DataTypes.Status; using System.Windows.Media; using UICommon.DataType; using UICommon.Helper; namespace SummaryModule.Dialogs.ViewModels; internal partial class SelectStrockerViewModel : ObservableObject, IDialogAware { public DialogCloseListener RequestClose { get; } [ObservableProperty] private string? _Title = "Select Stocker"; [ObservableProperty] private ImageSource? _ImageSource; [ObservableProperty] private ObservableDictionary? _Wafer; public bool CanCloseDialog() { return true; } public void OnDialogClosed() { } public void OnDialogOpened(IDialogParameters parameters) { this.Wafer = []; for (int i = 25; i > 0; i--) { Wafer wafer = new() { Slot = i, WaferInfo = $"Stocker1.{i}", WaferType = "P1" }; Wafer.Add(i, wafer); } } [RelayCommand] private void Close() { this.RequestClose.Invoke(); } }