Ejemplo n.º 1
0
 public GeneralConfigViewModel()
 {
     CancelCommand = new DelegateCommand(() => MainConfigService.CloseConfigWindow());
     ApplyCommand  = new DelegateCommand(() => MainConfigService.InvokeApplySettings());
     OkCommand     = new DelegateCommand(() => {
         MainConfigService.InvokeApplySettings();
         MainConfigService.CloseConfigWindow();
     });
 }
Ejemplo n.º 2
0
 public TrayIconViewModel()
 {
     ShowWindows = new DelegateCommand(() => {
         foreach (Window window in Application.Current.Windows)
         {
             window.Activate();
         }
     });
     OpenMainSettings = new DelegateCommand(() => MainConfigService.ShowConfigWindow());
     //TODO make sure everything saves themselves before exiting
     ExitProgram = new DelegateCommand(() => Application.Current.Shutdown());
 }