Beispiel #1
0
        private void button2_Click(object sender, EventArgs e)
        {
            menu m = new menu();

            // m.MdiParent = this;
            m.Show();
            this.Hide();
        }
Beispiel #2
0
        /// <summary>
        /// comprueba que el usuario y password son correctos en caso contrario
        /// los textbox se pondran en modo warning.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void button1_Click(object sender, EventArgs e)
        {
            var username = textBox1.Text;
            var password = textBox2.Text;

            if (username == admin.user && password == admin.pass)
            {
                menu m = new menu();
                // m.MdiParent = this;
                m.Show();
                this.Hide();
            }
            else
            {
                textBox1.ForeColor = Color.Red;
                textBox2.ForeColor = Color.Red;
            }
        }