Exemple #1
0
 private void btnTake_Click(object sender, EventArgs e)
 {
     try
     {
         string type = touzhu();
         common num  = new common();
         if (cbMax.Checked)
         {
             type = num.containMax(type, tbMax.Text.Trim());
             if (type.Length > 0)
             {
                 type = type.Substring(0, type.Length - 1);
             }
         }
         if (cbMin.Checked)
         {
             type = num.containMin(type, tbMin.Text.Trim());
             if (type.Length > 0)
             {
                 type = type.Substring(0, type.Length - 1);
             }
         }
         if (cbMid.Checked)
         {
             type = num.containMid(type, tbMid.Text.Trim());
             if (type.Length > 0)
             {
                 type = type.Substring(0, type.Length - 1);
             }
         }
         if (cbAC.Checked)
         {
             type = num.containAC(type, tbAC.Text.Trim());
             if (type.Length > 0)
             {
                 type = type.Substring(0, type.Length - 1);
             }
         }
         if (cbSpaceValue.Checked)
         {
             type = num.containSpaceValue(type, tbSpaceValue.Text.Trim());
         }
         if (cbID.Checked)
         {
             type = num.containID(type, tbID.Text.Trim());
         }
         if (cbSpan.Checked)
         {
             type = num.containSpan(type, tbSpan.Text.Trim());
         }
         if (cbAve.Checked)
         {
             type = num.containAve(type, tbAve.Text.Trim());
         }
         if (cbBS.Checked)
         {
             type = num.containbs(type, tbBS.Text.Trim());
         }
         if (cbBG.Checked)
         {
             type = num.containbg(type, tbBG.Text.Trim());
         }
         if (cbSG.Checked)
         {
             type = num.containsg(type, tbSG.Text.Trim());
         }
         if (type.Trim().Length > 0)
         {
             string[]  text = type.Split(',');
             ArrayList al   = new ArrayList();
             al.Clear();
             for (int j = 0; j < text.Length; j++)
             {
                 al.Add(new myItem(text[j].ToString()));
             }
             dataGridView1.DataSource = al;
             lblNum.Text = "投注:" + Convert.ToString(text.Length) + "注";
             lblSum.Text = "投注金额:" + Convert.ToString(2 * text.Length) + "元";
         }
         else
         {
             ArrayList al = new ArrayList();
             al.Clear();
             dataGridView1.DataSource = al;
             lblNum.Text = "投注:0注";
             lblSum.Text = "投注金额:0元";
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message.ToString());
     }
 }
Exemple #2
0
 private void btnChoose_Click(object sender, EventArgs e)
 {
     try
     {
         string strnum = "0,1,2,3,4,5,6,7,8,9";
         if (Judge == "AC")
         {
             strnum = "1,2,3";
         }
         if (Judge == "SpaceValue")
         {
             strnum = "0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16";
         }
         common com = new common();
         if (chbJO.Checked)
         {
             if (rbJ.Checked)
             {
                 string str1 = "1,3,5,7,9";
                 if (Judge == "AC")
                 {
                     str1 = "1,3";
                 }
                 if (Judge == "SpaceValue")
                 {
                     str1 = "1,3,5,7,9,11,13,15";
                 }
                 strnum = com.getpublic(str1, strnum);
             }
             else
             {
                 string str1 = "0,2,4,6,8";
                 if (Judge == "AC")
                 {
                     str1 = "2";
                 }
                 if (Judge == "SpaceValue")
                 {
                     str1 = "0,2,4,6,8,10,12,14,16";
                 }
                 strnum = com.getpublic(str1, strnum);
             }
         }
         if (chbZH.Checked)
         {
             if (rbZ.Checked)
             {
                 string str1 = "1,2,3,5,7";
                 if (Judge == "AC")
                 {
                     str1 = "1,2,3";
                 }
                 if (Judge == "SpaceValue")
                 {
                     str1 = "1,2,3,5,7,11,13";
                 }
                 strnum = com.getpublic(str1, strnum);
             }
             else
             {
                 string str1 = "0,4,6,8,9";
                 if (Judge == "AC")
                 {
                     str1 = "";
                 }
                 if (Judge == "SpaceValue")
                 {
                     str1 = "0,4,6,8,9,10,12,14,15,16";
                 }
                 strnum = com.getpublic(str1, strnum);
             }
         }
         if (chbC3.Checked)
         {
             string str1 = "";
             if (chbC30.Checked)
             {
                 string str2 = "0,3,6,9";
                 if (Judge == "AC")
                 {
                     str2 = "0,3";
                 }
                 if (Judge == "SpaceValue")
                 {
                     str2 = "0,3,6,9,12,15";
                 }
                 if (str1.Trim().Length > 0)
                 {
                     str1 += "," + str2;
                 }
                 else
                 {
                     str1 += str2;
                 }
             }
             if (chbC31.Checked)
             {
                 string str2 = "1,4,7";
                 if (Judge == "AC")
                 {
                     str2 = "1";
                 }
                 if (Judge == "SpaceValue")
                 {
                     str2 = "1,4,7,10,13,16";
                 }
                 if (str1.Trim().Length > 0)
                 {
                     str1 += "," + str2;
                 }
                 else
                 {
                     str1 += str2;
                 }
             }
             if (chbC32.Checked)
             {
                 string str2 = "2,5,8";
                 if (Judge == "AC")
                 {
                     str2 = "2";
                 }
                 if (Judge == "SpaceValue")
                 {
                     str2 = "2,5,8,11,14";
                 }
                 if (str1.Trim().Length > 0)
                 {
                     str1 += "," + str2;
                 }
                 else
                 {
                     str1 += str2;
                 }
             }
             strnum = com.getpublic(str1, strnum);
         }
         if (chbC4.Checked)
         {
             string str1 = "";
             if (chbC40.Checked)
             {
                 string str2 = "0,4,8";
                 if (Judge == "AC")
                 {
                     str2 = "0";
                 }
                 if (Judge == "SpaceValue")
                 {
                     str2 = "0,4,8,12,16";
                 }
                 if (str1.Trim().Length > 0)
                 {
                     str1 += "," + str2;
                 }
                 else
                 {
                     str1 += str2;
                 }
             }
             if (chbC41.Checked)
             {
                 string str2 = "1,5,9";
                 if (Judge == "AC")
                 {
                     str2 = "1";
                 }
                 if (Judge == "SpaceValue")
                 {
                     str2 = "1,5,9,13";
                 }
                 if (str1.Trim().Length > 0)
                 {
                     str1 += "," + str2;
                 }
                 else
                 {
                     str1 += str2;
                 }
             }
             if (chbC42.Checked)
             {
                 string str2 = "2,6";
                 if (Judge == "AC")
                 {
                     str2 = "2";
                 }
                 if (Judge == "SpaceValue")
                 {
                     str2 = "2,6,10,14";
                 }
                 if (str1.Trim().Length > 0)
                 {
                     str1 += "," + str2;
                 }
                 else
                 {
                     str1 += str2;
                 }
             }
             if (chbC43.Checked)
             {
                 string str2 = "3,7";
                 if (Judge == "AC")
                 {
                     str2 = "3";
                 }
                 if (Judge == "SpaceValue")
                 {
                     str2 = "3,7,11,15";
                 }
                 if (str1.Trim().Length > 0)
                 {
                     str1 += "," + str2;
                 }
                 else
                 {
                     str1 += str2;
                 }
             }
             strnum = com.getpublic(str1, strnum);
         }
         if (chbC5.Checked)
         {
             string str1 = "";
             if (chbC50.Checked)
             {
                 string str2 = "0,5";
                 if (Judge == "AC")
                 {
                     str2 = "0";
                 }
                 if (Judge == "SpaceValue")
                 {
                     str2 = "0,5,10,15";
                 }
                 if (str1.Trim().Length > 0)
                 {
                     str1 += "," + str2;
                 }
                 else
                 {
                     str1 += str2;
                 }
             }
             if (chbC51.Checked)
             {
                 string str2 = "1,6";
                 if (Judge == "AC")
                 {
                     str2 = "1";
                 }
                 if (Judge == "SpaceValue")
                 {
                     str2 = "1,6,11,16";
                 }
                 if (str1.Trim().Length > 0)
                 {
                     str1 += "," + str2;
                 }
                 else
                 {
                     str1 += str2;
                 }
             }
             if (chbC52.Checked)
             {
                 string str2 = "2,7";
                 if (Judge == "AC")
                 {
                     str2 = "2";
                 }
                 if (Judge == "SpaceValue")
                 {
                     str2 = "2,7,12";
                 }
                 if (str1.Trim().Length > 0)
                 {
                     str1 += "," + str2;
                 }
                 else
                 {
                     str1 += str2;
                 }
             }
             if (chbC53.Checked)
             {
                 string str2 = "3,8";
                 if (Judge == "AC")
                 {
                     str2 = "3";
                 }
                 if (Judge == "SpaceValue")
                 {
                     str2 = "3,8,13";
                 }
                 if (str1.Trim().Length > 0)
                 {
                     str1 += "," + str2;
                 }
                 else
                 {
                     str1 += str2;
                 }
             }
             if (chbC54.Checked)
             {
                 string str2 = "4,9";
                 if (Judge == "AC")
                 {
                     str2 = "";
                 }
                 if (Judge == "SpaceValue")
                 {
                     str2 = "4,9,14";
                 }
                 if (str1.Trim().Length > 0)
                 {
                     str1 += "," + str2;
                 }
                 else
                 {
                     str1 += str2;
                 }
             }
             strnum = com.getpublic(str1, strnum);
         }
         if (chbRange.Checked)
         {
             string str1 = "";
             if (nudMax.Value <= nudMin.Value)
             {
                 for (int i = (int)nudMax.Value; i < nudMin.Value; i++)
                 {
                     str1 += i.ToString() + ",";
                 }
             }
             strnum = com.getpublic(str1, strnum);
         }
         numButton();
         strnum = strnum.Replace(",,", ",");
         string[] vibtn = strnum.Split(',');
         for (int vi = 0; vi < vibtn.Length; vi++)
         {
             if (vibtn[vi].ToString() == "0")
             {
                 btnNum0.BackColor = Color.Red;
             }
             if (vibtn[vi].ToString() == "1")
             {
                 btnNum1.BackColor = Color.Red;
             }
             if (vibtn[vi].ToString() == "2")
             {
                 btnNum2.BackColor = Color.Red;
             }
             if (vibtn[vi].ToString() == "3")
             {
                 btnNum3.BackColor = Color.Red;
             }
             if (vibtn[vi].ToString() == "4")
             {
                 btnNum4.BackColor = Color.Red;
             }
             if (vibtn[vi].ToString() == "5")
             {
                 btnNum5.BackColor = Color.Red;
             }
             if (vibtn[vi].ToString() == "6")
             {
                 btnNum6.BackColor = Color.Red;
             }
             if (vibtn[vi].ToString() == "7")
             {
                 btnNum7.BackColor = Color.Red;
             }
             if (vibtn[vi].ToString() == "8")
             {
                 btnNum8.BackColor = Color.Red;
             }
             if (vibtn[vi].ToString() == "9")
             {
                 btnNum9.BackColor = Color.Red;
             }
             if (vibtn[vi].ToString() == "10")
             {
                 btnNum10.BackColor = Color.Red;
             }
             if (vibtn[vi].ToString() == "11")
             {
                 btnNum11.BackColor = Color.Red;
             }
             if (vibtn[vi].ToString() == "12")
             {
                 btnNum12.BackColor = Color.Red;
             }
             if (vibtn[vi].ToString() == "13")
             {
                 btnNum13.BackColor = Color.Red;
             }
             if (vibtn[vi].ToString() == "14")
             {
                 btnNum14.BackColor = Color.Red;
             }
             if (vibtn[vi].ToString() == "15")
             {
                 btnNum15.BackColor = Color.Red;
             }
             if (vibtn[vi].ToString() == "16")
             {
                 btnNum16.BackColor = Color.Red;
             }
         }
     }
     catch (Exception ex)
     {
         ex.Message.ToString();
     }
 }