|
|
|
@ -10,6 +10,8 @@ namespace ControlCatalog.ViewModels |
|
|
|
{ |
|
|
|
private IManagedNotificationManager _notificationManager; |
|
|
|
|
|
|
|
private bool _isMenuItemChecked = true; |
|
|
|
|
|
|
|
public MainWindowViewModel(IManagedNotificationManager notificationManager) |
|
|
|
{ |
|
|
|
_notificationManager = notificationManager; |
|
|
|
@ -42,6 +44,11 @@ namespace ControlCatalog.ViewModels |
|
|
|
{ |
|
|
|
(App.Current.ApplicationLifetime as IClassicDesktopStyleApplicationLifetime).Shutdown(); |
|
|
|
}); |
|
|
|
|
|
|
|
ToggleMenuItemCheckedCommand = ReactiveCommand.Create(() => |
|
|
|
{ |
|
|
|
IsMenuItemChecked = !IsMenuItemChecked; |
|
|
|
}); |
|
|
|
} |
|
|
|
|
|
|
|
public IManagedNotificationManager NotificationManager |
|
|
|
@ -50,6 +57,12 @@ namespace ControlCatalog.ViewModels |
|
|
|
set { this.RaiseAndSetIfChanged(ref _notificationManager, value); } |
|
|
|
} |
|
|
|
|
|
|
|
public bool IsMenuItemChecked |
|
|
|
{ |
|
|
|
get { return _isMenuItemChecked; } |
|
|
|
set { this.RaiseAndSetIfChanged(ref _isMenuItemChecked, value); } |
|
|
|
} |
|
|
|
|
|
|
|
public ReactiveCommand<Unit, Unit> ShowCustomManagedNotificationCommand { get; } |
|
|
|
|
|
|
|
public ReactiveCommand<Unit, Unit> ShowManagedNotificationCommand { get; } |
|
|
|
@ -59,5 +72,7 @@ namespace ControlCatalog.ViewModels |
|
|
|
public ReactiveCommand<Unit, Unit> AboutCommand { get; } |
|
|
|
|
|
|
|
public ReactiveCommand<Unit, Unit> ExitCommand { get; } |
|
|
|
|
|
|
|
public ReactiveCommand<Unit, Unit> ToggleMenuItemCheckedCommand { get; } |
|
|
|
} |
|
|
|
} |
|
|
|
|