Exemplo n.º 1
0
        //btnLeave
        private void button1_Click(object sender, EventArgs e)
        {
            Close();
            FormStart formStart = new FormStart();

            formStart.Show();
        }
Exemplo n.º 2
0
        private void buttonOK_Click(object sender, EventArgs e)
        {
            Connection.updDB();
            Close();
            FormStart formStart = new FormStart();

            formStart.Show();
        }
Exemplo n.º 3
0
        private void btnEnter_Click(object sender, EventArgs e)
        {
            if (login == null)
            {
                DialogResult result = MessageBox.Show(
                    "pls enter login",
                    "Сообщение",
                    MessageBoxButtons.OK,
                    MessageBoxIcon.Warning,
                    MessageBoxDefaultButton.Button1,
                    MessageBoxOptions.DefaultDesktopOnly);

                if (result == DialogResult.OK)
                {
                    textBoxLogin.BackColor = Color.Red;
                }

                Console.WriteLine("pls enter login");
            }
            else if (login != null && password == null)
            {
                MessageBox.Show("Please enter password");
                Console.WriteLine("pls enter paswrd");
            }
            else if (login != null && password != null)
            {
                if (Connection.login(login, password))
                {
                    currentUser = Connection.getFullDB(login);

                    Console.WriteLine("login:"******"  " + "password:"******"Upps...");

                    Console.WriteLine("Upps...");
                }
            }
        }