BlueSky.Windows.CustomSettingsWindow.rhomebrowse_Click C# (CSharp) Метод

rhomebrowse_Click() приватный Метод

private rhomebrowse_Click ( object sender, RoutedEventArgs e ) : void
sender object
e System.Windows.RoutedEventArgs
Результат void
        private void rhomebrowse_Click(object sender, RoutedEventArgs e)
        {
            System.Windows.Forms.FolderBrowserDialog folderBrowseDialog = new System.Windows.Forms.FolderBrowserDialog();
            folderBrowseDialog.SelectedPath = rhome.Text != null ? rhome.Text : string.Empty;
            System.Windows.Forms.DialogResult result = folderBrowseDialog.ShowDialog();
            if (result == System.Windows.Forms.DialogResult.OK)
            {
                if (IsValidDirectory(folderBrowseDialog.SelectedPath))// or blank if defaults are needed
                {
                    string unixpath = folderBrowseDialog.SelectedPath.Replace('\\', '/');
                    AllAppSettings.Set("rhome", unixpath);//folderBrowseDialog.SelectedPath);
                    //rhome.Text = folderBrowseDialog.SelectedPath;
                    //OR
                    rhome.GetBindingExpression(TextBox.TextProperty).UpdateTarget();
                }
            }
        }