public static ICommand GetCommandForInput(MenuInputs input, object sender) { switch (input) { case MenuInputs.Settings: { return(ShowSettingsWindowEvent.GetShowSettingsWindowCommand(sender)); } case MenuInputs.Spotify: { return(ShowSpotifyWindowEvent.GetShowSpotifyWindowCommand(sender)); } case MenuInputs.Exit: { return(CloseRequestedEvent.GetCloseRequestedCommand(sender)); } default: { throw new InvalidOperationException($"Can't get Command for Input {input} from Sender {sender}"); } } }
private void OnShowSettingsWindowEvent() { ShowSettingsWindowEvent?.Invoke(this, EventArgs.Empty); }
private void ShowSettingsWindow() { ShowSettingsWindowEvent.RaiseShowSettingsWindowEvent(this); }