private void item2ToolStripMenuItem_Click(object sender, EventArgs e) { DataViewForm dvf = new DataViewForm(); dvf.PackName = (sender as ToolStripMenuItem).Tag.ToString(); dvf.Show(); }
private void ShowNewForm(object sender, EventArgs e) { string databaseName = string.Empty; string sqlString = string.Empty; // select using (var frm = new FolderBrowserDialog()) { if (frm.ShowDialog() != DialogResult.OK) { return; } databaseName = frm.SelectedPath; } // get SQL using (var sqlForm = new InputMultyLineForm()) { if (sqlForm.ShowDialog() != DialogResult.OK) { return; } sqlString = sqlForm.sqlTextBox.Text; } var chldForm = new DataViewForm() { MdiParent = this, }; chldForm.SetSql(databaseName, sqlString); chldForm.Show(); }
private void OpenFile(object sender, EventArgs e) { OpenFileDialog openFileDialog = new OpenFileDialog(); openFileDialog.InitialDirectory = Environment.GetFolderPath(Environment.SpecialFolder.Personal); openFileDialog.Filter = "Файлы DBF (*.dbf)|*.dbf|Все файлы (*.*)|*.*"; if (openFileDialog.ShowDialog(this) == DialogResult.OK) { var frm = new DataViewForm() { MdiParent = this }; frm.SetFiedName(openFileDialog.FileName); frm.Show(); } }