Esempio n. 1
0
        private void Form1_FormClosing(object sender, FormClosingEventArgs e)
        {
            passwordform pwd = new passwordform();

            if (pwd.ShowDialog() != DialogResult.OK)
            {
                e.Cancel = true;
            }
            else
            {
                File.WriteAllText("list.json", admin.ToString());
            }
        }
Esempio n. 2
0
 private void TabControl1_SelectedIndexChanged(object sender, EventArgs e)
 {
     if (tabControl1.SelectedTab == tabPage2)
     {
         passwordform pwd = new passwordform();
         if (pwd.ShowDialog() == DialogResult.OK)
         {
             tabControl1.SelectedTab = tabPage2;
         }
         else
         {
             tabControl1.SelectedTab = tabPage1;
         }
     }
 }