choose destination directory for files conversion.

This commit is contained in:
morkt
2016-04-19 12:33:36 +04:00
parent e098a498ee
commit 5641c8b6ba
8 changed files with 93 additions and 7 deletions

View File

@@ -1,4 +1,7 @@
using System.Windows;
using System.Windows.Input;
using GARbro.GUI.Strings;
using Microsoft.WindowsAPICodePack.Dialogs;
namespace GARbro.GUI
{
@@ -12,6 +15,32 @@ namespace GARbro.GUI
InitializeComponent ();
}
private void BrowseExec (object sender, ExecutedRoutedEventArgs e)
{
var dlg = new CommonOpenFileDialog
{
Title = guiStrings.TextChooseDestDir,
IsFolderPicker = true,
InitialDirectory = DestinationDir.Text,
AddToMostRecentlyUsedList = false,
AllowNonFileSystemItems = false,
EnsureFileExists = true,
EnsurePathExists = true,
EnsureReadOnly = false,
EnsureValidNames = true,
Multiselect = false,
ShowPlacesList = true,
};
if (dlg.ShowDialog (this) == CommonFileDialogResult.Ok)
DestinationDir.Text = dlg.FileName;
}
public void CanExecuteAlways (object sender, CanExecuteRoutedEventArgs e)
{
e.CanExecute = true;
}
private void ConvertButton_Click (object sender, RoutedEventArgs e)
{
this.DialogResult = true;