Esempio n. 1
0
 private void EnterButton_Click(object sender, EventArgs e)
 {
     if(textBox1.Text.Equals(password))
     {
         TabScreen ts = new TabScreen(user, path);
         ts.Show();
         homeScreen.Close();
         Close();
     }
     else
     {
         MessageBox.Show("Invalid password for " + user + ".", "Mismatched Passwords");
     }
 }
Esempio n. 2
0
        private void profilePic_Click(object sender, EventArgs e)
        {
            // This is where we go to tabview
            string password = "";
            XDocument xdoc = XDocument.Load("users.xml");
            foreach(XElement xel in xdoc.Root.Elements())
            {
                if(xel.Element("name").Value.ToString().Equals(UserName.Text))
                {
                    password = xel.Element("password").Value.ToString();
                }
            }

            if(password.Equals("0")) // no pw
            {
                TabScreen ts = new TabScreen(this.UserName.Text, myPath);
                ts.Show();
            }
            else
            {
                PwValidator pw = new PwValidator(this.UserName.Text, myPath, password, homeScreen);
                pw.Show();
            }
        }