Exemple #1
0
        private void выходToolStripMenuItem_Click(object sender, EventArgs e)
        {
            MainWindow_Admin_ ytre = new MainWindow_Admin_();

            ytre.Show();
            this.Close();
        }
Exemple #2
0
        private void button1_Click(object sender, EventArgs e)
        {
            if (textBox1.Text == "user1" && textBox2.Text == "12345")
            {
                MainWindow c = new MainWindow();

                c.Show();

                this.Hide();
            }
            else if (textBox1.Text == "user2" && textBox2.Text == "54321")
            {
                MainWindow_Admin_ c = new MainWindow_Admin_();

                c.Show();

                this.Hide();
            }
            else
            {
                textBox1.Text = "";
                textBox2.Text = "";

                MessageBox.Show("Неверный логин или пароль");
            }
        }