123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980 |
- using System;
- using System.Collections.Generic;
- using System.Web;
- using System.Web.UI;
- using System.Web.UI.WebControls;
- using System.Collections;
- using System.Text;
- using CB.Common;
- namespace CB.Web.tool_old
- {
- public partial class _3dss_zx_post : System.Web.UI.Page
- {
- //选择的数字
- private string bwString;
- private string[] bwArray;
- //杀号的数字
- private string pbwString;
- private int pbh; //杀号的方式[排除选中的|包含选中的]
- //胆码过滤
- private string dbwString;
- //二码和
- private string str_emh;
- private int emhh;
- //二码差
- private string str_emc;
- private int emch;
- //012路
- private string str_012;
- private int lubh;
- //二码过滤
- private string twoString;
- private int emhb;
- //和值
- private string hzString;
- private int hzhb;
- //和尾
- private string hwString;
- private int hwhb;
- //跨度
- private string kdString;
- private int kdhb;
- //大小
- private string dxString;
- private int dxhb;
- //奇偶
- private string joString;
- private int johb;
- //质合
- private string zhString;
- private int zhhb;
- //顺子
- private int szbl;
- private int zuhe3;
- private int zuhe6;
- //大底
- private string dadihao;
- private int dzhixuan; //大底的直选或组选
- private ArrayList Number = new ArrayList();
- public System.Text.StringBuilder NumberString = new System.Text.StringBuilder();
- public System.Text.StringBuilder numValue = new System.Text.StringBuilder();
- public int zhushu;
- public string type;
- public string message;
- public bool flag = true;
- public string filename = "3D过滤缩水结果号码(组选版)";
- //记录用户过滤数据/条件相关
- private string sourcedata = "";
- private string condition = "";
- private string tpzx = "";
- protected void Page_Load(object sender, EventArgs e)
- {
- GetValue();
- if (string.IsNullOrEmpty(bwString) && string.IsNullOrEmpty(dadihao))
- {
- message = "没有选择条件一中号码 或 大底框中无内容";
- flag = false;
- return;
- }
- else
- {
- Number = numberArray(); //生成基本组合
- }
- //号码过滤
- numberFilter(pbwString, 0, pbh);
- numberFilter(pbwString, 1, pbh);
- numberFilter(pbwString, 2, pbh);
- //胆码过滤
- dmFilter(dbwString, dbwString, dbwString);
- //二码和过滤
- emhFilter(str_emh, emhh);
- //二码差过滤
- emcFilter(str_emc, emch);
- //二码过滤
- twoFilter(twoString, emhb);
- //012路过滤
- Filter_012(str_012, lubh);
- //和值过滤
- hzFilter(hzString, hzhb);
- //和尾
- hwFilter(hwString, hwhb);
- //跨度
- kdFilter(kdString, kdhb);
- //大小过滤
- dxFilter(dxString, dxhb);
- //奇偶过滤
- joFilter(joString, johb);
- //质合过滤
- zhFilter(zhString, zhhb);
- //顺子过滤
- if (szbl != 0)
- FilterSz();
- Number = ToolsUtils.zuhebFilter(Number, 0);
- //组三过滤
- if (zuhe3 == 0)
- {
- Number = ToolsUtils.zuhe3Filter(Number, zuhe3);
- tpzx += "组三,";
- }
- //组六过滤
- if (zuhe6 == 0)
- {
- Number = ToolsUtils.zuhe6Filter(Number, zuhe6);
- tpzx += "组六";
- }
- condition += "组选:" + tpzx;
- ///生成组选结果
- Number = ToolsUtils.zuheFilter(Number);
- chArray(); //过滤重号
- //输出
- for (int i = 0; i < Number.Count; i++)
- {
- NumberString.Append(Number[i].ToString() + " ");
- numValue.Append(Number[i].ToString() + " ");
- }
- zhushu = Number.Count;
- }
- #region 去除重号
- private void chArray()
- {
- ArrayList al = new ArrayList();
- for (int i = 0; i < Number.Count; i++)
- {
- if (!al.Contains(Number[i]))
- al.Add(Number[i]);
- }
- Number.Clear();
- Number = al;
- }
- #endregion
- #region 顺子过滤
- /// <summary>
- /// 顺子过滤 2011-1-18 添加
- /// </summary>
- private void FilterSz()
- {
- ArrayList Tmp = new ArrayList();
- ArrayList temp = new ArrayList();
- int tp1 = 0;
- int tp2 = 0;
- int tp3 = 0;
- for (int i = 0; i < Number.Count; i++)
- {
- temp.Clear();
- char[] tpchar = Number[i].ToString().ToCharArray();
- temp.Add(tpchar[0].ToString());
- temp.Add(tpchar[1].ToString());
- temp.Add(tpchar[2].ToString());
- temp.Sort();
- tp1 = Math.Abs(Convert.ToInt32(temp[0]) - Convert.ToInt32(temp[1]));
- tp2 = Math.Abs(Convert.ToInt32(temp[1]) - Convert.ToInt32(temp[2]));
- tp3 = Math.Abs(Convert.ToInt32(temp[2]) - Convert.ToInt32(temp[0]));
- if (szbl == 1)
- {
- if (!(tp1 == 1 && tp2 == 1))
- {
- Tmp.Add(Number[i]);
- }
- }
- else
- {
- if (!(tp1 == 1 || tp2 == 1 || tp3 == 1))
- {
- Tmp.Add(Number[i]);
- }
- }
- }
- if (Tmp.Count > 0)
- {
- Number.Clear();
- Number = Tmp;
- }
- condition += "顺子:" + szbl.ToString() + "@";
- }
- #endregion
- #region 质合
- private void zhFilter(string str, int iskill)
- {
- string _str = str.Trim();
- if (string.IsNullOrEmpty(_str))
- {
- return;
- }
- else
- {
- ArrayList tempNumber = new ArrayList();
- for (int i = 0; i < Number.Count; i++)
- {
- string tpstr = string.Empty;
- int tp = 0;
- int tpa = Convert.ToInt32(Number[i].ToString().Substring(0, 1));
- int tpb = Convert.ToInt32(Number[i].ToString().Substring(1, 1));
- int tpc = Convert.ToInt32(Number[i].ToString().Substring(2, 1));
- if (tpa == 1 || tpa == 2 || tpa == 3 || tpa == 5 || tpa == 7)
- { tp++; }
- if (tpb == 1 || tpb == 2 || tpb == 3 || tpb == 5 || tpb == 7)
- { tp++; }
- if (tpc == 1 || tpc == 2 || tpc == 3 || tpc == 5 || tpc == 7)
- { tp++; }
- if (tp == 0)
- { tpstr = "全合"; }
- if (tp == 1)
- { tpstr = "两合一质"; }
- if (tp == 2)
- { tpstr = "两质一合"; }
- if (tp == 3)
- { tpstr = "全质"; }
- if (iskill == 0)
- {
- if (_str.IndexOf(tpstr) == -1)
- { tempNumber.Add(Number[i]); }
- }
- else
- {
- if (_str.IndexOf(tpstr) != -1)
- { tempNumber.Add(Number[i]); }
- }
- }
- Number.Clear();
- Number = tempNumber;
- condition += "质合:" + iskill.ToString() + "#" + str + "@";
- }
- }
- #endregion
- #region 奇偶过滤
- private void joFilter(string str, int iskill)
- {
- string _str = str.Trim();
- if (string.IsNullOrEmpty(_str))
- {
- return;
- }
- else
- {
- ArrayList tempNumber = new ArrayList();
- for (int i = 0; i < Number.Count; i++)
- {
- int tp = 0;
- string tpstr = string.Empty;
- if (Convert.ToInt32(Number[i].ToString().Substring(0, 1)) % 2 == 0)
- { tp++; }
- if (Convert.ToInt32(Number[i].ToString().Substring(1, 1)) % 2 == 0)
- { tp++; }
- if (Convert.ToInt32(Number[i].ToString().Substring(2, 1)) % 2 == 0)
- { tp++; }
- if (tp == 0)
- { tpstr = "全奇"; }
- if (tp == 1)
- { tpstr = "两奇一偶"; }
- if (tp == 2)
- { tpstr = "两偶一奇"; }
- if (tp == 3)
- { tpstr = "全偶"; }
- if (iskill == 0)
- {
- if (_str.IndexOf(tpstr) == -1)
- { tempNumber.Add(Number[i]); }
- }
- else
- {
- if (_str.IndexOf(tpstr) != -1)
- { tempNumber.Add(Number[i]); }
- }
- }
- Number.Clear();
- Number = tempNumber;
- condition += "奇偶:" + iskill.ToString() + "#" + _str + "@";
- }
- }
- #endregion
- #region 大小过滤
- private void dxFilter(string str, int iskill)
- {
- string _str = str.Trim();
- if (string.IsNullOrEmpty(_str))
- {
- return;
- }
- else
- {
- ArrayList tempNumber = new ArrayList();
- for (int i = 0; i < Number.Count; i++)
- {
- int tp = 0;
- string tpstr = string.Empty;
- if (Convert.ToInt32(Number[i].ToString().Substring(0, 1)) >= 5)
- { tp++; }
- if (Convert.ToInt32(Number[i].ToString().Substring(1, 1)) >= 5)
- { tp++; }
- if (Convert.ToInt32(Number[i].ToString().Substring(2, 1)) >= 5)
- { tp++; }
- if (tp == 0)
- { tpstr = "全小"; }
- if (tp == 1)
- { tpstr = "两小一大"; }
- if (tp == 2)
- { tpstr = "两大一小"; }
- if (tp == 3)
- { tpstr = "全大"; }
- if (iskill == 0)
- {
- if (_str.IndexOf(tpstr) == -1)
- { tempNumber.Add(Number[i]); }
- }
- else
- {
- if (_str.IndexOf(tpstr) != -1)
- { tempNumber.Add(Number[i]); }
- }
- }
- Number.Clear();
- Number = tempNumber;
- condition += "大小:" + iskill.ToString() + "#" + _str + "@";
- }
- }
- #endregion
- #region 跨度过滤
- private void kdFilter(string str, int iskill)
- {
- ArrayList tempNumber = new ArrayList();
- if (string.IsNullOrEmpty(str))
- {
- return;
- }
- else
- {
- int kd = 0;
- ArrayList kdArray = new ArrayList();
- for (int i = 0; i < Number.Count; i++)
- {
- kd = 0;
- kdArray.Clear();
- for (int a = 0; a < Number[i].ToString().Length; a++)
- {
- kdArray.Add(Number[i].ToString().Substring(a, 1));
- }
- kdArray.Sort();
- kd = System.Math.Abs(Convert.ToInt32(kdArray[2]) - Convert.ToInt32(kdArray[0]));
- if (iskill == 0)
- {
- if (!string.IsNullOrEmpty(str) && str.Trim().IndexOf(kd.ToString()) != -1)
- {
- }
- else
- {
- tempNumber.Add(Number[i]);
- }
- }
- else
- {
- if (!string.IsNullOrEmpty(str) && str.Trim().IndexOf(kd.ToString()) != -1)
- {
- tempNumber.Add(Number[i]);
- }
- }
- }
- condition += "跨度:" + iskill.ToString() + "#" + str + "@";
- }
- Number.Clear();
- Number = tempNumber;
- }
- #endregion
- #region 和尾
- private void hwFilter(string str, int iskill)
- {
- ArrayList tempNumber = new ArrayList();
- if (string.IsNullOrEmpty(str))
- {
- return;
- }
- else
- {
- int hw = 0;
- for (int i = 0; i < Number.Count; i++)
- {
- hw = 0;
- for (int a = 0; a < Number[i].ToString().Length; a++)
- {
- hw = hw + Convert.ToInt32(Number[i].ToString().Substring(a, 1));
- }
- hw = Convert.ToInt32(hw.ToString("00").Substring(1, 1));
- if (iskill == 0)
- {
- if (!string.IsNullOrEmpty(str) && str.Trim().IndexOf(hw.ToString()) != -1)
- {
- }
- else
- {
- tempNumber.Add(Number[i]);
- }
- }
- else
- {
- if (!string.IsNullOrEmpty(str) && str.Trim().IndexOf(hw.ToString()) != -1)
- {
- tempNumber.Add(Number[i]);
- }
- }
- }
- condition += "和尾:" + iskill.ToString() + "#" + str + "@";
- }
- Number.Clear();
- Number = tempNumber;
- }
- #endregion
- #region 和值
- private void hzFilter(string str, int iskill)
- {
- ArrayList tempNumber = new ArrayList();
- if (string.IsNullOrEmpty(str))
- {
- return;
- }
- else
- {
- ArrayList hzArray = null;
- if (!string.IsNullOrEmpty(str))
- { hzArray = new ArrayList(str.Trim().Split(',')); }
- else
- {
- return;
- }
- int hz = 0;
- for (int i = 0; i < Number.Count; i++)
- {
- hz = Convert.ToInt32(Number[i].ToString().Substring(0, 1)) + Convert.ToInt32(Number[i].ToString().Substring(1, 1)) + Convert.ToInt32(Number[i].ToString().Substring(2, 1));
- if (iskill == 0)
- {
- if (!hzArray.Contains(hz.ToString()))
- {
- tempNumber.Add(Number[i]);
- }
- }
- else
- {
- if (hzArray.Contains(hz.ToString()))
- {
- tempNumber.Add(Number[i]);
- }
- }
- }
- condition += "和值:" + iskill.ToString() + "#" + str + "@";
- }
- Number.Clear();
- Number = tempNumber;
- }
- #endregion
- #region 012路过滤
- private void Filter_012(string str, int iskill)
- {
- string _str = str.Trim();
- if (string.IsNullOrEmpty(_str))
- {
- return;
- }
- else
- {
- ArrayList tempNumber = new ArrayList();
- string tp012 = string.Empty;
- for (int i = 0; i < Number.Count; i++)
- {
- int[] tp = { 0, 0, 0 };
- tp[Convert.ToInt32(Number[i].ToString().Substring(0, 1)) % 3]++;
- tp[Convert.ToInt32(Number[i].ToString().Substring(1, 1)) % 3]++;
- tp[Convert.ToInt32(Number[i].ToString().Substring(2, 1)) % 3]++;
- if (tp[0] == 1 && tp[1] == 1 && tp[2] == 1)
- { tp012 = "各1个"; }
- if (tp[0] == 2)
- { tp012 = "2个0"; }
- if (tp[0] == 3)
- { tp012 = "3个0"; }
- if (tp[1] == 2)
- { tp012 = "2个1"; }
- if (tp[1] == 3)
- { tp012 = "3个1"; }
- if (tp[2] == 2)
- { tp012 = "2个2"; }
- if (tp[2] == 3)
- { tp012 = "3个2"; }
- if (iskill == 0)
- {
- if (_str.IndexOf(tp012) == -1)
- { tempNumber.Add(Number[i]); }
- }
- else
- {
- if (_str.IndexOf(tp012) != -1)
- { tempNumber.Add(Number[i]); }
- }
- }
- Number.Clear();
- Number = tempNumber;
- condition += "012路:" + iskill.ToString() + "#" + _str + "@";
- }
- }
- #endregion
- #region 二码差过滤
- private void emcFilter(string str, int iskill)
- {
- ArrayList tempNumber = new ArrayList();
- if (string.IsNullOrEmpty(str))
- {
- return;
- }
- else
- {
- ArrayList emc = new ArrayList();
- int add;
- for (int i = 0; i < Number.Count; i++)
- {
- add = 0;
- emc = GetEmHC(Number[i].ToString(), 1);
- for (int j = 0; j < emc.Count; j++)
- {
- if (iskill == 0) //排除选中
- {
- if (str.IndexOf(emc[j].ToString()) != -1)
- {
- add = 0;
- break;
- }
- else
- {
- add = 1;
- }
- }
- else //包含选中
- {
- if (str.IndexOf(emc[j].ToString()) != -1)
- {
- add = 1;
- break;
- }
- }
- }
- if (add == 1) tempNumber.Add(Number[i]);
- }
- condition += "二码差:" + iskill.ToString() + "#" + str + "@";
- }
- Number.Clear();
- Number = tempNumber;
- }
- #endregion
- #region 二码过滤
- private void twoFilter(string str, int iskill)
- {
- ArrayList tempNumber = new ArrayList();
- if (string.IsNullOrEmpty(str))
- {
- return;
- }
- else
- {
- string t1 = string.Empty;
- string t2 = string.Empty;
- string t3 = string.Empty;
- string t4 = string.Empty;
- string t5 = string.Empty;
- string t6 = string.Empty;
- for (int i = 0; i < Number.Count; i++)
- {
- t1 = Number[i].ToString().Substring(0, 1) + Number[i].ToString().Substring(1, 1);
- t4 = Number[i].ToString().Substring(1, 1) + Number[i].ToString().Substring(0, 1);
- t2 = Number[i].ToString().Substring(1, 1) + Number[i].ToString().Substring(2, 1);
- t5 = Number[i].ToString().Substring(2, 1) + Number[i].ToString().Substring(1, 1);
- t3 = Number[i].ToString().Substring(0, 1) + Number[i].ToString().Substring(2, 1);
- t6 = Number[i].ToString().Substring(2, 1) + Number[i].ToString().Substring(0, 1);
- if (iskill == 0)
- {
- if (!string.IsNullOrEmpty(str) && (str.Trim().IndexOf(t1) >= 0 || str.Trim().IndexOf(t2) >= 0 || str.Trim().IndexOf(t3) >= 0 || str.Trim().IndexOf(t4) >= 0 || str.Trim().IndexOf(t5) >= 0 || str.Trim().IndexOf(t6) >= 0))
- { }
- else
- {
- tempNumber.Add(Number[i]);
- }
- }
- else
- {
- if (!string.IsNullOrEmpty(str) && (str.Trim().IndexOf(t1) >= 0 || str.Trim().IndexOf(t2) >= 0 || str.Trim().IndexOf(t3) >= 0 || str.Trim().IndexOf(t4) >= 0 || str.Trim().IndexOf(t5) >= 0 || str.Trim().IndexOf(t6) >= 0))
- {
- tempNumber.Add(Number[i]);
- }
- }
- }
- condition += "二码:" + iskill.ToString() + "#" + str + "@";
- }
- Number.Clear();
- Number = tempNumber;
- }
- #endregion
- #region 二码和过滤
- private void emhFilter(string str, int iskill)
- {
- ArrayList tempNumber = new ArrayList();
- if (string.IsNullOrEmpty(str))
- {
- return;
- }
- else
- {
- ArrayList filterList = new ArrayList();
- ArrayList emh = new ArrayList();
- string[] tmpFilter = str.Split(',');
- for (int i = 0; i < tmpFilter.Length; i++)
- filterList.Add(Convert.ToInt32(tmpFilter[i]));
- int add;
- for (int i = 0; i < Number.Count; i++)
- {
- add = 0;
- emh = GetEmHC(Number[i].ToString(), 0);
- for (int j = 0; j < emh.Count; j++)
- {
- if (iskill == 0) //排除选中
- {
- if (filterList.Contains(emh[j]))
- {
- add = 0;
- break;
- }
- else
- {
- add = 1;
- }
- }
- else //包含选中
- {
- if (filterList.Contains(emh[j]))
- {
- add = 1;
- break;
- }
- }
- }
- if (add == 1) tempNumber.Add(Number[i]);
- }
- condition += "二码和:" + iskill.ToString() + "#" + str + "@";
- }
- Number.Clear();
- Number = tempNumber;
- }
- #endregion
- #region 胆码过滤
- private void dmFilter(string str, string str1, string str2)
- {
- ArrayList tempNumber = new ArrayList();
- if (string.IsNullOrEmpty(str) && string.IsNullOrEmpty(str1) && string.IsNullOrEmpty(str2))
- {
- return;
- }
- else
- {
- for (int i = 0; i < Number.Count; i++)
- {
- if ((!string.IsNullOrEmpty(str) && str.Trim().IndexOf(Number[i].ToString().Substring(0, 1)) != -1) || (!string.IsNullOrEmpty(str1) && str1.Trim().IndexOf(Number[i].ToString().Substring(1, 1)) != -1) || (!string.IsNullOrEmpty(str2) && str2.Trim().IndexOf(Number[i].ToString().Substring(2, 1)) != -1))
- {
- tempNumber.Add(Number[i]);
- }
- }
- condition += "胆码:" + str + "@";
- }
- Number.Clear();
- Number = tempNumber;
- }
- #endregion
- #region 号码过滤
- /// <summary>
- /// 号码过滤
- /// </summary>
- /// <param name="str">被过滤的号码</param>
- /// <param name="a">位数</param>
- /// <param name="iskill">过滤</param>
- private void numberFilter(string str, int a, int iskill)
- {
- ArrayList tempNumber = new ArrayList();
- if (string.IsNullOrEmpty(str))
- {
- return;
- }
- else
- {
- for (int i = 0; i < Number.Count; i++)
- {
- if (iskill == 0)
- {
- if (!string.IsNullOrEmpty(str) && str.Trim().IndexOf(Number[i].ToString().Substring(a, 1)) >= 0)
- { }
- else
- {
- tempNumber.Add(Number[i]);
- }
- }
- }
- if (a == 0)
- {
- condition += "杀号:" + str + "@";
- }
- }
- Number.Clear();
- Number = tempNumber;
- }
- #endregion
- #region 生成号码组合
- /// <summary>
- /// 生成选择的数据组合
- /// </summary>
- /// <returns>ArrayList</returns>
- private ArrayList numberArray()
- {
- ArrayList Number = new ArrayList();
- string strs = string.Empty;
- if (!string.IsNullOrEmpty(bwString))
- {
- strs = bwString;
- sourcedata = "定位:" + bwString;
- }
- if (strs.Length > 0) //根据选号生成号码
- {
- bwArray = bwString.Split(',');
- for (int a = 0; a < bwArray.Length; a++)
- {
- for (int b = 0; b < bwArray.Length; b++)
- {
- for (int c = 0; c < bwArray.Length; c++)
- {
- Number.Add(bwArray[a] + bwArray[b] + bwArray[c]);
- }
- }
- }
- }
- else if (!string.IsNullOrEmpty(dadihao)) //根据
- {
- dadihao = dadihao.Replace("\r\n", ",");
- dadihao = dadihao.Replace(" ", ",");
- dadihao = dadihao.Replace(" ", ",");
- string[] Numbers = dadihao.Split(',');
- for (int i = 0; i < Numbers.Length; i++) //去除位数不对的数据和重复的数据
- {
- int outresult;
- if (Numbers[i].Trim().Length == 3 && !Number.Contains(Numbers[i]) && Int32.TryParse(Numbers[i], out outresult))
- {
- Number.Add(Numbers[i]);
- sourcedata = sourcedata + Numbers[i] + ",";
- }
- }
- if (dzhixuan == 1) //用户选择了组选
- {
- ArrayList al = new ArrayList();
- string t1 = string.Empty;
- string t2 = string.Empty;
- string t3 = string.Empty;
- string t = string.Empty;
- for (int i = 0; i < Number.Count; i++)
- {
- t1 = Number[i].ToString().Substring(0, 1);
- t2 = Number[i].ToString().Substring(1, 1);
- t3 = Number[i].ToString().Substring(2, 1);
- al.Add(t1 + t2 + t3);
- al.Add(t1 + t3 + t2);
- al.Add(t2 + t1 + t3);
- al.Add(t2 + t3 + t1);
- al.Add(t3 + t1 + t2);
- al.Add(t3 + t2 + t1);
- }
- Number.Clear();
- Number = al;
- sourcedata = "大底#" + sourcedata;
- }
- }
- return Number;
- }
- #endregion
- #region 获取二码和差
- private static ArrayList GetEmHC(string str, int tp) //tp 0为和,1为差
- {
- int a, b, c;
- int hc1, hc2, hc3;
- ArrayList arr = new ArrayList();
- a = Convert.ToInt32(str.Substring(0, 1));
- b = Convert.ToInt32(str.Substring(1, 1));
- c = Convert.ToInt32(str.Substring(2, 1));
- if (tp == 0)
- {
- hc1 = a + b;
- hc2 = a + c;
- hc3 = b + c;
- }
- else
- {
- hc1 = Math.Abs(a - b);
- hc2 = Math.Abs(a - c);
- hc3 = Math.Abs(b - c);
- }
- arr.Add(hc1);
- if (!arr.Contains(hc2)) arr.Add(hc2);
- if (!arr.Contains(hc3)) arr.Add(hc3);
- return arr;
- }
- #endregion
- #region 取值
- private void GetValue()
- {
- //选号
- bwString = WRequest.GetFormString("bw");
- //大底
- dzhixuan = WRequest.GetFormInt("dzx", 0);
- dadihao = WRequest.GetFormString("dadihao");
- //号码过滤
- pbh = WRequest.GetFormInt("pbh", 0);
- pbwString = WRequest.GetFormString("pbw");
- //胆码过滤
- dbwString = WRequest.GetFormString("dbw");
- //012路
- str_012 = WRequest.GetFormString("lubl");
- lubh = WRequest.GetFormInt("lubh", 0);
- //二码过滤
- twoString = WRequest.GetFormString("embl").Trim();
- emhb = WRequest.GetFormInt("emhb", 0);
- //二码和过滤
- str_emh = WRequest.GetFormString("pemh").Trim();
- emhh = WRequest.GetFormInt("pemhr", 0);
- //二码差
- str_emc = WRequest.GetFormString("pemc").Trim();
- emch = WRequest.GetFormInt("pemcr", 0);
- //和值
- hzString = WRequest.GetFormString("hzbl").Trim();
- hzhb = WRequest.GetFormInt("hzhb", 0);
- // 和尾
- hwString = WRequest.GetFormString("hwbl").Trim(); ;
- hwhb = WRequest.GetFormInt("hwhb", 0);
- // 跨度
- kdString = WRequest.GetFormString("kdbl").Trim();
- kdhb = WRequest.GetFormInt("kdhb", 0);
- //大小
- dxString = WRequest.GetFormString("dxbl").Trim();
- dxhb = WRequest.GetFormInt("dxhb", 0);
- //奇偶
- joString = WRequest.GetFormString("jobl").Trim();
- johb = WRequest.GetFormInt("johb", 0);
- //质合
- zhString = WRequest.GetFormString("zhbl").Trim();
- zhhb = WRequest.GetFormInt("zhhb", 0);
- //顺子
- szbl = WRequest.GetFormInt("szbl", 0);
- //组合
- zuhe3 = WRequest.GetFormInt("zuhe3", 0);
- zuhe6 = WRequest.GetFormInt("zuhe6", 0);
- }
- #endregion
- }
- }
|