コード例 #1
0
        /// <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
        }
コード例 #2
0
 private void SearchOnGoogleButton_OnClick(object sender, RoutedEventArgs e)
 {
     SongActions.HandleClick(CMenuAction.SearchOnGoogle, _displayedSong);
 }
コード例 #3
0
 private void SearchOnThWiki_OnClick(object sender, RoutedEventArgs e)
 {
     SongActions.HandleClick(CMenuAction.SearchOnTw, _displayedSong);
 }
コード例 #4
0
 private void CopyJsonButton_OnClick(object sender, RoutedEventArgs e)
 {
     SongActions.HandleClick(CMenuAction.CopyJsonToClipboard, _displayedSong);
 }