public GeneralConfigViewModel() { CancelCommand = new DelegateCommand(() => MainConfigService.CloseConfigWindow()); ApplyCommand = new DelegateCommand(() => MainConfigService.InvokeApplySettings()); OkCommand = new DelegateCommand(() => { MainConfigService.InvokeApplySettings(); MainConfigService.CloseConfigWindow(); }); }
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()); }