예제 #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");
         Story1 st1 = new Story1();
         st1.Show();
         this.Close();
     }
     if (timer.Elapsed.Minutes.ToString() == "1")
     {
         label4.Visible = true;
     }
 }
예제 #2
0
        private void button1_Click(object sender, EventArgs e)
        {
            ArrayList al = new ArrayList();

            al.Add("baseball");
            al.Add("BASEBALL");
            al.Add("Baseball");

            if (al.Contains(textBox1.Text))
            {
                MessageBox.Show("Correct");
                Story1 st1 = new Story1();
                st1.Owner = this;
                st1.Show(this);
                this.Hide();
            }
            else if (textBox1.Text == "")
            {
                MessageBox.Show("Please Input");
            }
            else
            {
                MessageBox.Show("Wrong");
            }
        }
예제 #3
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)
            {
                Story1 stans = new Story1();
                stans.Show();
                this.Close();
            }
        }
예제 #4
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!");
         Story1 st1 = new Story1();
         st1.Show();
         this.Close();
     }
 }