private void linkLabel2_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) { RegNewUser reg_form = new RegNewUser(); if (reg_form.ShowDialog(this) == DialogResult.OK) { if (mode_form != null) { mode_form.Close(); } mode_form = new SuperAdminMode(); mode_form.Show(this); } }
private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) { RecoveryPassword rec_form = new RecoveryPassword(); if (rec_form.ShowDialog(this) == DialogResult.OK) { if (mode_form != null) { mode_form.Close(); } mode_form = new SuperAdminMode(); mode_form.Show(this); } }
private void MainForm_Load(object sender, EventArgs e) { listUser = new List <User>(); using (FileStream file = new FileStream("file.txt", FileMode.Open)) { BinaryFormatter binFormat = new BinaryFormatter(); listUser = (List <User>)binFormat.Deserialize(file); } if (mode_form != null) { mode_form.Close(); } mode_form = new SuperAdminMode(); mode_form.Show(this); bgw_loader.DoWork += Bgw_loader_DoWork; }