private void btnApplyChanges_Click(object sender, EventArgs e) { if (radDark.Checked) { color = Color.FromArgb(41, 44, 51); Settings setting = new Settings(); Form1 home = new Form1(); home.BackColor = color; setting.BackColor = color; setting.Show(); } if (radLight.Checked) { color = Color.WhiteSmoke; Settings setting = new Settings(); setting.BackColor = color; setting.Show(); } }
private void button5_Click(object sender, EventArgs e) { string query = "SELECT eid FROM employee, type_table WHERE eid = " + eid + " AND employee.employee_type = type_table.id AND type='Admin'"; command = new OracleCommand(query, connection); connection.Open(); reader = command.ExecuteReader(); if (reader.HasRows) { connection.Close(); Settings s = new Settings(); s.Show(); } else { connection.Close(); MessageBox.Show("Please login as administrator to access this module"); } connection.Close(); }
public void ShowSettingsDialog() { Settings form = new Settings(); form.FormClosed += form_FormClosed; form.Show(); }