// Constructor
 public ToolbarComponent()
 {
     _viewModel = new AppToolbar
     {
         ChooseWindowCommand    = new Binding.RelayCommand(p => SwitchView?.Invoke(ViewType.WindowList)),
         FindProgramCommand     = new Binding.RelayCommand(p => SwitchView?.Invoke(ViewType.FindProgram)),
         ToggleLockCommand      = new Binding.RelayCommand(p => SwitchView?.Invoke(ViewType.LockWindow)),
         RefreshListCommand     = new Binding.RelayCommand(p => RefreshWindowList?.Invoke()),
         MenuSettingsCommand    = new Binding.RelayCommand(p => ShowSettingsWindow?.Invoke()),
         MenuAboutCommand       = new Binding.RelayCommand(p => ShowAboutWindow?.Invoke()),
         MenuQuitCommand        = new Binding.RelayCommand(p => QuitProgram?.Invoke()),
         ShowContextMenuCommand = new Binding.RelayCommand(ShowContextMenu)
     };
 }
Exemple #2
0
 public static void RaiseShowSettingsWindowEvent(object sender)
 {
     ShowSettingsWindow?.Invoke(sender, null);
 }