Ejemplo n.º 1
0
        private void anon_button_Click(object sender, EventArgs e)
        {
            loginName = "Anonymous";
            anon      = true;
            OrderList ol = new OrderList();

            this.Hide();
            ol.FormClosed += Ol_FormClosed;
            ol.Show();
        }
Ejemplo n.º 2
0
        private void login_button_Click(object sender, EventArgs e)
        {
            if (username_field.Text == "" || password_field.Text == "")
            {
                MessageBox.Show("Fields cannot be empty for login!", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
            if (username_field.Text == "vlad" && password_field.Text == "admin")
            {
                loginName = "vlad";

                anon = false;
                OrderList ol = new OrderList();
                this.Hide();
                ol.FormClosed += Ol_FormClosed;
                ol.Show();
            }
        }