Exemplo n.º 1
1
 private void browseButton_Click(object sender, RoutedEventArgs e)
 {
     var dialog = new Ookii.Dialogs.Wpf.VistaFolderBrowserDialog()
     {
         SelectedPath = this.installPath
     };
     dialog.ShowDialog();
     SetInstallPath(dialog.SelectedPath);
 }
Exemplo n.º 2
0
        private void picklocationbutton_Click(object sender, RoutedEventArgs e)
        {
            var startloc = new Ookii.Dialogs.Wpf.VistaFolderBrowserDialog();

            if (startloc.ShowDialog(this).GetValueOrDefault())
            {
                locationtext.Text = startloc.SelectedPath;
            }
        }
Exemplo n.º 3
0
        private async void ExtractAllTracksWav()
        {
            var _browser = new Ookii.Dialogs.Wpf.VistaFolderBrowserDialog();

            if (_browser.ShowDialog() == true && Directory.Exists(_browser.SelectedPath))
            {
                ExtractAllTracks(_browser.SelectedPath, true);
            }
        }
Exemplo n.º 4
0
        /// <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;
            }
        }
Exemplo n.º 5
0
        private void BtnBrowse_OnClick(object sender, RoutedEventArgs e)
        {
            var dialog = new Ookii.Dialogs.Wpf.VistaFolderBrowserDialog();

            if (dialog.ShowDialog(this) ?? false)
            {
                txtDirectoryPath.Text = dialog.SelectedPath;
            }
        }
Exemplo n.º 6
0
        // 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;
            }
        }
Exemplo n.º 7
0
        //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;
            }
        }
Exemplo n.º 8
0
        private void BTNguardarEn_Click(object sender, RoutedEventArgs e)
        {
            var dialog = new Ookii.Dialogs.Wpf.VistaFolderBrowserDialog();

            if (dialog.ShowDialog(this).GetValueOrDefault())
            {
                DireccionLog.Text = dialog.SelectedPath;
            }
        }
Exemplo n.º 9
0
        public Path()
        {
            InitializeComponent();
            var dialog = new Ookii.Dialogs.Wpf.VistaFolderBrowserDialog();

            if (dialog.ShowDialog(this).GetValueOrDefault())
            {
                FolderPath.Text = dialog.SelectedPath;
            }
        }
Exemplo n.º 10
0
        private void DoBrowseForOutputFolder()
        {
            var dlg    = new Ookii.Dialogs.Wpf.VistaFolderBrowserDialog();
            var result = dlg.ShowDialog();

            if (result == true)
            {
                this.OutputFolder = dlg.SelectedPath;
            }
        }
Exemplo n.º 11
0
        private void browseButton_Click(object sender, RoutedEventArgs e)
        {
            var dialog = new Ookii.Dialogs.Wpf.VistaFolderBrowserDialog()
            {
                SelectedPath = this.installPath
            };

            dialog.ShowDialog();
            SetInstallPath(dialog.SelectedPath);
        }
Exemplo n.º 12
0
        private void OpenCommandHandler(object sender, ExecutedRoutedEventArgs e)
        {
            var dialog = new Ookii.Dialogs.Wpf.VistaFolderBrowserDialog();

            if (dialog.ShowDialog(this).GetValueOrDefault())
            {
                DirPath         = dialog.SelectedPath;
                isDirPathChosen = true;
            }
        }
Exemplo n.º 13
0
        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;
            }
        }
Exemplo n.º 15
0
        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;
            }
        }
Exemplo n.º 16
0
        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;
            }
        }
Exemplo n.º 18
0
        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;
            }
        }
Exemplo n.º 19
0
        private void DoBrowseForFeature()
        {
            var dlg    = new Ookii.Dialogs.Wpf.VistaFolderBrowserDialog();
            var result = dlg.ShowDialog();

            if (result == true)
            {
                FeatureFolder = dlg.SelectedPath;
            }
        }
Exemplo n.º 20
0
        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;
            //}
        }
Exemplo n.º 22
0
        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;
        }
Exemplo n.º 23
0
        private void BrowseTestDirButton_Click(object sender, RoutedEventArgs e)
        {
            var openFolderDialog = new Ookii.Dialogs.Wpf.VistaFolderBrowserDialog();

            if (openFolderDialog.ShowDialog() == false)
            {
                return;
            }

            CsvTestFilePathTextBox.Text = openFolderDialog.SelectedPath;
        }
Exemplo n.º 24
0
        private string CallDialog()
        {
            var dialog = new Ookii.Dialogs.Wpf.VistaFolderBrowserDialog();

            if (dialog.ShowDialog() == true)
            {
                return(dialog.SelectedPath);
            }

            return("");
        }
Exemplo n.º 25
0
        public void ChangeFolderButtonClick()
        {
            var dialog = new Ookii.Dialogs.Wpf.VistaFolderBrowserDialog();

            if ((bool)dialog.ShowDialog())
            {
                string path = dialog.SelectedPath;
                ApplicationPaths.SetAudioPath(path);
                FolderButtonToolTip = HelpersModel.ToolTipFolder;
            }
        }
Exemplo n.º 26
0
        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;
            }
        }
Exemplo n.º 27
0
        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)
                {
                }
            });
        }
Exemplo n.º 28
0
        public void GetFolder()
        {
            var dialog = new Ookii.Dialogs.Wpf.VistaFolderBrowserDialog();

            if (dialog.ShowDialog().GetValueOrDefault())
            {
                MyFolder = dialog.SelectedPath.ToString();
            }

            Directory.CreateDirectory(MyImageFolder);
        }
Exemplo n.º 29
0
        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;
            }
        }
Exemplo n.º 30
0
        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);
        }
Exemplo n.º 31
0
        /// <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;
            }
        }
Exemplo n.º 33
0
        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;
            }
        }
Exemplo n.º 34
0
 //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());
 }
Exemplo n.º 35
0
        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;
        }
Exemplo n.º 36
0
		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;
            }
        }
Exemplo n.º 38
0
 private void DoBrowseForOutputFolder()
 {
     var dlg = new Ookii.Dialogs.Wpf.VistaFolderBrowserDialog();
     var result = dlg.ShowDialog();
     if (result == true) this.OutputFolder = dlg.SelectedPath;
 }
Exemplo n.º 39
0
 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;
     }
 }
Exemplo n.º 40
0
        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 );
                }

            }
        }
Exemplo n.º 41
0
        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 );
            }
        }
Exemplo n.º 42
0
        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 );
                }
            }
        }
Exemplo n.º 43
0
        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;
            }
        }
Exemplo n.º 46
0
 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;
     }
 }