private void button3_Click(object sender, EventArgs e) { Hide(); Меню_для_студента newForm = new Меню_для_студента(); newForm.Show(); }
private void BackToMenu_Click(object sender, EventArgs e) { while (flag_3 == 1) { Hide(); Меню_для_студента newForm = new Меню_для_студента(); newForm.Show(); flag_3 = 0; } }
private void button1_Click(object sender, EventArgs e) { XmlDocument xDoc = new XmlDocument(); xDoc.Load("users.xml"); //XmlDocument xText = new XmlDocument(); //xText.Load("1.xml"); XmlElement xRoot = xDoc.DocumentElement; foreach (XmlNode xnode in xRoot) { if (xnode.Name == "teachers") { foreach (XmlNode childteacher in xnode.ChildNodes) { log = false; pass = false; foreach (XmlNode childlogpass in childteacher.ChildNodes) { if (childlogpass.Name == "login" && childlogpass.InnerText == Login.Text) { log = true; } else if (childlogpass.Name == "password" && childlogpass.InnerText == Parol.Text) { pass = true; } if (log && pass && !isOpenWindow_Form) { isOpenWindow_Form = true; Hide(); TeacherMenu newTeacherMenu = new TeacherMenu(); newTeacherMenu.Show(); } } } } else if (xnode.Name == "students") { foreach (XmlNode childstudents in xnode.ChildNodes) { log = false; pass = false; foreach (XmlNode childlogpass in childstudents.ChildNodes) { if (childlogpass.Name == "login" && childlogpass.InnerText == Login.Text) { log = true; } else if (childlogpass.Name == "password" && childlogpass.InnerText == Parol.Text) { pass = true; } if (log && pass && !isOpenWindow_Form) { isOpenWindow_Form = true; account_login = Login.Text; Hide(); Меню_для_студента newForm = new Меню_для_студента(); newForm.Show(); } } } } } }