private void browse_button_Click(object sender, RoutedEventArgs e)
{
var browseDlg = new System.Windows.Forms.FolderBrowserDialog();
//browseDlg.RootFolder = Environment.CurrentDirectory as Environment.SpecialFolder;
string executionPath = Environment.CurrentDirectory;
string zipFolderPath = "R Packages\\R 3.2.1 packages";
string fullpath = System.IO.Path.Combine(executionPath, zipFolderPath);
browseDlg.SelectedPath = System.IO.Directory.Exists(fullpath) ? fullpath : executionPath;
System.Windows.Forms.DialogResult result = browseDlg.ShowDialog();
if (result == System.Windows.Forms.DialogResult.OK)
{
pathselected = browseDlg.SelectedPath;
}
pathTextBox.Text = pathselected;
}