示例#1
0
        private void pbxBack_Click(object sender, EventArgs e)
        {
            SubjectsForm sjf = new SubjectsForm(listOfSubjects);

            sjf.Show();
            this.Close();
        }
示例#2
0
        private void btnLogin_Click(object sender, EventArgs e)
        {
            string password;
            string password2;

            string[] searchForPassword = File.ReadAllLines(@"E:\Deveres\Deveres\bin\Debug\Notepads\Accounts\" + cbxName.Text + ".txt");
            password  = searchForPassword[0];
            password2 = tbxPassword.Text;
            if (password2 == password)
            {
                using (StreamReader sr = new StreamReader(@"E:\Deveres\Deveres\bin\Debug\Notepads\" + "FirstTime.txt"))
                {
                    SubjectsForm sbf = new SubjectsForm();
                    sbf.Show();
                    this.Hide();
                }
            }
            else
            {
                MessageBox.Show("senha incorreta");
            }
        }