HarewareInitViewModel.cs 634 B

1234567891011121314151617181920212223242526272829303132333435
  1. 
  2. using CommunityToolkit.Mvvm.Input;
  3. namespace SummaryModule.Dialogs.ViewModels;
  4. internal partial class HarewareInitViewModel : ObservableObject, IDialogAware
  5. {
  6. public DialogCloseListener RequestClose { get; }
  7. [ObservableProperty]
  8. private string? _Title = "Initialize";
  9. [ObservableProperty]
  10. private ImageSource? _ImageSource;
  11. public bool CanCloseDialog()
  12. {
  13. return true;
  14. }
  15. public void OnDialogClosed()
  16. {
  17. }
  18. public void OnDialogOpened(IDialogParameters parameters)
  19. {
  20. }
  21. [RelayCommand]
  22. private void Close()
  23. {
  24. this.RequestClose.Invoke();
  25. }
  26. }