Esempio n. 1
0
 private void UpdateTimeElapsed(object sender, EventArgs e)
 {
     if (timer.Elapsed.ToString() != "00:00:00")
     {
         lblTimeElapsed.Text = timer.Elapsed.ToString().Remove(8);
     }
     if (timer.Elapsed.ToString() == "00:00:00")
     {
         btnpause.Enabled = false;
     }
     else
     {
         btnpause.Enabled = true;
     }
     if (timer.Elapsed.Minutes.ToString() == "3")
     {
         timer.Reset();
         lblTimeElapsed.Text = "00:00:00";
         btnpause.Enabled    = false;
         MessageBox.Show("Time Is Up\nTry Again");
         Story2 st2 = new Story2();
         st2.Show();
         this.Close();
     }
     if (timer.Elapsed.Minutes.ToString() == "1")
     {
         label4.Visible = true;
     }
 }
Esempio n. 2
0
        void btnbackClick(object sender, EventArgs e)
        {
            DialogResult YesOrNo = new DialogResult();

            YesOrNo = MessageBox.Show("Do you want to exit?", "Are you sure to exit?", MessageBoxButtons.YesNo);
            if (YesOrNo == DialogResult.Yes)
            {
                Story2 st2 = new Story2();
                st2.Show();
                this.Close();
            }
        }
Esempio n. 3
0
 private void click(Object sender, EventArgs e)
 {
     count++;
     if (count > 5)
     {
         btnreset.Click -= click;
         count           = 0;
         MessageBox.Show("Only 5 shuffle allow to reset!");
         Story2 st2 = new Story2();
         st2.Show();
         this.Close();
     }
 }
Esempio n. 4
0
        private void button1_Click(object sender, EventArgs e)
        {
            ArrayList al = new ArrayList();

            al.Add("f");
            al.Add("F");

            if (al.Contains(textBox1.Text))
            {
                MessageBox.Show("Correct");
                Story2 st2 = new Story2();
                st2.Owner = this;
                st2.Show(this);
                this.Hide();
            }
            else if (textBox1.Text == "")
            {
                MessageBox.Show("Please Input");
            }
            else
            {
                MessageBox.Show("Wrong");
            }
        }