private void btnDir_Click(object sender, EventArgs e) { if (btnDir.Text == "Select") { FolderBrowserDialog d = new FolderBrowserDialog(); btnDir.Text = "Default"; d.Description = "Select space directory"; DialogResult result = d.ShowDialog(this); if ((result != DialogResult.Cancel) & (d.SelectedPath != "")) { pn_control.SetValue("dir", d.SelectedPath); } } else { btnDir.Text = "Select"; pn_control.SetValue("dir", "--default--"); } }
private void btnLocation_Click(object sender, EventArgs e) { ROOT = VSUILib.VSUICommonFunctions.SelectPath(DEFS.KEY_STORAGE_ROOT, "Select root directory for XML storage"); if ((ROOT == VSUILib.VSUICommonFunctions.CANCELLED) | (ROOT == "")) { ROOT = ""; } else { btnCreate.Enabled = true; g.SetValue("dir", ROOT); } }
private void btnSelectFile_Click(object sender, EventArgs e) { OpenFileDialog d = new OpenFileDialog(); d.Title = "Select content file"; DialogResult result = d.ShowDialog(this); if ((result != DialogResult.Cancel) & (d.FileName != "")) { g.SetValue("file", d.FileName); } }