private void browseButton_Click(object sender, RoutedEventArgs e) { var dialog = new Ookii.Dialogs.Wpf.VistaFolderBrowserDialog() { SelectedPath = this.installPath }; dialog.ShowDialog(); SetInstallPath(dialog.SelectedPath); }
private void picklocationbutton_Click(object sender, RoutedEventArgs e) { var startloc = new Ookii.Dialogs.Wpf.VistaFolderBrowserDialog(); if (startloc.ShowDialog(this).GetValueOrDefault()) { locationtext.Text = startloc.SelectedPath; } }
private async void ExtractAllTracksWav() { var _browser = new Ookii.Dialogs.Wpf.VistaFolderBrowserDialog(); if (_browser.ShowDialog() == true && Directory.Exists(_browser.SelectedPath)) { ExtractAllTracks(_browser.SelectedPath, true); } }
/// <summary> /// Medota pro vyvolání nabídky pro výběr složky /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void Button_Click_1(object sender, RoutedEventArgs e) { var dialog = new Ookii.Dialogs.Wpf.VistaFolderBrowserDialog(); if (dialog.ShowDialog(this).GetValueOrDefault()) { dest_url.Text = dialog.SelectedPath; } }
private void BtnBrowse_OnClick(object sender, RoutedEventArgs e) { var dialog = new Ookii.Dialogs.Wpf.VistaFolderBrowserDialog(); if (dialog.ShowDialog(this) ?? false) { txtDirectoryPath.Text = dialog.SelectedPath; } }
// Morrowind directory private void morrowindLocationButton_Click(object sender, RoutedEventArgs e) { var dialog = new Ookii.Dialogs.Wpf.VistaFolderBrowserDialog(); if (dialog.ShowDialog(this).GetValueOrDefault()) { morrowindLocationTextbox.Text = dialog.SelectedPath; } }
//PM> Install-Package Ookii.Dialogs private void btnSelectFolder_Click(object sender, RoutedEventArgs e) { var dialog = new Ookii.Dialogs.Wpf.VistaFolderBrowserDialog(); if (dialog.ShowDialog(this).GetValueOrDefault()) { txtSave.Text = dialog.SelectedPath; } }
private void BTNguardarEn_Click(object sender, RoutedEventArgs e) { var dialog = new Ookii.Dialogs.Wpf.VistaFolderBrowserDialog(); if (dialog.ShowDialog(this).GetValueOrDefault()) { DireccionLog.Text = dialog.SelectedPath; } }
public Path() { InitializeComponent(); var dialog = new Ookii.Dialogs.Wpf.VistaFolderBrowserDialog(); if (dialog.ShowDialog(this).GetValueOrDefault()) { FolderPath.Text = dialog.SelectedPath; } }
private void DoBrowseForOutputFolder() { var dlg = new Ookii.Dialogs.Wpf.VistaFolderBrowserDialog(); var result = dlg.ShowDialog(); if (result == true) { this.OutputFolder = dlg.SelectedPath; } }
private void browseButton_Click(object sender, RoutedEventArgs e) { var dialog = new Ookii.Dialogs.Wpf.VistaFolderBrowserDialog() { SelectedPath = this.installPath }; dialog.ShowDialog(); SetInstallPath(dialog.SelectedPath); }
private void OpenCommandHandler(object sender, ExecutedRoutedEventArgs e) { var dialog = new Ookii.Dialogs.Wpf.VistaFolderBrowserDialog(); if (dialog.ShowDialog(this).GetValueOrDefault()) { DirPath = dialog.SelectedPath; isDirPathChosen = true; } }
private void SelRaiz_Click(object sender, RoutedEventArgs e) { var dialog = new Ookii.Dialogs.Wpf.VistaFolderBrowserDialog(); dialog.RootFolder = Environment.SpecialFolder.Desktop; if (dialog.ShowDialog(this).GetValueOrDefault()) { TxtRaizSel.Text = dialog.SelectedPath; } }
public void Folder_Button_Click(object sender, RoutedEventArgs e) { var dialog = new Ookii.Dialogs.Wpf.VistaFolderBrowserDialog(); if (dialog.ShowDialog(this).GetValueOrDefault()) { FolderPath = dialog.SelectedPath; ButtonFolderText.Content = FolderPath; } }
private void SelectFolderButton_Click(object sender, RoutedEventArgs e) { var dialog = new Ookii.Dialogs.Wpf.VistaFolderBrowserDialog(); if (dialog.ShowDialog(this).GetValueOrDefault()) { outputFolder = dialog.SelectedPath; outFolderPathText.Content = outputFolder; } }
private void PickBackupFolder() { var dialog = new Ookii.Dialogs.Wpf.VistaFolderBrowserDialog(); dialog.ShowNewFolderButton = true; if (dialog.ShowDialog(Application.Current.MainWindow).GetValueOrDefault()) { BackupLocation = dialog.SelectedPath; } }
private void BtnPath_Click(object sender, RoutedEventArgs e) { var folderDialog = new Ookii.Dialogs.Wpf.VistaFolderBrowserDialog(); var folderResult = folderDialog.ShowDialog(); if (folderResult.HasValue && folderResult.Value) { Path.Text = folderDialog.SelectedPath; } }
private void buttonBrowse_Click(object sender, RoutedEventArgs e) { Ookii.Dialogs.Wpf.VistaFolderBrowserDialog openDialog = new Ookii.Dialogs.Wpf.VistaFolderBrowserDialog(); openDialog.SelectedPath = txtTsLocation.Text; if (openDialog.ShowDialog() == true) { txtTsLocation.Text = openDialog.SelectedPath; } }
private void DoBrowseForFeature() { var dlg = new Ookii.Dialogs.Wpf.VistaFolderBrowserDialog(); var result = dlg.ShowDialog(); if (result == true) { FeatureFolder = dlg.SelectedPath; } }
private void BtnFolderScan_Click(object sender, RoutedEventArgs e) { var dialog = new Ookii.Dialogs.Wpf.VistaFolderBrowserDialog(); if (dialog.ShowDialog(this).GetValueOrDefault()) { _pdfLookupDirectory = dialog.SelectedPath; LblScanFolder.Content = _pdfLookupDirectory; } }
private void btnPasta_Click(object sender, RoutedEventArgs e) { var dialog = new Ookii.Dialogs.Wpf.VistaFolderBrowserDialog(); //dialog.SelectedPath = tbxPasta.Text; //if ((bool)dialog.ShowDialog()) //{ // tbxPasta.Text = dialog.SelectedPath; //} }
private void aviutl_ref_Click(object sender, RoutedEventArgs e) { var ofd = new Ookii.Dialogs.Wpf.VistaFolderBrowserDialog(); if (ofd.ShowDialog() != true) { return; } this.AviutlPath = ofd.SelectedPath; }
private void BrowseTestDirButton_Click(object sender, RoutedEventArgs e) { var openFolderDialog = new Ookii.Dialogs.Wpf.VistaFolderBrowserDialog(); if (openFolderDialog.ShowDialog() == false) { return; } CsvTestFilePathTextBox.Text = openFolderDialog.SelectedPath; }
private string CallDialog() { var dialog = new Ookii.Dialogs.Wpf.VistaFolderBrowserDialog(); if (dialog.ShowDialog() == true) { return(dialog.SelectedPath); } return(""); }
public void ChangeFolderButtonClick() { var dialog = new Ookii.Dialogs.Wpf.VistaFolderBrowserDialog(); if ((bool)dialog.ShowDialog()) { string path = dialog.SelectedPath; ApplicationPaths.SetAudioPath(path); FolderButtonToolTip = HelpersModel.ToolTipFolder; } }
private void LinkFolderBrowse_Click(object sender, RoutedEventArgs e) { var dialog = new Ookii.Dialogs.Wpf.VistaFolderBrowserDialog { SelectedPath = this.LinkFolderPath.Text }; if (dialog.ShowDialog() == true) { this.LinkFolderPath.Text = dialog.SelectedPath; } }
public SettingModelView() { val = Ico.getValue <db>().GetUnivdb().settings.ToList().FirstOrDefault(); TempalePath = val.locationTem; PathFileSave = val.locationFile; date = DateTime.Now; PathFileSavec = new Command(() => { var folderDialog = new Ookii.Dialogs.Wpf.VistaFolderBrowserDialog(); var folderResult = folderDialog.ShowDialog(); if (folderResult.HasValue && folderResult.Value) { PathFileSave = folderDialog.SelectedPath; } }); TempalePathc = new Command(() => { var folderDialog = new Ookii.Dialogs.Wpf.VistaFolderBrowserDialog(); var folderResult = folderDialog.ShowDialog(); if (folderResult.HasValue && folderResult.Value) { PathFileSave = folderDialog.SelectedPath; } }); savecommand = new Command(() => { erour = new List <string>(); string pattern = "[0-9]+"; Regex rgx = new Regex(pattern); if (Cost == 0 || !rgx.IsMatch(cost.ToString())) { erour.Add("الرجاء كتابة المبلغ "); } else { if (!((part.Cost - part.mcost) >= Cost)) { erour.Add("المبلغ أكبر من الرصيد المتاح"); } } if (subject.ToString().Length == 0) { erour.Add("الرجاء كتابة موضوع البطاقة "); } Ico.getValue <ContentApp>().OpenSample4Dialog(); if (erour.Count != 0) { } }); }
public void GetFolder() { var dialog = new Ookii.Dialogs.Wpf.VistaFolderBrowserDialog(); if (dialog.ShowDialog().GetValueOrDefault()) { MyFolder = dialog.SelectedPath.ToString(); } Directory.CreateDirectory(MyImageFolder); }
private void OutputFolderDialogClick(object sender, RoutedEventArgs e) { var dialog = new Ookii.Dialogs.Wpf.VistaFolderBrowserDialog(); dialog.ShowDialog(); if (!string.IsNullOrEmpty(dialog.SelectedPath)) { Settings.OutputFolder = dialog.SelectedPath; } }
public string OpenFolderDialog(string rootPath) { var dialog = new Ookii.Dialogs.Wpf.VistaFolderBrowserDialog(); if (!string.IsNullOrEmpty(rootPath)) { dialog.SelectedPath = rootPath; } return(dialog.ShowDialog().GetValueOrDefault() ? dialog.SelectedPath : null); }
/// <summary> /// Función que muestra el diálogo para seleccionar la carpeta donde están las imágenes a mostrar y llama al método para las imágenes /// </summary> private void SeleccionarCarpeta() { var dialog = new Ookii.Dialogs.Wpf.VistaFolderBrowserDialog(); if (dialog.ShowDialog(this).GetValueOrDefault()) { rutaDirectorio = dialog.SelectedPath; } CargarImagenes(); }
/// <summary> /// Called when [browse click]. /// </summary> /// <param name="sender">The sender.</param> /// <param name="e">The <see cref="System.Windows.RoutedEventArgs"/> instance containing the event data.</param> private void OnBrowseClick(object sender, RoutedEventArgs e) { var dialog = new Ookii.Dialogs.Wpf.VistaFolderBrowserDialog(); bool? success = dialog.ShowDialog(); if (success == true) { var button = (Button)sender; ExperimentInfo info = button.DataContext as ExperimentInfo; DirectoryBox.Text = dialog.SelectedPath; } }
private void BrowseForRoot() { var dialog = new Ookii.Dialogs.Wpf.VistaFolderBrowserDialog(); dialog.Description = "Choose the root folder of you music collection"; dialog.UseDescriptionForTitle = true; dialog.ShowNewFolderButton = true; var result = dialog.ShowDialog(); if (result == true) { this.Root = dialog.SelectedPath; } }
//Funcao para escolher pasta do league private void EscolhePasta() { Ookii.Dialogs.Wpf.VistaFolderBrowserDialog pasta = new Ookii.Dialogs.Wpf.VistaFolderBrowserDialog(); pasta.Description = "Please select your League of Legends folder"; pasta.RootFolder = Environment.SpecialFolder.MyComputer; pasta.ShowDialog(); File.WriteAllText(Directory.GetCurrentDirectory() + "\\path.txt", pasta.SelectedPath.ToString()); }
private void OutputFolderDialogClick(object sender, RoutedEventArgs e) { var dialog = new Ookii.Dialogs.Wpf.VistaFolderBrowserDialog(); dialog.ShowDialog(); if(!string.IsNullOrEmpty(dialog.SelectedPath)) Settings.OutputFolder = dialog.SelectedPath; }
private void cardToolTipBrowse_Click(object sender, RoutedEventArgs e) { Ookii.Dialogs.Wpf.VistaFolderBrowserDialog dialog = new Ookii.Dialogs.Wpf.VistaFolderBrowserDialog(); dialog.RootFolder = Environment.SpecialFolder.MyPictures; dialog.SelectedPath = this.Settings.CustomToolTipsPath; if (!System.IO.Path.IsPathRooted(dialog.SelectedPath)) dialog.SelectedPath = System.IO.Path.Combine(Caching.ImageRepository.ImageRoot, dialog.SelectedPath); dialog.ShowNewFolderButton = false; if (dialog.ShowDialog() == true) { // I don't like doing it this way, but I'm stumped as to how to get the TextBox to update // its Text property property using the commented-out line here. The Binding doesn't seem // to work the way I thought it should //this.Settings.CustomToolTipsPath = dialog.SelectedPath; tbCustomToolTipsPath.Text = dialog.SelectedPath; } }
private void TEMPLATE_PART_Button_Click(object sender, RoutedEventArgs e) { var dialog = new Ookii.Dialogs.Wpf.VistaFolderBrowserDialog(); bool? success = dialog.ShowDialog(); if (success == true) { var s = (Button)sender; SettingsPathViewModel vm = s.DataContext as SettingsPathViewModel; vm.Path = dialog.SelectedPath; } }
private void DoBrowseForOutputFolder() { var dlg = new Ookii.Dialogs.Wpf.VistaFolderBrowserDialog(); var result = dlg.ShowDialog(); if (result == true) this.OutputFolder = dlg.SelectedPath; }
private void OpenOutputPath(object sender, RoutedEventArgs e) { var dialog = new Ookii.Dialogs.Wpf.VistaFolderBrowserDialog(); var result = dialog.ShowDialog(); if (result.HasValue && (bool) result) { Sakurako.OutputPath = dialog.SelectedPath; } }
private void LoadDataset() { if ( Engine.TileManager.ChangesMade ) { var mbresult = MessageBox.Show( "Changes were made to this segmentation. Do you want to save the changes?", "Save Changes?", MessageBoxButton.YesNoCancel, MessageBoxImage.Warning ); switch ( mbresult ) { case MessageBoxResult.Yes: Engine.TileManager.SaveSegmentation(); break; case MessageBoxResult.No: Engine.TileManager.DiscardChanges(); break; default: return; } } var initialPath = Settings.Default.LoadDatasetPath; if ( string.IsNullOrEmpty( initialPath ) || !Directory.Exists( initialPath ) ) { initialPath = Environment.GetFolderPath( Environment.SpecialFolder.MyDocuments ); } var folderBrowserDialog = new Ookii.Dialogs.Wpf.VistaFolderBrowserDialog { Description = "Select Mojo Dataset Folder (the folder you select should be called \"" + Constants.DATASET_ROOT_DIRECTORY_NAME + "\")", UseDescriptionForTitle = true, ShowNewFolderButton = false, SelectedPath = initialPath }; var result = folderBrowserDialog.ShowDialog(); if ( result != null && result == true ) { Settings.Default.LoadDatasetPath = folderBrowserDialog.SelectedPath; Settings.Default.Save(); try { // // Load the dataset and show (approximate) progress // TileManagerDataContext.Progress = 10; Engine.TileManager.LoadTiledDataset( folderBrowserDialog.SelectedPath ); TileManagerDataContext.Progress = 70; if ( Engine.TileManager.TiledDatasetLoaded ) { // // Set the initial view // var viewportDataSpaceX = Engine.Viewers.Internal[ViewerMode.TileManager2D].D3D11RenderingPane.Viewport.Width / Engine.TileManager.TiledDatasetDescription.TiledVolumeDescriptions.Get( "SourceMap" ).NumVoxelsPerTileX; var viewportDataSpaceY = Engine.Viewers.Internal[ViewerMode.TileManager2D].D3D11RenderingPane.Viewport.Height / Engine.TileManager.TiledDatasetDescription.TiledVolumeDescriptions.Get( "SourceMap" ).NumVoxelsPerTileY; var maxExtentDataSpaceX = Engine.TileManager.TiledDatasetDescription.TiledVolumeDescriptions.Get( "SourceMap" ).NumTilesX * Constants.ConstParameters.GetInt( "TILE_SIZE_X" ); var maxExtentDataSpaceY = Engine.TileManager.TiledDatasetDescription.TiledVolumeDescriptions.Get( "SourceMap" ).NumTilesY * Constants.ConstParameters.GetInt( "TILE_SIZE_Y" ); var zoomLevel = Math.Min( viewportDataSpaceX / maxExtentDataSpaceX, viewportDataSpaceY / maxExtentDataSpaceY ); Engine.TileManager.TiledDatasetView.CenterDataSpace = new Vector3( maxExtentDataSpaceX / 2f, maxExtentDataSpaceY / 2f, 0f ); Engine.TileManager.TiledDatasetView.ExtentDataSpace = new Vector3( viewportDataSpaceX / zoomLevel, viewportDataSpaceY / zoomLevel, 0f ); Engine.CurrentToolMode = ToolMode.SplitSegmentation; Engine.TileManager.UpdateXYZ(); } TileManagerDataContext.Progress = 90; // // Reset the segment info list // TileManagerDataContext.SortSegmentListBy( "Size", true ); TileManagerDataContext.Progress = 100; } catch ( Exception e ) { String errorMessage = "Error loading images from:\n" + folderBrowserDialog.SelectedPath + "\n\n" + e.Message + "\n\nPlease check the path and try again."; MessageBox.Show( errorMessage, "Load Error", MessageBoxButton.OK, MessageBoxImage.Error ); Console.WriteLine( errorMessage ); } } }
private void SaveSegmentationAs() { var initialPath = Settings.Default.LoadSegmentationPath; if ( string.IsNullOrEmpty( initialPath ) || !Directory.Exists( initialPath ) ) { initialPath = Environment.GetFolderPath( Environment.SpecialFolder.MyDocuments ); } var folderBrowserDialog = new Ookii.Dialogs.Wpf.VistaFolderBrowserDialog { Description = "Select New Save Folder (the folder you select should be called \"" + Constants.DATASET_ROOT_DIRECTORY_NAME + "\")", UseDescriptionForTitle = true, ShowNewFolderButton = false, SelectedPath = initialPath }; var result = folderBrowserDialog.ShowDialog(); if ( result != null && result == true ) { Settings.Default.LoadSegmentationPath = folderBrowserDialog.SelectedPath; Settings.Default.Save(); Engine.TileManager.SaveSegmentationAs( folderBrowserDialog.SelectedPath ); } }
private void LoadSegmentation() { if ( Engine.TileManager.ChangesMade ) { var mbresult = MessageBox.Show( "Changes were made to this segmentation. Do you want to save the changes?", "Save Changes?", MessageBoxButton.YesNoCancel, MessageBoxImage.Warning ); switch ( mbresult ) { case MessageBoxResult.Yes: Engine.TileManager.SaveSegmentation(); break; case MessageBoxResult.No: Engine.TileManager.DiscardChanges(); break; default: return; } } var initialPath = Settings.Default.LoadSegmentationPath; if ( string.IsNullOrEmpty( initialPath ) || !Directory.Exists( initialPath ) ) { initialPath = Environment.GetFolderPath( Environment.SpecialFolder.MyDocuments ); } var folderBrowserDialog = new Ookii.Dialogs.Wpf.VistaFolderBrowserDialog { Description = "Select Mojo Segmentation Folder (the folder you select should be called \"" + Constants.DATASET_ROOT_DIRECTORY_NAME + "\")", UseDescriptionForTitle = true, ShowNewFolderButton = false, SelectedPath = initialPath }; var result = folderBrowserDialog.ShowDialog(); if ( result != null && result == true ) { Settings.Default.LoadSegmentationPath = folderBrowserDialog.SelectedPath; Settings.Default.Save(); try { // // Load the segmentation and show (approximate) progress // TileManagerDataContext.Progress = 10; Engine.TileManager.LoadSegmentation( folderBrowserDialog.SelectedPath ); TileManagerDataContext.Progress = 70; if ( Engine.TileManager.SegmentationLoaded ) { // // Set the initial view // Engine.CurrentToolMode = ToolMode.SplitSegmentation; Engine.TileManager.SegmentationVisibilityRatio = 0.5f; // // Load segment info list // TileManagerDataContext.SortSegmentListBy( "Size", true ); } TileManagerDataContext.Progress = 100; } catch ( Exception e ) { String errorMessage = "Error loading segmentation from:\n" + folderBrowserDialog.SelectedPath + "\n\n" + e.Message + "\n\nPlease check the path and try again."; MessageBox.Show( errorMessage, "Load Error", MessageBoxButton.OK, MessageBoxImage.Error ); Console.WriteLine( errorMessage ); } } }
private void OnRequestBrowse() { Ookii.Dialogs.Wpf.VistaFolderBrowserDialog dialog = new Ookii.Dialogs.Wpf.VistaFolderBrowserDialog(); dialog.Description = Properties.Resources.ChooseDirectoryForRegistry; if (dialog.ShowDialog() == true) { DatabaseInfo.DatabasePath = dialog.SelectedPath; OnPropertyChanged("DatabaseInfo"); } }
private void DefaultExperimentsDirectory_Click(object sender, RoutedEventArgs e) { Ookii.Dialogs.Wpf.VistaFolderBrowserDialog folderDialog = new Ookii.Dialogs.Wpf.VistaFolderBrowserDialog(); bool? success = folderDialog.ShowDialog(); if (success.HasValue && success.Value) { var s = (Button)sender; var vm = s.DataContext as SettingsViewModel; vm.DefaultExperimentsDirectory = folderDialog.SelectedPath; } }
private void buttonBrowse_Click(object sender, RoutedEventArgs e) { Ookii.Dialogs.Wpf.VistaFolderBrowserDialog openDialog = new Ookii.Dialogs.Wpf.VistaFolderBrowserDialog(); openDialog.SelectedPath = txtTsLocation.Text; if (openDialog.ShowDialog() == true) { txtTsLocation.Text = openDialog.SelectedPath; } }
private void DoBrowseForFeature() { var dlg = new Ookii.Dialogs.Wpf.VistaFolderBrowserDialog(); var result = dlg.ShowDialog(); if (result == true) FeatureFolder = dlg.SelectedPath; }
/// <summary> /// Opens a folder browser dialog when the button is clicked. /// </summary> /// <param name="sender">The sender.</param> /// <param name="e">The <see cref="System.Windows.RoutedEventArgs"/> instance containing the event data.</param> private void BrowseButtonClick(object sender, RoutedEventArgs e) { Ookii.Dialogs.Wpf.VistaFolderBrowserDialog folderDialog = new Ookii.Dialogs.Wpf.VistaFolderBrowserDialog(); folderDialog.ShowNewFolderButton = true; bool? success = folderDialog.ShowDialog(); if (success == true && Directory.Exists(folderDialog.SelectedPath)) { try { DirectoryPath path = new DirectoryPath(); path.Init(folderDialog.SelectedPath, Path.DataRoot); Path = path; } catch (System.ArgumentException ex) { NLog.LogManager.GetCurrentClassLogger().ErrorException("Failed to set reference to a file", ex); MessageBox.Show(ex.Message, "Failed to set reference to a file", MessageBoxButton.OK, MessageBoxImage.Exclamation); } } }
private void buttonBrowse_Click(object sender, RoutedEventArgs e) { var folderDialog = new Ookii.Dialogs.Wpf.VistaFolderBrowserDialog(); var folderResult = folderDialog.ShowDialog(); if (folderResult.HasValue && folderResult.Value) { textBoxLocation.Text = folderDialog.SelectedPath; } }