Exemplo n.º 1
0
 private void Ckb_CodeYZ_Click(object sender, EventArgs e)
 {
     if (!CommFunc.CheckTextBoxIsNull(this.Txt_CodeYZ, "验证号码"))
     {
         string        item  = this.Txt_CodeYZ.Text.Trim();
         List <string> pList = new List <string>();
         int           num   = 0;
         for (int i = 0; i < this.ValueLableList.Count; i++)
         {
             ValueLable lable = this.ValueLableList[i];
             if (lable.Visible)
             {
                 num++;
                 if (!lable.ValueList.Contains(item))
                 {
                     pList.Add(CommFunc.GetNumber(lable.Hint.Split(new char[] { '组' })[0]));
                 }
             }
         }
         if (num == 0)
         {
             CommFunc.PublicMessageAll("没有找到待验证的分割结果!", true, MessageBoxIcon.Asterisk, "");
         }
         else if (pList.Count > 0)
         {
             CommFunc.PublicMessageAll("以下组数没有找到验证的号码:\r\n" + CommFunc.Join(pList, ","), true, MessageBoxIcon.Asterisk, "");
         }
         else
         {
             CommFunc.PublicMessageAll("验证的号码都在分割结果里!", true, MessageBoxIcon.Asterisk, "");
         }
     }
 }
Exemplo n.º 2
0
        private bool GetTimesCount(ref ConfigurationStatus.TimesCount pTimesInfo)
        {
            pTimesInfo       = new ConfigurationStatus.TimesCount();
            pTimesInfo.Cycle = Convert.ToInt32(this.Cbb_Cycle.Text);
            if (CommFunc.CheckTextBoxIsNull(this.Txt_Prize, this.Lbl_Prize.Text))
            {
                return(false);
            }
            int selectedIndex = this.Cbb_Unit.SelectedIndex;

            ConfigurationStatus.SCUnitType pUnitType = (ConfigurationStatus.SCUnitType)selectedIndex;
            pTimesInfo.Money = ((AutoBetsWindow)Program.MainApp).GetBetMoney(pUnitType);
            pTimesInfo.Mode  = Convert.ToDouble(this.Txt_Prize.Text) / Math.Pow(10.0, (double)selectedIndex);
            if (CommFunc.CheckTextBoxIsNull(this.Txt_Number, this.Lbl_Number.Text))
            {
                return(false);
            }
            pTimesInfo.Number = this.GetNumber();
            RadioButton timesType = this.GetTimesType();

            if (timesType == this.Rdb_Times1)
            {
                pTimesInfo.GainRatio  = Convert.ToDouble(this.Cbb_Times1.Text);
                pTimesInfo.Type       = ConfigurationStatus.TimesType.GainRatio;
                pTimesInfo.TypeString = "收益率";
            }
            else if (timesType == this.Rdb_Times2)
            {
                if (CommFunc.CheckTextBoxIsNull(this.Txt_Times2, this.Rdb_Times2.Text.Replace(":", "")))
                {
                    return(false);
                }
                pTimesInfo.GainFix    = Convert.ToDouble(this.Txt_Times2.Text);
                pTimesInfo.Type       = ConfigurationStatus.TimesType.GainFix;
                pTimesInfo.TypeString = "固定利润";
            }
            else if (timesType == this.Rdb_Times3)
            {
                if (CommFunc.CheckTextBoxIsNull(this.Txt_Times3_1, this.Lbl_Times3_1.Text))
                {
                    return(false);
                }
                if (CommFunc.CheckTextBoxIsNull(this.Txt_Times3_2, this.Lbl_Times3_2.Text))
                {
                    return(false);
                }
                pTimesInfo.SumBegin   = Convert.ToDouble(this.Txt_Times3_1.Text);
                pTimesInfo.SumStep    = Convert.ToDouble(this.Txt_Times3_2.Text);
                pTimesInfo.Type       = ConfigurationStatus.TimesType.Sum;
                pTimesInfo.TypeString = "累加利润";
            }
            else if (timesType == this.Rdb_Times4)
            {
                if (CommFunc.CheckTextBoxIsNull(this.Txt_Times4, this.Rdb_Times4.Text.Replace(":", "")))
                {
                    return(false);
                }
                List <string> list = CommFunc.SplitString(this.Txt_Times4.Text, ",", -1);
                foreach (string str in list)
                {
                    if (str != "")
                    {
                        pTimesInfo.FreeList.Add(Convert.ToInt32(str));
                    }
                }
                if (pTimesInfo.FreeList.Count != pTimesInfo.Cycle)
                {
                    CommFunc.PublicMessageAll("倍数的个数和周期不一致!", true, MessageBoxIcon.Asterisk, "");
                    this.Txt_Times4.Focus();
                    return(false);
                }
                pTimesInfo.Type       = ConfigurationStatus.TimesType.Free;
                pTimesInfo.TypeString = "自由倍数";
            }
            return(true);
        }
Exemplo n.º 3
0
        private bool GetTimesCount(ref ConfigurationStatus.TimesCount pTimesInfo)
        {
            pTimesInfo = new ConfigurationStatus.TimesCount();
            int num = Convert.ToInt32(this.Cbb_Cycle.Text);

            pTimesInfo.TBCycle = Convert.ToInt32(this.Cbb_TBCycle.Text);
            int num2 = num / pTimesInfo.TBCycle;

            if ((num % pTimesInfo.TBCycle) != 0)
            {
                num2++;
            }
            pTimesInfo.Cycle = num2;
            pTimesInfo.Start = Convert.ToDouble(this.Txt_Start.Text);
            pTimesInfo.Money = this.GetBetMoney();
            if (CommFunc.CheckTextBoxIsNull(this.Txt_Prize, this.Lbl_Prize.Text))
            {
                return(false);
            }
            int selectedIndex = this.Cbb_Unit.SelectedIndex;

            pTimesInfo.Mode = Convert.ToDouble(this.Txt_Prize.Text) / Math.Pow(10.0, (double)selectedIndex);
            if (CommFunc.CheckTextBoxIsNull(this.Txt_Number, this.Lbl_Number.Text))
            {
                return(false);
            }
            pTimesInfo.Number = this.GetNumber();
            RadioButton timesType = this.GetTimesType();

            if (timesType == this.Rdb_Times1)
            {
                pTimesInfo.GainRatio  = Convert.ToDouble(this.Cbb_Times1.Text);
                pTimesInfo.Type       = ConfigurationStatus.TimesType.GainRatio;
                pTimesInfo.TypeString = "收益率";
            }
            else if (timesType == this.Rdb_Times2)
            {
                if (CommFunc.CheckTextBoxIsNull(this.Txt_Times2, this.Rdb_Times2.Text.Replace(":", "")))
                {
                    return(false);
                }
                pTimesInfo.GainFix    = Convert.ToDouble(this.Txt_Times2.Text);
                pTimesInfo.Type       = ConfigurationStatus.TimesType.GainFix;
                pTimesInfo.TypeString = "固定利润";
            }
            else if (timesType == this.Rdb_Times3)
            {
                if (CommFunc.CheckTextBoxIsNull(this.Txt_Times3_1, this.Lbl_Times3_1.Text))
                {
                    return(false);
                }
                if (CommFunc.CheckTextBoxIsNull(this.Txt_Times3_2, this.Lbl_Times3_2.Text))
                {
                    return(false);
                }
                pTimesInfo.SumBegin   = Convert.ToDouble(this.Txt_Times3_1.Text);
                pTimesInfo.SumStep    = Convert.ToDouble(this.Txt_Times3_2.Text);
                pTimesInfo.Type       = ConfigurationStatus.TimesType.Sum;
                pTimesInfo.TypeString = "累加利润";
            }
            return(true);
        }