Пример #1
0
        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();
        }
Пример #2
0
        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();
        }