Beispiel #1
0
        private void Time_WP_Tick(object sender, EventArgs e)
        {
            Time_WP.Stop();
            if (num1 == 20 || num1 == 19)
            {
                PickFT.Visible = false;
                PickFT.Enabled = false;
            }
            else
            {
                PickFT.BackgroundImage = Properties.Resources.im0;
                PickFT.BackColor       = Color.DarkOrange;
            }

            if (num2 == 20 || num2 == 19)
            {
                PickND.Visible = false;
                PickND.Enabled = false;
            }
            else
            {
                PickND.BackgroundImage = Properties.Resources.im0;
                PickND.BackColor       = Color.DarkOrange;
            }
            PickFT = null;
            PickND = null;
            foreach (PictureBox picture in panel1.Controls)
            {
                if (picture.Visible == true)
                {
                    picture.Enabled = true;
                }
            }
            Change_Round();
        }
Beispiel #2
0
 private void Re_P()
 {
     if (round == 0)
     {
         if (R_L + B_L + G_L == 0)
         {
             Time_WP.Start();
         }
         else if (R_L != 0)
         {
             ReR_L.Visible = true;
             ReR_L.Enabled = true;
         }
         if (B_L != 0)
         {
             ReB_L.Visible = true;
             ReB_L.Enabled = true;
         }
         if (G_L != 0)
         {
             ReG_L.Visible = true;
             ReG_L.Enabled = true;
         }
     }
     else
     {
         if (R_R + B_R + G_R == 0)
         {
             Time_WP.Start();
         }
         else if (R_R != 0)
         {
             ReR_R.Visible = true;
             ReR_R.Enabled = true;
         }
         if (B_R != 0)
         {
             ReB_R.Visible = true;
             ReB_R.Enabled = true;
         }
         if (G_R != 0)
         {
             ReG_R.Visible = true;
             ReG_R.Enabled = true;
         }
     }
 }
Beispiel #3
0
 private void ReG_L_Click(object sender, EventArgs e)
 {
     G_L--;
     GP_L.Text = Convert.ToString(G_L);
     if (G_L == 4)
     {
         S_L       -= 2;
         SPP_L.Text = Convert.ToString(S_L);
     }
     ReR_L.Visible = false;
     ReR_L.Enabled = false;
     ReB_L.Visible = false;
     ReB_L.Enabled = false;
     ReG_L.Visible = false;
     ReG_L.Enabled = false;
     Time_WP.Start();
 }
Beispiel #4
0
 private void ReR_R_Click(object sender, EventArgs e)
 {
     R_R--;
     RP_R.Text = Convert.ToString(R_R);
     if (R_R == 4)
     {
         S_R       -= 2;
         SPP_R.Text = Convert.ToString(S_R);
     }
     ReR_R.Visible = false;
     ReR_R.Enabled = false;
     ReB_R.Visible = false;
     ReB_R.Enabled = false;
     ReG_R.Visible = false;
     ReG_R.Enabled = false;
     Time_WP.Start();
 }
Beispiel #5
0
        private void Update_SC()
        {
            num1 = Convert.ToInt32(PickFT.Tag);
            num2 = Convert.ToInt32(PickND.Tag);
            foreach (PictureBox picture in panel1.Controls)
            {
                picture.Enabled = false;
            }

            if ((num1 == num2) || (num1 == 20 && num2 != 19) || (num1 != 19 && num2 == 20))
            {
                Time_CP.Start();
            }
            else if ((num1 == 19 && num2 != 20) || (num1 != 20 && num2 == 19))
            {
                Re_P();
            }
            else
            {
                Time_WP.Start();
            }
        }