public CaptureViewModel(MainViewModel vm)
 {
     _isMonitoringProperty = new PropertyFollower <MainViewModel, CaptureViewModel>(vm, this, nameof(IsMonitoring));
     _isMonitoringProperty.Add(nameof(IsMonitoring), _ => RaisePropertyChanged(nameof(IsNotMonitoring)));
     _mainViewModel = vm;
     _eventTypes    = EventInfo.AllEvents.Select(info => new EventTypeViewModel(info)).ToArray();
 }
        public MenuBarViewModel()
        {
            MainViewModel = App.MainViewModel;
            _follower = PropertyFollowerFactory.Create(MainViewModel, this, nameof(ViewModels.MainViewModel.IsReadOnlyMode));

            ChangeAccentCommand = new DelegateCommand<AccentViewModel>(accent => {
                ThemeManager.ChangeAppStyle(Application.Current, accent.Accent, ThemeManager.DetectAppStyle().Item1);
            });
        }
Beispiel #3
0
        public MenuBarViewModel(MainViewModel vm)
        {
            MainViewModel = vm;
            _follower     = PropertyFollower <MainViewModel, MenuBarViewModel> .Create(MainViewModel, this, nameof(ViewModels.MainViewModel.IsReadOnlyMode));

            ChangeAccentCommand = new DelegateCommand <AccentViewModel>(accent => {
                ThemeManager.ChangeAppStyle(Application.Current, accent.Accent, ThemeManager.DetectAppStyle().Item1);
            });
        }
        public DataGridViewModel()
        {
            MainViewModel = App.MainViewModel;

            _follower = new PropertyFollower<MainViewModel, DataGridViewModel>(MainViewModel, this, nameof(IsReadOnlyMode));
            _follower.Add(nameof(MainViewModel.SelectedItem), _ => {
                FilterText = string.Empty;
                OnPropertyChanged(nameof(Values));
            });

            ClearFilterCommand = new DelegateCommand(() => FilterText = string.Empty);
        }
        public DataGridViewModel()
        {
            MainViewModel = App.MainViewModel;

            _follower = new PropertyFollower <MainViewModel, DataGridViewModel>(MainViewModel, this, nameof(IsReadOnlyMode));
            _follower.Add(nameof(MainViewModel.SelectedItem), _ => {
                FilterText = string.Empty;
                RaisePropertyChanged(nameof(Values));
            });

            ClearFilterCommand = new DelegateCommand(() => FilterText = string.Empty);
        }