private void settingsToolStripMenuItem1_Click(object sender, EventArgs e) { PasswordCheck passwordCheck = new PasswordCheck(); if (passwordCheck.ShowDialog() == DialogResult.OK) { AdminSettings settings = new AdminSettings(); settings.ShowDialog(); } DisplayData(); }
private void Form1_Load(object sender, EventArgs e) { if (!HasPermission()) { PasswordCheck passwordCheck = new PasswordCheck(); if (passwordCheck.ShowDialog() == DialogResult.OK) { WriteFilePermission(); } else { Application.Exit(); } } }