private void Form1_Load(object sender, EventArgs e) { if (!SQLConn.IsServerConnected()) { MessageBox.Show("You database is not yet configured or is not configured correctly \n You will be redirected to Database configuration form ", "Database Configuration"); frmDatabaseConfig frm = new frmDatabaseConfig(); frm.ShowDialog(); this.Close(); } }
protected override bool ProcessCmdKey(ref Message msg, Keys keyData) { bool bHandled = false; // switch case is the easy way, a hash or map would be better, // but more work to get set up. switch (keyData) { case Keys.F5: frmDatabaseConfig frm = new frmDatabaseConfig(); frm.ShowDialog(); bHandled = true; break; } return(bHandled); }
private void logsToolStripMenuItem_Click_1(object sender, EventArgs e) { frmDatabaseConfig frm = new frmDatabaseConfig(); frm.Show(); }