public Users() { InitializeComponent(); string[] uspwd = Properties.Settings.Default.users.Split(';'); uu = new Login(); if (uu.ShowDialog() == System.Windows.Forms.DialogResult.OK) { user = uu.getUser(); for (int i = 0; i < uspwd.Length; i++) { if (uspwd[i].Length > 0) { UserDetails ud = new UserDetails(); string[] ss = uspwd[i].Split(':'); ud.username = ss[0]; ud.password = ss[1]; userList.Add(ud); listView1.Items.Add(ud.username); } } } else { Close(); } }
private void logInToolStripMenuItem_Click(object sender, EventArgs e) { lg = new Login(); if (lg.ShowDialog() == System.Windows.Forms.DialogResult.OK) { groupBox5.Enabled = true; groupBox6.Enabled = true; groupBox7.Enabled = true; groupBox8.Enabled = true; groupBox9.Enabled = true; groupBox10.Enabled = true; groupBox11.Enabled = true; groupBox12.Enabled = true; } }
private void manualSettings_SelectedIndexChanged(object sender, EventArgs e) { if (comboBox1.SelectedIndex == comboBox1.Items.Count - 1) { lg = new Login(); if (lg.ShowDialog() == System.Windows.Forms.DialogResult.OK) { setupWindow = new Setup(); if (setupWindow.ShowDialog() == System.Windows.Forms.DialogResult.OK) { manualsettings = setupWindow.getSettings(); } else { comboBox1.SelectedIndex = 0; } } } }