Skip to content

Commit

Permalink
forced mp4 files in file selection
Browse files Browse the repository at this point in the history
  • Loading branch information
fuomag9 committed Mar 4, 2019
1 parent 24f724d commit 2f7e5cf
Showing 1 changed file with 13 additions and 11 deletions.
24 changes: 13 additions & 11 deletions Video2x/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
using Microsoft.WindowsAPICodePack.Shell;
using Microsoft.WindowsAPICodePack.Shell.PropertySystem;
using System.Diagnostics;
using Microsoft.Win32;

namespace Video2x
{
Expand All @@ -35,23 +36,24 @@ public MainWindow()

private void Button_Click(object sender, RoutedEventArgs e)
{
try
{
var dialog = new CommonOpenFileDialog();
CommonFileDialogResult result = dialog.ShowDialog();
textbox_folder.Text = dialog.FileName;
}
catch (System.InvalidOperationException)


var dialog = new OpenFileDialog
{
//MessageBox.Show("Non è stato selezionato nessun video");
//System.Diagnostics.Debug.WriteLine(textbox_folder.Text);
}
Filter = "mp4|*.mp4"
};
dialog.ShowDialog();
textbox_folder.Text = dialog.FileName;



}

private void Save_button_Click(object sender, RoutedEventArgs e)
{
Microsoft.Win32.SaveFileDialog saveFileDialog = new Microsoft.Win32.SaveFileDialog();
Microsoft.Win32.SaveFileDialog saveFileDialog = new Microsoft.Win32.SaveFileDialog {
Filter = "mp4|*.mp4"
};
saveFileDialog.ShowDialog();


Expand Down

0 comments on commit 2f7e5cf

Please sign in to comment.