コード例 #1
0
        void AddButton_Click(object Sender, RoutedEventArgs E)
        {
            FileInfo NewFile = WindowsExtensions.GetOpenFile(Filter: MediaFilter);

            if (NewFile != null)
            {
                MediaList.Items.Add(new MediaProcessor(NewFile));
                //Dispatcher.Invoke(() => MediaList.Items.Add(NewFile), DispatcherPriority.Normal);
            }
        }
コード例 #2
0
        void ClearButton_Click(object Sender, RoutedEventArgs E)
        {
            switch (WindowsExtensions.ShowMessage(Title + " ・ Clear All?", "Are you sure you want to clear the list?", MessageBoxButton.YesNoCancel, MessageBoxImage.Question))
            {
            case MessageBoxResult.Yes:
            case MessageBoxResult.OK:
                CommandOutputView.Text = "";
                MediaList.Items.Clear();
                break;

            // ReSharper disable once RedundantEmptySwitchSection
            default:
                break;
            }
        }