private void buttonBrowse_Click(object sender, EventArgs e) { openFileDialog1.FileName = ""; openFileDialog1.Filter = "SQL Express file (*.mdf)|*.mdf|All files (*.*)|*.*"; if (System.IO.File.Exists(textBoxFilename.Text)) { openFileDialog1.FileName = textBoxFilename.Text; } else if (!string.IsNullOrEmpty(Controller.Instance.AppConfig.ProjectPath) && System.IO.Directory.Exists(Controller.Instance.AppConfig.ProjectPath)) { openFileDialog1.InitialDirectory = Controller.Instance.AppConfig.ProjectPath; } else { openFileDialog1.InitialDirectory = System.IO.Path.GetDirectoryName(Application.ExecutablePath); } Controller.ShadeMainForm(); if (openFileDialog1.ShowDialog(this) != DialogResult.OK) { Controller.UnshadeMainForm(); return; } Controller.UnshadeMainForm(); textBoxFilename.Text = openFileDialog1.FileName; }
void btnColorBrowse_Click(object sender, EventArgs e) { ColorDialog colorBrowser = new ColorDialog(); colorBrowser.Color = ((Label)InputControl).BackColor; Controller.ShadeMainForm(); if (colorBrowser.ShowDialog(this) == DialogResult.OK) { ((Label)InputControl).BackColor = colorBrowser.Color; } Controller.UnshadeMainForm(); }
void btnFileBrowse_Click(object sender, EventArgs e) { OpenFileDialog fileBrowser = new OpenFileDialog(); fileBrowser.FileName = ((TextBox)InputControl).Text; Controller.ShadeMainForm(); if (fileBrowser.ShowDialog(this) == DialogResult.OK) { ((TextBox)InputControl).Text = fileBrowser.FileName; } Controller.UnshadeMainForm(); }
void btnDirectoryBrowse_Click(object sender, EventArgs e) { FolderBrowserDialog directoryBrowser = new FolderBrowserDialog(); directoryBrowser.SelectedPath = ((TextBox)InputControl).Text; Controller.ShadeMainForm(); if (directoryBrowser.ShowDialog(this) == DialogResult.OK) { ((TextBox)InputControl).Text = directoryBrowser.SelectedPath; } Controller.UnshadeMainForm(); }
private void FormFilter2_FormClosed(object sender, FormClosedEventArgs e) { Controller.UnshadeMainForm(); }
private void FormScriptObject_FormClosed(object sender, FormClosedEventArgs e) { Controller.UnshadeMainForm(); }
private void FormMapColumn_FormClosed(object sender, FormClosedEventArgs e) { Controller.UnshadeMainForm(); }
private void FormRelationship_FormClosed(object sender, FormClosedEventArgs e) { Controller.UnshadeMainForm(); }
private void FormObjectOptionEdit_FormClosed(object sender, FormClosedEventArgs e) { Controller.UnshadeMainForm(); }
private void FormSelectDatabase_FormClosed(object sender, FormClosedEventArgs e) { Controller.UnshadeMainForm(); }