x86.frmMain.task C# (CSharp) Method

task() private method

private task ( ) : void
return void
        private void task()
        {
            try
            {

                TimeSpan timeSpan = DateTime.Now.Subtract(this.lastCheckClick);
                if (timeSpan.TotalSeconds > 40.0 && this._curTask.Stu != "")
                {
                    this.postTask(0);
                    this._curTask.Stu = "";
                    this.lastCheckClick = DateTime.Now.AddSeconds(50.0);
                }
                else if (this._curTask.Stu == "")
                {
                    this._temJsq = 0;
                    if (timeSpan.TotalSeconds > 0.0)
                        this.downTask();
                }
                else if (this._curTask.Stu == "浏览进店页")
                {
                    if (timeSpan.TotalSeconds > 0.0)
                    {
                        if (this._curTask.sl > this._curTask.jd)
                        {
                            if (this._curTask.homeTime1 > 0)
                            {
                                this._curTask.Stu = "浏览主页";
                                // ISSUE: method pointer
                                this.BeginInvoke(clickdelegateClick_home, this.webBrowser1);
                            }
                            else
                            {
                                this._curTask.Stu = "浏览宝贝";
                                // ISSUE: method pointer
                                this.BeginInvoke(clickdelegateClick_bb, this.webBrowser1);
                            }
                        }
                        else
                        {
                            this.strLog = string.Format("{0} 正在提交任务.", DateTime.Now.ToString());
                            // ISSUE: method pointer
                            this.BeginInvoke(showdelegate, this.strLog);
                            int num = 0;
                            while (num < 3)
                            {
                                if (this.postTask(2))
                                {
                                    num = 10;
                                }
                                else
                                {
                                    ++num;
                                    Thread.Sleep(20000);
                                }
                            }
                            this.strLog = string.Format("{0} 您将在20秒后再次获取任务.", (object)DateTime.Now.ToString());
                            // ISSUE: method pointer
                            this.BeginInvoke(showdelegate, (object)this.strLog);
                            this._curTask.Stu = "";
                            this.lastCheckClick = DateTime.Now.AddSeconds(5.0);
                        }
                    }
                    else
                    {
                        try
                        {
                            // ISSUE: method pointer
                            this.BeginInvoke(clickdelegateClick_Scro, this.webBrowser1);
                        }
                        catch (Exception)
                        { 
                        }
                       
                    }
                }
                else if (this._curTask.Stu == "浏览主页" || this._curTask.Stu == "浏览宝贝")
                {
                    if (timeSpan.TotalSeconds > 0.0)
                    {
                        if (this._curTask.sl > this._curTask.jd)
                        {
                            this._curTask.Stu = "浏览宝贝";
                            // ISSUE: method pointer
                            this.BeginInvoke(clickdelegateClick_bb, this.webBrowser1);
                        }
                        else
                        {
                            this.strLog = string.Format("{0} 正在提交任务.", DateTime.Now.ToString());
                            // ISSUE: method pointer
                            this.BeginInvoke(showdelegate, this.strLog);
                            int num = 0;
                            while (num < 3)
                            {
                                if (this.postTask(2))
                                {
                                    num = 10;
                                }
                                else
                                {
                                    ++num;
                                    Thread.Sleep(20000);
                                }
                            }
                            this.strLog = string.Format("{0} 您将在20秒后再次获取任务.", (object)DateTime.Now.ToString());
                            // ISSUE: method pointer
                            this.BeginInvoke(showdelegate, (object)this.strLog);
                            this._curTask.Stu = "";
                            this.lastCheckClick = DateTime.Now.AddSeconds(5.0);
                        }
                    }
                    else
                    {
                     
                        // ISSUE: method pointer
                        this.BeginInvoke(clickdelegateClick_Scro, (object)this.webBrowser1);
                    }
                }
                else if (this._curTask.Stu == "搜索宝贝")
                {
                    if (timeSpan.TotalSeconds > 0.0)
                    {
                        // ISSUE: method pointer
                        this.BeginInvoke(clickdelegateClick_jd, this.webBrowser1);
                    }
                    else
                    {
                        // ISSUE: method pointer
                        this.BeginInvoke(clickdelegateClick_Scro, this.webBrowser1);
                    }
                }
                else if (this._curTask.Stu == "按类目搜索宝贝" && timeSpan.TotalSeconds > 0.0)
                {
                    // ISSUE: method pointer
                    this.BeginInvoke(clickdelegateClick_lm,  this.webBrowser1);
                }
            }
            catch
            {
            }
        }
        private void click_home(WebBrowser web)
frmMain