Example #1
0
        private void button37_Click(object sender, EventArgs e)
        {
            string[] strarray = this.tb_lajihao.Text.Split(',');

            if (strarray.Length <= 0)
            {
                MessageBox.Show("请填写删除的垃圾号,以逗号分割");
                return;
            }

            for (int i = 0; i < strarray.Length; i++)
            {
                NumberModel n = NumberModel.ToParse(strarray[i]);
                Del(n);
            }

            Print();
        }
Example #2
0
        private void CheckDelNumer()
        {
            DelnumberModels.Clear();

            #region 特殊杀号
            if (ck_ABCD.Checked)
            {
                Rule.Teshuhao.ABCD(ref DelnumberModels);
            }

            if (ck_AABC.Checked)
            {
                Teshuhao.AABC(ref DelnumberModels);
            }
            if (ck_AABB.Checked)
            {
                Teshuhao.AABB(ref DelnumberModels);
            }

            if (ck_AAAB.Checked)
            {
                Teshuhao.AAAB(ref DelnumberModels);
            }
            if (ck_AAAA.Checked)
            {
                Teshuhao.AAAA(ref DelnumberModels);
            }
            if (ck_不连.Checked)
            {
                Teshuhao.连(ref DelnumberModels);
            }
            if (ck_2个顺子.Checked)
            {
                Teshuhao.两个顺子(ref DelnumberModels);
            }

            if (ck_兄弟号.Checked)
            {
                Teshuhao.兄弟号(ref DelnumberModels);
            }

            if (ck_非兄弟号.Checked)
            {
                Teshuhao.非兄弟号(ref DelnumberModels);
            }
            if (ck_全大.Checked)
            {
                Teshuhao.全大(ref DelnumberModels);
            }
            if (ck_全小.Checked)
            {
                Teshuhao.全小(ref DelnumberModels);
            }
            if (ck_全奇.Checked)
            {
                Teshuhao.全奇(ref DelnumberModels);
            }
            if (ck_全偶.Checked)
            {
                Teshuhao.全偶(ref DelnumberModels);
            }
            if (ck_对数.Checked)
            {
                Teshuhao.对数(ref DelnumberModels);
            }
            if (ck_杀05.Checked)
            {
                Teshuhao.M05对数(ref DelnumberModels);
            }
            if (ck_杀16.Checked)
            {
                Teshuhao.M16对数(ref DelnumberModels);
            }
            if (ck_杀27.Checked)
            {
                Teshuhao.M27对数(ref DelnumberModels);
            }
            if (ck_杀38.Checked)
            {
                Teshuhao.M38对数(ref DelnumberModels);
            }
            if (ck_杀49.Checked)
            {
                Teshuhao.M49对数(ref DelnumberModels);
            }

            #region 杀指定连号

            if (ck_杀01.Checked)
            {
                Teshuhao.杀两位固定数(ref DelnumberModels, 0, 1);
            }
            if (ck_杀12.Checked)
            {
                Teshuhao.杀两位固定数(ref DelnumberModels, 1, 2);
            }
            if (ck_杀23.Checked)
            {
                Teshuhao.杀两位固定数(ref DelnumberModels, 2, 3);
            }
            if (ck_杀34.Checked)
            {
                Teshuhao.杀两位固定数(ref DelnumberModels, 3, 4);
            }
            if (ck_杀45.Checked)
            {
                Teshuhao.杀两位固定数(ref DelnumberModels, 4, 5);
            }
            if (ck_杀56.Checked)
            {
                Teshuhao.杀两位固定数(ref DelnumberModels, 5, 6);
            }
            if (ck_杀67.Checked)
            {
                Teshuhao.杀两位固定数(ref DelnumberModels, 6, 7);
            }

            if (ck_杀78.Checked)
            {
                Teshuhao.杀两位固定数(ref DelnumberModels, 7, 8);
            }
            if (ck_杀89.Checked)
            {
                Teshuhao.杀两位固定数(ref DelnumberModels, 8, 9);
            }
            if (ck_杀90.Checked)
            {
                Teshuhao.杀两位固定数(ref DelnumberModels, 9, 0);
            }



            if (ck_杀012.Checked)
            {
                Teshuhao.杀三位固定数(ref DelnumberModels, 0, 1, 2);
            }
            if (ck_杀123.Checked)
            {
                Teshuhao.杀三位固定数(ref DelnumberModels, 1, 2, 3);
            }
            if (ck_杀234.Checked)
            {
                Teshuhao.杀三位固定数(ref DelnumberModels, 2, 3, 4);
            }

            if (ck_杀345.Checked)
            {
                Teshuhao.杀三位固定数(ref DelnumberModels, 3, 4, 5);
            }
            if (ck_杀456.Checked)
            {
                Teshuhao.杀三位固定数(ref DelnumberModels, 4, 5, 6);
            }
            if (ck_杀567.Checked)
            {
                Teshuhao.杀三位固定数(ref DelnumberModels, 5, 6, 7);
            }

            if (ck_杀678.Checked)
            {
                Teshuhao.杀三位固定数(ref DelnumberModels, 6, 7, 8);
            }
            if (ck_杀789.Checked)
            {
                Teshuhao.杀三位固定数(ref DelnumberModels, 7, 8, 9);
            }
            if (ck_杀890.Checked)
            {
                Teshuhao.杀三位固定数(ref DelnumberModels, 8, 9, 0);
            }
            if (ck_杀901.Checked)
            {
                Teshuhao.杀三位固定数(ref DelnumberModels, 9, 0, 1);
            }

            #endregion

            if (ck_杀00.Checked)
            {
                Teshuhao.杀两重号(ref DelnumberModels, 0);
            }
            if (ck_杀11.Checked)
            {
                Teshuhao.杀两重号(ref DelnumberModels, 1);
            }
            if (ck_杀22.Checked)
            {
                Teshuhao.杀两重号(ref DelnumberModels, 2);
            }
            if (ck_杀33.Checked)
            {
                Teshuhao.杀两重号(ref DelnumberModels, 3);
            }
            if (ck_杀44.Checked)
            {
                Teshuhao.杀两重号(ref DelnumberModels, 4);
            }
            if (ck_杀55.Checked)
            {
                Teshuhao.杀两重号(ref DelnumberModels, 5);
            }
            if (ck_杀66.Checked)
            {
                Teshuhao.杀两重号(ref DelnumberModels, 6);
            }
            if (ck_杀77.Checked)
            {
                Teshuhao.杀两重号(ref DelnumberModels, 7);
            }
            if (ck_杀88.Checked)
            {
                Teshuhao.杀两重号(ref DelnumberModels, 8);
            }
            if (ck_杀99.Checked)
            {
                Teshuhao.杀两重号(ref DelnumberModels, 9);
            }

            #region 杀指定双重号
            #endregion

            #endregion

            #region 点杀区域


            if (ck_点杀大小.Checked && !string.IsNullOrEmpty(this.tb_点杀大小.Text))
            {
                string[] array = this.tb_点杀大小.Text.Split(',');
                Diansha.大小enter(array, ref DelnumberModels);
            }

            if (ck_点杀奇偶.Checked && !string.IsNullOrEmpty(this.tb_点杀奇偶.Text))
            {
                string[] array = this.tb_点杀奇偶.Text.Split(',');
                Diansha.奇偶enter(array, ref DelnumberModels);
            }

            if (ck_点杀质合.Checked && !string.IsNullOrEmpty(this.tb_点杀质合.Text))
            {
                string[] array = this.tb_点杀质合.Text.Split(',');
                Diansha.质合enter(array, ref DelnumberModels);
            }
            if (ck_点杀012.Checked && !string.IsNullOrEmpty(this.tb_点杀012.Text))
            {
                string[] array = this.tb_点杀012.Text.Split(',');
                Diansha.L012enter(array, ref DelnumberModels);
            }
            if (ck_垃圾号.Checked && !string.IsNullOrEmpty(this.tb_垃圾号.Text))
            {
                string[] array = this.tb_垃圾号.Text.Split(' ');

                List <NumberModel> list = new List <NumberModel>();

                foreach (var n in array)
                {
                    if (!string.IsNullOrEmpty(n.Trim(' ').Trim('\r').Trim('\n')))
                    {
                        NumberModel number = NumberModel.ToParse(n);
                        list.Add(number);
                    }
                }
                lajihao.Enter(list, ref DelnumberModels);
            }


            #endregion

            #region 和值区域

            if (ck_四位和值.Checked && !string.IsNullOrEmpty(tb_四位和值.Text))
            {
                string[] array = this.tb_四位和值.Text.Split(',');
                int[]    iNums = Array.ConvertAll(array, int.Parse);

                hezhishahao.四位和值(iNums, ref DelnumberModels);
            }


            if (ck_前三和值.Checked && !string.IsNullOrEmpty(tb_前三和值.Text))
            {
                string[] array = this.tb_前三和值.Text.Split(',');
                int[]    iNums = Array.ConvertAll(array, int.Parse);

                hezhishahao.前三和值(iNums, ref DelnumberModels);
            }
            if (ck_后三和值.Checked && !string.IsNullOrEmpty(tb_后三和值.Text))
            {
                string[] array = this.tb_后三和值.Text.Split(',');
                int[]    iNums = Array.ConvertAll(array, int.Parse);

                hezhishahao.后三和值(iNums, ref DelnumberModels);
            }

            if (ck_前二和值.Checked && !string.IsNullOrEmpty(tb_前二和值.Text))
            {
                string[] array = this.tb_前二和值.Text.Split(',');
                int[]    iNums = Array.ConvertAll(array, int.Parse);

                hezhishahao.前二和值(iNums, ref DelnumberModels);
            }
            if (ck_中二和值.Checked && !string.IsNullOrEmpty(tb_中二和值.Text))
            {
                string[] array = this.tb_中二和值.Text.Split(',');
                int[]    iNums = Array.ConvertAll(array, int.Parse);

                hezhishahao.中二和值(iNums, ref DelnumberModels);
            }
            if (ck_后二和值.Checked && !string.IsNullOrEmpty(tb_后二和值.Text))
            {
                string[] array = this.tb_后二和值.Text.Split(',');
                int[]    iNums = Array.ConvertAll(array, int.Parse);

                hezhishahao.后二和值(iNums, ref DelnumberModels);
            }
            if (ck_千百个和值.Checked && !string.IsNullOrEmpty(tb_千百个和值.Text))
            {
                string[] array = this.tb_千百个和值.Text.Split(',');
                int[]    iNums = Array.ConvertAll(array, int.Parse);

                hezhishahao.千百个和值(iNums, ref DelnumberModels);
            }
            if (ck_千十个和值.Checked && !string.IsNullOrEmpty(tb_千十个和值.Text))
            {
                string[] array = this.tb_千十个和值.Text.Split(',');
                int[]    iNums = Array.ConvertAll(array, int.Parse);

                hezhishahao.千十个和值(iNums, ref DelnumberModels);
            }


            if (ck_奇数和值.Checked && !string.IsNullOrEmpty(tb_奇数和值.Text))
            {
                string[] array = this.tb_奇数和值.Text.Split(',');
                int[]    iNums = Array.ConvertAll(array, int.Parse);

                hezhishahao.奇数和值(iNums, ref DelnumberModels);
            }
            if (ck_偶数和值.Checked && !string.IsNullOrEmpty(tb_偶数和值.Text))
            {
                string[] array = this.tb_偶数和值.Text.Split(',');
                int[]    iNums = Array.ConvertAll(array, int.Parse);

                hezhishahao.偶数和值(iNums, ref DelnumberModels);
            }

            if (ck_千个和值.Checked && !string.IsNullOrEmpty(tb_千个和值.Text))
            {
                string[] array = this.tb_千个和值.Text.Split(',');
                int[]    iNums = Array.ConvertAll(array, int.Parse);

                hezhishahao.千个和值(iNums, ref DelnumberModels);
            }
            if (ck_千十和值.Checked && !string.IsNullOrEmpty(tb_千十和值.Text))
            {
                string[] array = this.tb_千十和值.Text.Split(',');
                int[]    iNums = Array.ConvertAll(array, int.Parse);

                hezhishahao.千十和值(iNums, ref DelnumberModels);
            }
            if (ck_百个和值.Checked && !string.IsNullOrEmpty(tb_百个和值.Text))
            {
                string[] array = this.tb_百个和值.Text.Split(',');
                int[]    iNums = Array.ConvertAll(array, int.Parse);

                hezhishahao.百个和值(iNums, ref DelnumberModels);
            }

            #endregion

            #region 杀定位区域

            if (ck_杀定位.Checked)
            {
                List <int> qian = new List <int>();
                List <int> bai  = new List <int>();
                List <int> shi  = new List <int>();
                List <int> ge   = new List <int>();

                foreach (var item in panel_qian.Controls)
                {
                    if (item is CheckBox)
                    {
                        CheckBox cb = (CheckBox)item;
                        if (cb.Checked)
                        {
                            qian.Add(int.Parse(cb.Text));
                        }
                    }
                }
                foreach (var item in panel_bai.Controls)
                {
                    if (item is CheckBox)
                    {
                        CheckBox cb = (CheckBox)item;
                        if (cb.Checked)
                        {
                            bai.Add(int.Parse(cb.Text));
                        }
                    }
                }
                foreach (var item in panel_shi.Controls)
                {
                    if (item is CheckBox)
                    {
                        CheckBox cb = (CheckBox)item;
                        if (cb.Checked)
                        {
                            shi.Add(int.Parse(cb.Text));
                        }
                    }
                }
                foreach (var item in panel_ge.Controls)
                {
                    if (item is CheckBox)
                    {
                        CheckBox cb = (CheckBox)item;
                        if (cb.Checked)
                        {
                            ge.Add(int.Parse(cb.Text));
                        }
                    }
                }
                shadingwei.Enter(qian, bai, shi, ge, ref DelnumberModels);
            }



            #endregion



            #region 杀连号

            if (ck_无序2连.Checked)
            {
                shalianhao.无序2连(this.ck_首尾相连.Checked, this.ck_09相连.Checked, ref DelnumberModels);
            }
            if (ck_无序3连.Checked)
            {
                shalianhao.无序3连(this.ck_首尾相连.Checked, this.ck_09相连.Checked, ref DelnumberModels);
            }
            if (ck_无序4连.Checked)
            {
                shalianhao.无序4连(this.ck_首尾相连.Checked, this.ck_09相连.Checked, ref DelnumberModels);
            }



            if (ck_正向2连.Checked)
            {
                shalianhao.正向2连(this.ck_首尾相连.Checked, this.ck_09相连.Checked, ref DelnumberModels);
            }
            if (ck_正向3连.Checked)
            {
                shalianhao.正向3连(this.ck_首尾相连.Checked, this.ck_09相连.Checked, ref DelnumberModels);
            }
            if (ck_正向4连.Checked)
            {
                shalianhao.正向4连(this.ck_首尾相连.Checked, this.ck_09相连.Checked, ref DelnumberModels);
            }


            if (ck_反向2连.Checked)
            {
                shalianhao.反向2连(this.ck_首尾相连.Checked, this.ck_09相连.Checked, ref DelnumberModels);
            }
            if (ck_反向3连.Checked)
            {
                shalianhao.反向3连(this.ck_首尾相连.Checked, this.ck_09相连.Checked, ref DelnumberModels);
            }
            if (ck_反向4连.Checked)
            {
                shalianhao.反向4连(this.ck_首尾相连.Checked, this.ck_09相连.Checked, ref DelnumberModels);
            }

            #endregion


            #region 两数和值

            if (ck_两数和值.Checked && !string.IsNullOrEmpty(tb_两数和值.Text))
            {
                string[]   array = this.tb_两数和值.Text.Split(',');
                int[]      iNums = Array.ConvertAll(array, int.Parse);
                List <int> list  = iNums.ToList();
                dingliangshuhezhi.两数和值(list, ref DelnumberModels);
            }

            if (ck_三数和值.Checked && !string.IsNullOrEmpty(tb_三数和值.Text))
            {
                string[]   array = this.tb_三数和值.Text.Split(',');
                int[]      iNums = Array.ConvertAll(array, int.Parse);
                List <int> list  = iNums.ToList();
                dingliangshuhezhi.数和值(list, ref DelnumberModels);
            }

            #endregion


            #region   字现

            if (this.ck_sanzixian.Checked)
            {
                char[] psan = tb_sanzixian.Text.ToCharArray();
                if (psan.Length > 4)
                {
                    MessageBox.Show("上期号码长度大于4");
                    return;
                }
                List <int> sanlist = new List <int>();

                foreach (var item in psan)
                {
                    sanlist.Add(Convert.ToInt32(item.ToString()));
                }

                SanZiXian(sanlist, ref DelnumberModels);
            }


            #endregion



            #region 杀胆码 杀跨度  杀胆必须是最后一项

            if (ck_杀跨度.Checked)
            {
                List <int> kuada = new List <int>();
                foreach (var item in groupBox11.Controls)
                {
                    if (item is CheckBox)
                    {
                        CheckBox cb = (CheckBox)item;
                        if (cb.Checked && cb.Name != "ck_杀跨度")
                        {
                            kuada.Add(int.Parse(cb.Text));
                        }
                    }
                }
                shakuadu.Enter(kuada, ref DelnumberModels);
            }

            if (ck_杀胆码.Checked)
            {
                List <int> danma = new List <int>();
                foreach (var item in groupBox10.Controls)
                {
                    if (item is CheckBox)
                    {
                        CheckBox cb = (CheckBox)item;
                        if (cb.Checked && cb.Name != "ck_杀胆码")
                        {
                            danma.Add(int.Parse(cb.Text));
                        }
                    }
                }
                shadanma.ShaWuYiMa(danma, ref DelnumberModels);
            }



            #endregion
            // 杀胆码必须是最后一项
        }