GasViewModel.cs 632 B

1234567891011121314151617181920212223242526272829
  1. using CommunityToolkit.Mvvm.Input;
  2. namespace SummaryModule.ViewModels;
  3. internal partial class GasViewModel(IRegionManager regionManager) : ObservableObject,IActiveAware
  4. {
  5. event EventHandler IActiveAware.IsActiveChanged { add { } remove { } }
  6. private bool _isActive;
  7. public bool IsActive
  8. {
  9. get => _isActive;
  10. set
  11. {
  12. _isActive = value;
  13. if (value)
  14. regionManager.RequestNavigate("GasRegion", "MFCTable");
  15. }
  16. }
  17. [RelayCommand]
  18. private void Switch(string para)
  19. {
  20. regionManager.RequestNavigate("GasRegion", para);
  21. }
  22. }