| 1234567891011121314151617181920212223242526272829303132333435 |
- using CommunityToolkit.Mvvm.Input;
- namespace SummaryModule.Dialogs.ViewModels;
- internal partial class FimsOperateViewModel : ObservableObject, IDialogAware
- {
- public DialogCloseListener RequestClose { get; }
- [ObservableProperty]
- private string? _Title;
- [ObservableProperty]
- private ImageSource? _ImageSource;
- public bool CanCloseDialog()
- {
- return true;
- }
- public void OnDialogClosed()
- {
- }
- public void OnDialogOpened(IDialogParameters parameters)
- {
- if (parameters.TryGetValue<string>("Hardware", out string? name))
- this.Title = $"{name} Operate";
- }
- [RelayCommand]
- private void Close()
- {
- this.RequestClose.Invoke();
- }
- }
|