private void ChooseDirectoryButtonClickEventHandler(Object sender, RoutedEventArgs e) { var dialog = new WinForms.FolderBrowserDialog(); if (dialog.ShowDialog() != WinForms.DialogResult.OK) { return; } IndexObjectTextBox.Text = dialog.SelectedPath; IndexObjectTextBox.Focus(); }
private void ChooseFileButtonClickEvenHandler(Object sender, RoutedEventArgs e) { var dialog = new OpenFileDialog { InitialDirectory = Path.GetFullPath(@"../../../Books") }; if (!dialog.ShowDialog(this).Value) { return; } IndexObjectTextBox.Text = dialog.FileName; IndexObjectTextBox.Focus(); }