/// <summary> /// Handles the context menu click action. /// </summary> /// <param name="action">Which action should be performed.</param> private void HandleClick(CMenuAction action) { if (SongList.SelectedIndex == -1) { return; } var song = (Song)SongList.Items[SongList.SelectedIndex]; SongActions.HandleClick(action, song); #if DEBUG Console.WriteLine($"[HistoryWindow]: Action Performed - {action}"); #endif }
private void SearchOnGoogleButton_OnClick(object sender, RoutedEventArgs e) { SongActions.HandleClick(CMenuAction.SearchOnGoogle, _displayedSong); }
private void SearchOnThWiki_OnClick(object sender, RoutedEventArgs e) { SongActions.HandleClick(CMenuAction.SearchOnTw, _displayedSong); }
private void CopyJsonButton_OnClick(object sender, RoutedEventArgs e) { SongActions.HandleClick(CMenuAction.CopyJsonToClipboard, _displayedSong); }