Exemplo n.º 1
0
        private void simpleButton1_Click(object sender, EventArgs e)
        {
            try
            {
                if (textEdit1.Text == globvar.username && textEdit2.Text == globvar.password)
                {
                    Form1 frm = new Form1();
                    frm.Show();

                    XtraForm1 frm1 = new XtraForm1();
                    frm1.Close();
                }
                else
                {
                    MessageBox.Show("Try again", MessageBoxIcon.Information.ToString());
                    tries--;
                    if (tries == 0)
                    {
                        MessageBox.Show("Please wait for 60 seconds", MessageBoxIcon.Warning.ToString());
                        Thread.Sleep(60000);
                        MessageBox.Show("You Can now try again", MessageBoxIcon.Information.ToString());
                        tries = 5;
                    }
                }
            }
            catch (Exception g)
            {
                MessageBox.Show(g.Message);
            }
        }
Exemplo n.º 2
0
        private void simpleButton1_Click(object sender, EventArgs e)
        {
            XtraForm1 frm = new XtraForm1();

            frm.Show();
            Thread.Sleep(2000);
            XtraForm2 frm1 = new XtraForm2();

            frm1.Close();
        }