protected override void OnLoad(EventArgs e) { base.OnLoad(e); for (int dex = 0; dex < Program.Arguments.Length; dex++) { var arg = Program.Arguments[dex]; var finfo = fs.GetFileInfo(arg); if (!finfo.Exists) { continue; } if (finfo.Extension == ".mhdb") { ConnectDB_Dialog dialog = new ConnectDB_Dialog(); dialog.CNCList = connectionMenu; dialog.pathTB.Text = arg; dialog.ShowDialog(); dialog.Dispose(); } } Focus(); }
private void GeneralCM_ItemClicked(object sender, ToolStripItemClickedEventArgs e) { generalCM.Close(); if (e.ClickedItem.Text == "Connect MochaDB") { var dialog = new ConnectDB_Dialog(); dialog.CNCList = connectionMenu; dialog.ShowDialog(); dialog.Dispose(); } else if (e.ClickedItem.Text == "Create MochaDB") { var dialog = new CreateDB_Dialog(); dialog.CNCList = connectionMenu; dialog.ShowDialog(); dialog.Dispose(); } }