private void formLogin_Load(object sender, EventArgs e) { tbEmail.Focus(); try { tbEmail.Text = dbHelper.ReadConfigParameter("UserName"); tbPassword.Text = dbHelper.ReadConfigParameter("Password"); int IsDbReady = int.Parse(dbHelper.ReadConfigParameter("isDBReady")); if (IsDbReady == 0) { var result = MessageBox.Show("You need to configure your database first. Do you want to configure it now.", "System Configuration Information", MessageBoxButtons.YesNo); if (result == DialogResult.Yes) { formSettings form = new formSettings(); form.StartPosition = FormStartPosition.CenterParent; form.ShowDialog(); } } } catch (Exception) { ; } }
private void button4_Click(object sender, EventArgs e) { formSettings form = new formSettings(); form.StartPosition = FormStartPosition.CenterParent; form.ShowDialog(); }