示例#1
0
文件: MainForm2.cs 项目: qwdingyu/C-
        private void timer1_Tick_ForStep2QYBJ(object sender, EventArgs e)
        {
            //this.textBox7.AppendText("定时器结束");
            if (this.mainWebBrowser.ReadyState == WebBrowserReadyState.Complete)
            {
                // 直接跳转页面
                GHFillConfigurationAction f = new GHFillConfigurationAction(this.mainWebBrowser);
                f.tryFillGHStep3();
                f.tryFillGHStep3Submit();

                ////this.textBox7.AppendText(getNowMessage("第三次跳转,成功跳转页面进入第三步填报"));
                while (this.mainWebBrowser.ReadyState != WebBrowserReadyState.Complete)
                {
                    Application.DoEvents();
                }
            }
            this.timer1.Tick -= this.timer1_Tick_ForStep2QYBJ;
            this.timer1.Stop();
        }
示例#2
0
文件: MainForm2.cs 项目: qwdingyu/C-
        private void button11_Click(object sender, EventArgs e)
        {
            //国环填报动作
            if (Constants.declarationType == DeclarationType.declarationGH)
            {
                GHFillConfigurationAction f = new GHFillConfigurationAction(this.mainWebBrowser);
                f.tryFillGHStep1();
                f.tryFillGHStep1Submit();
                this.wait(1);
                this.mainWebBrowser.Navigate("http://www.vecc-mep.org.cn/newvip/newplan/step01.jsp");
                this.wait(1);

                {
                    GHFillConfigurationAction f1 = new GHFillConfigurationAction(this.mainWebBrowser);
                    f1.tryFillGHStep2();
                    f1.tryFillGHStep2Submit();
                }

                this.wait(1);

                {
                    GHFillConfigurationAction f2 = new GHFillConfigurationAction(this.mainWebBrowser);
                    f2.tryFillGHStep3();
                    f2.tryFillGHStep3Submit();
                }
                //适当延长等待时间
                this.wait(2);

                {
                    GHFillConfigurationAction f3 = new GHFillConfigurationAction(this.mainWebBrowser);
                    f3.tryFillGHStep4Submit();
                }

                this.wait(1);

                {
                    GHFillConfigurationAction f4 = new GHFillConfigurationAction(this.mainWebBrowser);
                    f4.tryFillGHStep4Submit();
                }

                this.wait(1);

                {
                    GHFillConfigurationAction f5 = new GHFillConfigurationAction(this.mainWebBrowser);
                    f5.tryFillGHStep3AddAppendixInfo();
                }

                this.wait(2);

                {
                    GHFillConfigurationAction f6 = new GHFillConfigurationAction(this.mainWebBrowser);
                    f6.testGH();
                }
            }
            //北环填报动作
            else if (Constants.declarationType == DeclarationType.declarationBH)
            {
                BHFillConfigurationAction f = new BHFillConfigurationAction(this.mainWebBrowser);

                f.step0Login();
                f.step0Submit();
                this.wait(1);

                this.mainWebBrowser.Navigate("http://58.30.229.122:8080/motor/car/car-declare-step1!input.action", "Framewindow");

                this.wait(1);

                {
                    BHFillConfigurationAction f1 = new BHFillConfigurationAction(this.mainWebBrowser);
                    f1.step1Fill();
                    f1.step1Submit();
                }

                this.wait(1);

                {
                    BHFillConfigurationAction f2 = new BHFillConfigurationAction(this.mainWebBrowser);
                    f2.step2Submit();
                }

                this.wait(1);

                {
                    BHFillConfigurationAction f3 = new BHFillConfigurationAction(this.mainWebBrowser);
                    f3.step3Fill();
                }
            }
        }