Exemple #1
0
        public frmMain(Form loginForm)
        {
            InitializeComponent();
            this.loginForm = loginForm;
            this.lastCheckClick = DateTime.Now;
            this._curTask = new TaskTBSturct();
            this._curTask.Stu = "";
            _isClose = false;
            //_curTask.keyword = "星际争霸2代练";

            //_curTask.userId = 5630;

            //_curTask.ID = 6532611;
            //_curTask.ww = "包包大人就是大象";
            //_curTask.comeType = "按综合";
            //_curTask.pageNum = 3;
            //_curTask.downNum1 = 1;
            //_curTask.downNum2 = 2;
            //_curTask.ipSpace = 24;
            //_curTask.jdTime1 = 120;
            //_curTask.jdTime2 = 180;
            //_curTask.dnTime1 = 90;
            //_curTask.dnTime2 = 120;
            //_curTask.sl = 1;
            //_curTask.price = 14.30;
            //_curTask.Stu = "搜索宝贝";


            this._temJsq = 0;
            this.isLoad = false;
            this._cur_home_url = "";
            this._clickedUrl = "";
            this._cur_click_bbname = "";
            msgRow = 0;
            clickdelegateClick_home = click_home;
            clickdelegateClick_bb = click_bb;
            clickdelegateClick_Scro = click_Scro;
            clickdelegateClick_jd = click_jd;
            clickdelegateClick_lm = click_lm;

            delegateCloseMe = closeMe;
            movedelegate = move1;
            showdelegate = ShowMessage;
            toUrldelegate = openUrl;
            delegateInitView = initView;
            delegateUpdateAllDate = updateAllData;
            delegateShowOnlineStu = showOnlineStu;
            __temJsq = 0;
            // ConnStr.connStr = "Data Source=127.0.0.1;Initial Catalog=mytao;User ID=lwc;Password=123456";



        }
Exemple #2
0
        private void add(int flag)
        {
            TaskTBSturct Record = new TaskTBSturct();
            Record.userId = sys.LoginUser.ID;
            Record.keyword = this.rw_txt_key.Text.Trim();
            Record.ww = this.rw_com_ww.Text.Trim();
            Record.comeType = this.rw_com_jd.Text.Trim();
            Record.pageNum = (int)Convert.ToInt16(this.rw_com_page.Text.Trim());
            Record.dq = this.rw_txt_dq.Text.Trim();
            if (this.Urlflag)
                Record.urltaobao = this.strResultUrl;
            if (!this.Urlflag)
                Record.urltaobao = (string)null;
            Record.xinpin = !this.checkBox2.Checked ? "" : "新品";
            Record.baoyou = !this.checkBox6.Checked ? "" : "包邮";
            Record.zsyfx = !this.checkBox9.Checked ? "" : "赠送退货运费险";
            Record.hdfk = !this.checkBox13.Checked ? "" : "货到付款";
            Record.hwsp = !this.checkBox12.Checked ? "" : "海外商品";
            Record.tianmao = !this.checkBox15.Checked ? "" : "天猫";
            Record.zpbz = !this.checkBox8.Checked ? "" : "正品保障";
            Record.xiaoshi24 = !this.checkBox3.Checked ? "" : "24小时内发货";
            Record.tian7 = !this.checkBox7.Checked ? "" : "7+天内退货";
            Record.wwzx = !this.checkBox4.Checked ? "" : "旺旺在线";
            Record.xykzf = !this.checkBox5.Checked ? "" : "信用卡支付";
            Record.zhekou = !this.checkBox11.Checked ? "" : "折扣促销";
            Record.mfhx = !this.checkBox10.Checked ? "" : "免费换新";
            Record.pzcn = !this.checkBox14.Checked ? "" : "品质承诺";
            Record.downNum1 = !(this.rw_txt_cjsl1.Text.Trim() == "") ? (int)Convert.ToInt16(this.rw_txt_cjsl1.Text.Trim()) : 1;
            Record.downNum2 = !(this.rw_txt_cjsl2.Text.Trim() == "") ? (int)Convert.ToInt16(this.rw_txt_cjsl2.Text.Trim()) : 2;
            Record.price1 = !(this.rw_txt_price1.Text.Trim() != "") ? -1 : Convert.ToInt32(this.rw_txt_price1.Text.Trim());
            Record.price2 = !(this.rw_txt_price2.Text.Trim() != "") ? -1 : Convert.ToInt32(this.rw_txt_price2.Text.Trim());
            if (Record.downNum1 < 0)
                Record.downNum1 = 1;
            if (Record.downNum2 < 0)
                Record.downNum2 = 1;
            if (Record.downNum2 < Record.downNum1)
                Record.downNum2 = Record.downNum1;
            Record.ipSpace = (int)Convert.ToInt16(this.rw_com_ip.Text.Replace("小时", "").Trim());
            if (this.rw_jd_sj1.Text.Trim() == "")
            {
                Record.jdTime1 = 120;
                this.rw_jd_sj1.Text = "120";
            }
            else
                Record.jdTime1 = (int)Convert.ToInt16(this.rw_jd_sj1.Text.Trim());
            if (this.rw_jd_sj2.Text.Trim() == "")
            {
                Record.jdTime2 = 180;
                this.rw_jd_sj2.Text = "180";
            }
            else
                Record.jdTime2 = (int)Convert.ToInt16(this.rw_jd_sj2.Text.Trim());
            if (Record.jdTime1 < 120)
                Record.jdTime1 = 120;
            if (Record.jdTime1 > 180)
                Record.jdTime1 = 180;
            if (Record.jdTime2 > 300)
                Record.jdTime2 = 300;
            if (Record.jdTime2 < Record.jdTime1)
                Record.jdTime2 = Record.jdTime1;
            if (this.rw_dn_sj1.Text.Trim() == "")
            {
                Record.dnTime1 = 60;
                this.rw_dn_sj1.Text = "60";
            }
            else
                Record.dnTime1 = (int)Convert.ToInt16(this.rw_dn_sj1.Text.Trim());
            if (this.rw_dn_sj2.Text.Trim() == "")
            {
                Record.dnTime2 = 120;
                this.rw_dn_sj2.Text = "120";
            }
            else
                Record.dnTime2 = (int)Convert.ToInt16(this.rw_dn_sj2.Text.Trim());
            if (Record.dnTime1 < 30)
                Record.dnTime1 = 30;
            if (Record.dnTime1 > 120)
                Record.dnTime1 = 120;
            if (Record.dnTime2 > 180)
                Record.dnTime2 = 180;
            if (Record.dnTime2 < Record.dnTime1)
                Record.dnTime2 = Record.dnTime1;
            Record.sl = !(this.rw_txt_snedNum1.Text.Trim() == "") ? (int)Convert.ToInt16(this.rw_txt_snedNum1.Text.Trim()) : 10;
            if (Record.sl <= 0)
                Record.sl = 1;
            if (this.rw_chk_home.Checked)
            {
                if (this.rw_howe_time1.Text.Trim() == "")
                {
                    Record.homeTime1 = 60;
                    this.rw_howe_time1.Text = "60";
                }
                else
                    Record.homeTime1 = (int)Convert.ToInt16(this.rw_howe_time1.Text.Trim());
                if (this.rw_howe_time2.Text.Trim() == "")
                {
                    Record.homeTime2 = 120;
                    this.rw_howe_time2.Text = "120";
                }
                else
                    Record.homeTime2 = (int)Convert.ToInt16(this.rw_howe_time2.Text.Trim());
                if (Record.homeTime1 < 30)
                    Record.homeTime1 = 30;
                if (Record.homeTime1 > 120)
                    Record.homeTime1 = 120;
                if (Record.homeTime2 > 180)
                    Record.homeTime2 = 180;
                if (Record.homeTime2 < Record.homeTime1)
                    Record.homeTime2 = Record.homeTime1;
            }
            else
                Record.homeTime1 = Record.homeTime2 = 0;
            Record.price = (double)(Record.jdTime2 + Record.dnTime2 * Record.downNum2 + Record.pageNum * 30);
            if (Record.homeTime2 > 0)
                Record.price += (double)Record.homeTime2;
            Record.price = Record.price / 100.0;
            Record.price += 8.0;
            double num1 = Record.price;
            int num2 = 0;
            double num3 = 0.0;
            num3 = (Record.price + (double)num2) * (double)Record.sl;
            double price = sys.LoginUser.hyDj != 0 ? Record.price * (double)Record.sl * this.getMyHydj(2) / 100.0 : (Record.price + (double)num2) * (double)Record.sl;
            Record.allPrice = !this.rw_rao_ms1.Checked ? (sys.LoginUser.hyDj != 0 ? Record.price + (double)num2 : Record.price + (double)num2) : (Record.price + (double)num2) * (double)Record.sl;
            Record.jsPrice = !this.rw_rao_ms1.Checked ? (sys.LoginUser.hyDj != 0 ? (Record.price + (double)num2) * this.getMyHydj(2) / 100.0 : (Record.price + (double)num2) * (double)Record.sl) : (sys.LoginUser.hyDj != 0 ? (Record.price + (double)num2) * (double)Record.sl * this.getMyHydj(2) / 100.0 : (Record.price + (double)num2) * (double)Record.sl);
            this.rw_lab_price1.Text = (Record.price * (double)Record.sl).ToString("f1").Replace(".0", "");
            this.rw_lab_price2.Text = price.ToString("f1").Replace(".0", "");
            this.rw_lab_price4.Text = (Record.price * (double)Record.sl * 0.6).ToString("f1").Replace(".0", "");
            this.rw_lab_price3.Text = (Record.price * (double)Record.sl * 0.95).ToString("f1").Replace(".0", "");
            if (flag == 0)
                return;
            if (this.txt_spid.Text.Trim() == "")
            {
                int num4 = (int)MessageBox.Show("请输入商品ID,商品ID只能是商品链接上“id=”后面的数字");
                this.txt_spid.Focus();
                this.txt_spid.BackColor = Color.PeachPuff;
            }
            else
            {
                this.txt_spid.Focus();
                this.txt_spid.BackColor = Color.White;
                if (this.txt_spid.Text.Trim().Length <= 13)
                {
                    this.DialogResult = DialogResult.OK;
                    Record.spid = this.txt_spid.Text.Trim();
                    if (this.rw_com_jd.Text == "直通车" && this.rw_txt_title.Text.Trim() == "")
                    {
                        int num4 = (int)MessageBox.Show("请复制直通车创意标题到标题框内。若复制的是宝贝标题时,踩出来的是综合搜索,不是直通车");
                        this.rw_txt_title.Focus();
                        this.rw_txt_title.BackColor = Color.PeachPuff;
                    }
                    else
                    {
                        this.rw_txt_title.Focus();
                        this.rw_txt_title.BackColor = Color.White;
                        if (this.rw_com_jd.Text == "按京东" && this.rw_txt_title.Text.Trim() == "")
                        {
                            int num4 = (int)MessageBox.Show("请复制商品标题(45字以内)到标题框内,必须一字不差");
                            this.rw_txt_title.Focus();
                            this.rw_txt_title.BackColor = Color.PeachPuff;
                        }
                        else
                        {
                            this.rw_txt_title.Focus();
                            this.rw_txt_title.BackColor = Color.White;
                            if (this.rw_com_jd.Text == "直通车")
                            {
                                Record.title = this.rw_txt_title.Text.Trim();
                                Record.lm1 = "";
                                Record.lm2 = "";
                            }
                            else if (this.rw_com_jd.Text == "按京东")
                            {
                                if (this.rw_txt_title.Text.Trim().Length <= 36)
                                {
                                    Record.title = this.rw_txt_title.Text.Trim();
                                    Record.lm1 = "";
                                    Record.lm2 = "";
                                }
                                else
                                {
                                    Record.title = this.rw_txt_title.Text.Trim().Substring(0, 36);
                                    Record.lm1 = "";
                                    Record.lm2 = "";
                                }
                            }
                            else
                            {
                                Record.lm1 = "";
                                Record.lm2 = "";
                                Record.title = "";
                            }
                            string text = sys.LoginUser.userName + ",您好!发布任务后请保持挂机,否则您的任务将暂停执行,若软件重启,请点击刷新任务\r\n1.本次任务共需 " + this.rw_lab_price2.Text + " 个流量币,提高VIP等级后更实惠\r\n2.VIP9只需要 " + (Record.price * (double)Record.sl * 0.5).ToString("f1").Replace(".0", "") + " 个流量币\r\n3.挂爱流量,赚流量币,每完成6个任务算1个贡献值或者直接购买高级别VIP\r\n4.确定现在发布任务吗?";
                            if (sys.LoginUser.hyDj == 0)
                                text = sys.LoginUser.userName + ",您好!发布任务后请保持挂机,否则您的任务将暂停执行,若软件重启,请点击刷新任务\r\n1.您不是VIP会员,加入VIP后可享受更多的特权及优惠\r\n2.发布本次任务共需 " + this.rw_lab_price1.Text + " 个流量币\r\n3.购买VIP8后只需 " + (Record.price * (double)Record.sl * 0.6).ToString("f1").Replace(".0", "") + " 个流量币\r\n4.确定现在发布任务吗?否则,请点击顶部“升级VIP”";
                            if (this.rw_rao_ms2.Checked)
                            {
                                text = sys.LoginUser.userName + ",您好!发布任务后请保持挂机,否则您的任务将暂停执行,若软件重启,请点击刷新任务\r\n1.本次任务共需 " + this.rw_lab_price2.Text + " 个流量币,提高VIP等级后更实惠\r\n2.VIP9只需要 " + (Record.price * (double)Record.sl * 0.5).ToString("f1").Replace(".0", "") + " 个流量币\r\n3.挂爱流量,赚流量币,每完成6个任务算1个贡献值或者直接购买高级别VIP\r\n4.确定现在发布任务吗?";
                                if (sys.LoginUser.hyDj == 0)
                                    text = sys.LoginUser.userName + ",您好!发布任务后请保持挂机,否则您的任务将暂停执行,若软件重启,请点击刷新任务\r\n1.您不是VIP会员,加入VIP后可享受更多的特权及优惠\r\n2.发布本次任务共需 " + this.rw_lab_price1.Text + " 个流量币\r\n3.购买VIP8后只需 " + (Record.price * (double)Record.sl * 0.6).ToString("f1").Replace(".0", "") + " 个流量币\r\n4.确定现在发布任务吗?否则请点击顶部“升级VIP”";
                            }
                            if (MessageBox.Show(text, "温馨提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question) != DialogResult.Yes)
                                return;
                            if (sys.LoginUser.hyDj == 0)
                                Record.jsPrice = Record.allPrice;

                            Record.sendTime = this.rw_send_time.BeginDateTime().ToString("yyyy-MM-dd HH:mm:ss");

                            if (Convert.ToDateTime(Record.sendTime) < DateTime.Now)
                                Record.sendTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
                            Record.startTime = "";
                            Record.Stu = "等待中";
                            Record.jd = 0;
                            Record.optStu = 0;
                            Record.noFind = 0;
                            UsersTBSturct loginUser;
                            if (this.rw_rao_ms1.Checked)
                            {
                                double syPrice = 0.0;
                                if (!new usersClass().changePrice(sys.LoginUser.ID, Record.allPrice, ref syPrice))
                                {
                                    int num4 = (int)MessageBox.Show("对不起,您帐户流量币不够支付本次任务所需流量币!");
                                    return;
                                }
                                loginUser = sys.LoginUser;
                                loginUser.Price = syPrice;
                                sys.LoginUser = loginUser;
                                new TasksClass().InsertRecord(Record);
                                this.SearchTask();
                            }
                            if (this.rw_rao_ms2.Checked)
                            {
                                double syPrice = 0.0;
                                if (!new usersClass().changePrice(sys.LoginUser.ID, price, ref syPrice))
                                {
                                    int num4 = (int)MessageBox.Show("对不起,您帐户流量币不够支付本次任务所需流量币!");
                                }
                                else
                                {
                                    loginUser = sys.LoginUser;
                                    loginUser.Price = syPrice;
                                    sys.LoginUser = loginUser;
                                    if (this.rw_txt_space1.Text.Trim() == "" || this.rw_txt_space1.Text.Trim() == "0")
                                        this.rw_txt_space1.Text = "5";
                                    if (this.rw_txt_space2.Text.Trim() == "" || this.rw_txt_space2.Text.Trim() == "0")
                                        this.rw_txt_space2.Text = "10";
                                    int num5 = (int)Convert.ToInt16(this.rw_txt_space1.Text.Trim());
                                    int num6 = (int)Convert.ToInt16(this.rw_txt_space2.Text.Trim());
                                    if (num5 <= 0)
                                        num5 = 5;
                                    if (num6 <= 0)
                                        num6 = 10;
                                    if (num6 < num5)
                                        num6 = num5;
                                    int num7 = (int)Convert.ToInt16((this.rw_txt_snedNum1.Text.Trim()));
                                    DateTime dateTime = this.rw_send_time.BeginDateTime();
                                    for (int index = 0; index < num7; ++index)
                                    {
                                        int num8;
                                        if (num5 == num6)
                                        {
                                            num8 = num5;
                                        }
                                        else
                                        {
                                            Application.DoEvents();
                                            Thread.Sleep(500);
                                            num8 = new Random().Next(num5 * 60, num6 * 60);
                                        }
                                        dateTime = dateTime.AddSeconds((double)num8);
                                        Record.sendTime = dateTime.ToString("yyyy-MM-dd HH:mm:ss");
                                        Record.sl = 1;
                                        new TasksClass().InsertRecord(Record);
                                        Application.DoEvents();
                                        Thread.Sleep(200);
                                    }
                                    this.SearchTask();
                                }
                            }
                        }
                    }
                }
                else
                {
                    int num4 = (int)MessageBox.Show("商品ID只能是商品链接上“id=”后面的数字,不是旺旺,也不是链接");
                    this.txt_spid.Focus();
                }
            }
        }
Exemple #3
0
        private void downTask()
        {
            try
            {
                this._cur_home_url = "";
                this._clickedUrl = "";
                this._cur_click_bbname = "";
                if (this.lab_IP.Text.Trim().Split(' ')[0].Trim() == "")
                {
                    this.lastCheckClick = DateTime.Now.AddSeconds(10.0);
                }
                else
                {
                    Random random1 = new Random();
                    this.strLog = string.Format("{0} 正在请求任务.", (object)DateTime.Now.ToString());
                    // ISSUE: method pointer
                    this.BeginInvoke(showdelegate, (object)this.strLog);
                    string[] strArray1 = new string[5];
                    string[] strArray2 = strArray1;
                    int index1 = 0;
                    int num1 = sys.LoginUser.ID;
                    string str1 = num1.ToString();
                    strArray2[index1] = str1;
                    strArray1[1] = "_";
                    strArray1[2] = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
                    strArray1[3] = "_";
                    string[] strArray3 = strArray1;
                    int index2 = 4;
                    num1 = random1.Next(0, 1000);
                    string str2 = num1.ToString();
                    strArray3[index2] = str2;
                    DataTable dataTable = new TasksClass().downTask(this.lab_IP.Text.Trim().Split(' ')[0].Trim(), string.Concat(strArray1), sys.LoginUser.ID);
                    // TasksClass c = new TasksClass();
                    //string downStr1 = this.lab_IP.Text.Trim().Split(' ')[0].Trim();
                    //    string downStr2= string.Concat(strArray1);
                    //    int downStr3 = 5630;
                    // DataTable dataTable = c.downTask(downStr1, downStr2, downStr3);
                    if (dataTable == null)
                    {
                        this._curTask.Stu = "";
                        this.strLog = string.Format("{0} 没有找到适合的任务.", (object)DateTime.Now.ToString());
                        // ISSUE: method pointer
                        this.BeginInvoke(showdelegate, (object)this.strLog);
                        this.lastCheckClick = DateTime.Now.AddSeconds(20.0);
                        this._curTask.optStu = 0;
                        this.strLog = string.Format("{0} 20秒后重新获取任务.", (object)DateTime.Now.ToString());
                        // ISSUE: method pointer
                        this.BeginInvoke(showdelegate, (object)this.strLog);
                    }
                    else if (dataTable.Rows.Count == 0)
                    {
                        this._curTask.Stu = "";
                        this.strLog = string.Format("{0} 没有找到适合的任务.", (object)DateTime.Now.ToString());
                        // ISSUE: method pointer
                        this.BeginInvoke(showdelegate, (object)this.strLog);
                        this.lastCheckClick = DateTime.Now.AddSeconds(20.0);
                        this._curTask.optStu = 0;
                        this.strLog = string.Format("{0} 20秒后重新获取任务.", (object)DateTime.Now.ToString());
                        // ISSUE: method pointer
                        this.BeginInvoke(showdelegate, (object)this.strLog);
                    }
                    else if (dataTable.Rows.Count >= 0)
                    {
                        TaskTBSturct taskTbSturct = new TaskTBSturct();
                        taskTbSturct.ID = Convert.ToInt32(dataTable.Rows[0]["ID"].ToString().Trim());
                        taskTbSturct.userId = Convert.ToInt32(dataTable.Rows[0]["userId"].ToString().Trim());
                        taskTbSturct.keyword = dataTable.Rows[0]["keyword"].ToString().Trim();
                        taskTbSturct.xinpin = dataTable.Rows[0]["xinpin"].ToString().Trim();
                        taskTbSturct.baoyou = dataTable.Rows[0]["baoyou"].ToString().Trim();
                        taskTbSturct.tianmao = dataTable.Rows[0]["tianmao"].ToString().Trim();
                        taskTbSturct.xiaoshi24 = dataTable.Rows[0]["xiaoshi24"].ToString().Trim();
                        taskTbSturct.tian7 = dataTable.Rows[0]["tian7"].ToString().Trim();
                        taskTbSturct.zhekou = dataTable.Rows[0]["zhekou"].ToString().Trim();
                        taskTbSturct.zsyfx = dataTable.Rows[0]["zsyfx"].ToString().Trim();
                        taskTbSturct.hdfk = dataTable.Rows[0]["hdfk"].ToString().Trim();
                        taskTbSturct.wwzx = dataTable.Rows[0]["wwzx"].ToString().Trim();
                        taskTbSturct.xykzf = dataTable.Rows[0]["xykzf"].ToString().Trim();
                        taskTbSturct.hwsp = dataTable.Rows[0]["hwsp"].ToString().Trim();
                        taskTbSturct.zpbz = dataTable.Rows[0]["zpbz"].ToString().Trim();
                        taskTbSturct.mfhx = dataTable.Rows[0]["mfhx"].ToString().Trim();
                        taskTbSturct.pzcn = dataTable.Rows[0]["pzcn"].ToString().Trim();
                        taskTbSturct.urltaobao = dataTable.Rows[0]["urltaobao"].ToString().Trim();
                        taskTbSturct.ww = dataTable.Rows[0]["ww"].ToString().Trim();
                        taskTbSturct.comeType = dataTable.Rows[0]["comeType"].ToString().Trim();
                        taskTbSturct.pageNum = (int)Convert.ToInt16(dataTable.Rows[0]["pageNum"].ToString().Trim());
                        if (taskTbSturct.pageNum > sys.ConfigData.maxPage)
                            taskTbSturct.pageNum = sys.ConfigData.maxPage;
                        taskTbSturct.dq = dataTable.Rows[0]["dq"].ToString().Trim();
                        taskTbSturct.downNum1 = (int)Convert.ToInt16(dataTable.Rows[0]["downNum1"].ToString().Trim());
                        taskTbSturct.downNum2 = (int)Convert.ToInt16(dataTable.Rows[0]["downNum2"].ToString().Trim());
                        taskTbSturct.ipSpace = (int)Convert.ToInt16(dataTable.Rows[0]["ipSpace"].ToString().Trim());
                        taskTbSturct.jdTime1 = (int)Convert.ToInt16(dataTable.Rows[0]["jdTime1"].ToString().Trim());
                        taskTbSturct.jdTime2 = (int)Convert.ToInt16(dataTable.Rows[0]["jdTime2"].ToString().Trim());
                        taskTbSturct.dnTime1 = (int)Convert.ToInt16(dataTable.Rows[0]["dnTime1"].ToString().Trim());
                        taskTbSturct.dnTime2 = (int)Convert.ToInt16(dataTable.Rows[0]["dnTime2"].ToString().Trim());
                        taskTbSturct.spid = dataTable.Rows[0]["spid"].ToString().Trim();
                        try
                        {
                            taskTbSturct.price1 = (int)Convert.ToInt16(dataTable.Rows[0]["price1"].ToString().Trim());
                            taskTbSturct.price2 = (int)Convert.ToInt16(dataTable.Rows[0]["price2"].ToString().Trim());
                        }
                        catch
                        {
                            taskTbSturct.price1 = taskTbSturct.price2 = -1;
                        }
                        taskTbSturct.price = Convert.ToDouble(dataTable.Rows[0]["price"].ToString().Trim());
                        taskTbSturct.homeTime1 = (int)Convert.ToInt16(dataTable.Rows[0]["homeTime1"].ToString().Trim());
                        taskTbSturct.homeTime2 = (int)Convert.ToInt16(dataTable.Rows[0]["homeTime2"].ToString().Trim());
                        taskTbSturct.title = dataTable.Rows[0]["title"].ToString().Trim();
                        taskTbSturct.lm1 = dataTable.Rows[0]["lm1"].ToString().Trim();
                        taskTbSturct.lm2 = dataTable.Rows[0]["lm2"].ToString().Trim();
                        taskTbSturct.sl = 0;
                        taskTbSturct.optStu = 1;
                        taskTbSturct.jd = 0;
                        TaskLogClass taskLogClass = new TaskLogClass();
                        if (taskTbSturct.downNum2 > 0)
                        {
                            if (taskTbSturct.downNum2 != taskTbSturct.downNum1)
                            {
                                Random random2 = new Random();
                                Thread.Sleep(1000);
                                taskTbSturct.sl = random2.Next(taskTbSturct.downNum1, taskTbSturct.downNum2);
                            }
                            else
                                taskTbSturct.sl = taskTbSturct.downNum1;
                        }
                        taskTbSturct.sl = taskTbSturct.sl + 1;
                        if (taskTbSturct.homeTime1 > 0)
                            taskTbSturct.sl = taskTbSturct.sl + 1;
                        if (taskTbSturct.sl > 4)
                            taskTbSturct.sl = 4;
                        this._curTask = taskTbSturct;
                        this.strLog = string.Format("{0} 接到任务编号:{1},完成可获的流量币:{2},帐户余额:{3}.", (object)DateTime.Now.ToString(), (object)this._curTask.ID, (object)(this._curTask.price * this.getMyHydj(1) / 100.0), (object)sys.LoginUser.Price);
                        // ISSUE: method pointer
                        this.BeginInvoke(showdelegate, (object)this.strLog);
                        if (this.mchk_clear1.Checked || !this.chk_clear2.Checked)
                        {
                            this.strLog = string.Format("{0} 调用系统函数清理IE.", (object)DateTime.Now.ToString());
                            // ISSUE: method pointer
                            this.BeginInvoke(showdelegate, (object)this.strLog);
                            this.CleanCookie(1);
                        }
                        if (this.mchk_clear2.Checked)
                        {
                            this.strLog = string.Format("{0} 调用CCleaner清理IE.", (object)DateTime.Now.ToString());
                            // ISSUE: method pointer
                            this.BeginInvoke(showdelegate, (object)this.strLog);
                            this.CleanCookie(2);
                            Thread.Sleep(10000);
                        }

                        string format1 = "{0} 清理完成,开始检测宝贝";

                        DateTime now = DateTime.Now;
                        string str3 = now.ToString();
                        this.strLog = string.Format(format1, (object)str3);
                        // ISSUE: method pointer
                        this.BeginInvoke(showdelegate, (object)this.strLog);
                        string str4 = "http://s.taobao.com/search?tab=all&q=" + taskTbSturct.keyword;
                        this._curTask.Stu = "搜索宝贝";
                        now = DateTime.Now;
                        this.lastCheckClick = now.AddSeconds(20.0);
                        string str5 = str4 + "&style=grid";
                        if (taskTbSturct.price1 >= 0 && taskTbSturct.price2 >= 0)
                            str5 = str5 + (object)"&filter=reserve_price%5B" + (string)(object)taskTbSturct.price1 + "%2C" + (string)(object)taskTbSturct.price2 + "%5D";
                        else if (taskTbSturct.price1 >= 0)
                            str5 = string.Concat(new object[4]
              {
                (object) str5,
                (object) "&reserve_price%5B",
                (object) taskTbSturct.price1,
                (object) "%2C%5D"
              });
                        else if (taskTbSturct.price2 >= 0)
                            str5 = string.Concat(new object[4]
              {
                (object) str5,
                (object) "&filter=reserve_price%5B%2C",
                (object) taskTbSturct.price2,
                (object) "%5D"
              });
                        if (taskTbSturct.comeType.IndexOf("人气") > -1)
                            str5 += "&sort=renqi-desc";
                        else if (taskTbSturct.comeType.IndexOf("销量") > -1)
                            str5 += "&sort=sale-desc";
                        else if (taskTbSturct.comeType.IndexOf("信用") > -1)
                            str5 += "&sort=credit-desc";
                        else if (taskTbSturct.comeType.IndexOf("最新") > -1)
                            str5 += "&auction_tag%5B0%5D=1154";
                        else if (taskTbSturct.comeType.IndexOf("价格") > -1)
                            str5 += "&sort=price-asc";
                        else if (taskTbSturct.comeType.IndexOf("天猫") > -1)
                            str5 += "&tab=mall";
                        else if (taskTbSturct.comeType.IndexOf("京东") > -1)
                            str5 = "http://search.jd.com/Search?keyword=" + HttpUtility.UrlEncode(taskTbSturct.keyword, Encoding.GetEncoding("UTF-8")) + "&enc=utf-8";
                        else if (taskTbSturct.comeType.IndexOf("阿里") > -1)
                            str5 = "http://s.1688.com/selloffer/offer_search.htm?keywords=" + sys.ulEncode(taskTbSturct.keyword) + "&from=marketSearch&mergeSameDesign=false&n=y&filt=y";
                        if (taskTbSturct.urltaobao != null && taskTbSturct.urltaobao != "")
                            str5 = taskTbSturct.urltaobao;
                        if (taskTbSturct.dq != "")
                            str5 = str5 + "&loc=" + taskTbSturct.dq;
                        if (taskTbSturct.xinpin == "新品")
                            str5 += "&auction_tag%5B0%5D=1154";
                        if (taskTbSturct.baoyou == "包邮")
                            str5 += "&baoyou=1";
                        if (taskTbSturct.tianmao == "天猫")
                            str5 += "&seller_type=tmall";
                        if (taskTbSturct.xiaoshi24 == "24小时内发货")
                            str5 += "&consign_date=1";
                        if (taskTbSturct.tian7 == "7+天内退货")
                            str5 += "&auction_tag%5B0%5D=4806";
                        if (taskTbSturct.zhekou == "折扣促销")
                            str5 += "&discount=1";
                        if (taskTbSturct.zsyfx == "赠送退货运费险")
                            str5 += "&auction_tag%5B0%5D=385";
                        if (taskTbSturct.hdfk == "货到付款")
                            str5 += "&support_cod=1";
                        if (taskTbSturct.wwzx == "旺旺在线")
                            str5 += "&olu=yes";
                        if (taskTbSturct.xykzf == "信用卡支付")
                            str5 += "&support_xcard=1";
                        if (taskTbSturct.hwsp == "海外商品")
                            str5 += "&globalbuy=1";
                        if (taskTbSturct.zpbz == "正品保障")
                            str5 += "&user_type=1";
                        if (taskTbSturct.mfhx == "免费换新")
                            str5 += "&mfhx=1";
                        if (taskTbSturct.pzcn == "品质承诺")
                            str5 += "&auction_tag%5B0%5D=4742";
                        this._curTask.sendTime = str5;
                        this._curTask.noFind = 0;
                        if (this._curTask.spid.Trim() == "")
                        {
                            string format2 = "{0} 商品ID为空,正在提交任务.";
                            now = DateTime.Now;
                            string str6 = now.ToString();
                            this.strLog = string.Format(format2, (object)str6);
                            // ISSUE: method pointer
                            this.BeginInvoke(showdelegate, (object)this.strLog);
                            this.lastCheckClick.AddMinutes(2.0);
                            int num2 = 0;
                            while (num2 < 3)
                            {
                                if (this.postTask(1))
                                {
                                    num2 = 10;
                                }
                                else
                                {
                                    ++num2;
                                    Thread.Sleep(20000);
                                }
                            }
                            this._curTask.Stu = "";
                            now = DateTime.Now;
                            this.lastCheckClick = now.AddSeconds(5.0);
                            this._curTask.optStu = 0;
                            string format3 = "{0} 20秒后重新获取任务.";
                            now = DateTime.Now;
                            string str7 = now.ToString();
                            this.strLog = string.Format(format3, (object)str7);
                            // ISSUE: method pointer
                            this.BeginInvoke(showdelegate, (object)this.strLog);
                        }
                        else
                        {
                            try
                            {
                                // ISSUE: method pointer
                                this.BeginInvoke(toUrldelegate, this.webBrowser1, str5);
                            }
                            catch (Exception)
                            { 
                            }
                        }
                    }
                }
            }
            catch
            {
            }
        }