コード例 #1
0
ファイル: MainForm2.cs プロジェクト: qwdingyu/C-
 //北环选择车辆型号
 private void timer1_Tick_BHForStep1ChooseType(object sender, EventArgs e)
 {
     if (this.mainWebBrowser.ReadyState == WebBrowserReadyState.Complete)
     {
         BHFillConfigurationAction f = new BHFillConfigurationAction(this.mainWebBrowser);
         f.step1Fill();
         f.step1Submit();
         this.wait(1);
         while (this.mainWebBrowser.ReadyState != WebBrowserReadyState.Complete)
         {
             Application.DoEvents();
         }
     }
     this.timer1.Tick -= this.timer1_Tick_BHForStep1ChooseType;
     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();
                }
            }
        }
コード例 #3
0
ファイル: MainForm2.cs プロジェクト: qwdingyu/C-
        //删除已有方案的按钮
        private void button17_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/planSearch.jsp?action=search");

                this.wait(1);

                {
                    GHFillConfigurationAction f1 = new GHFillConfigurationAction(this.mainWebBrowser);
                    f1.overrideJS();
                    for (int i = 0; i < 10; i++)
                    {
                        this.wait(10);
                        GHFillConfigurationAction f2 = new GHFillConfigurationAction(this.mainWebBrowser);
                        f2.overrideJS();
                        f2.deleteFirstRadio();
                    }
                }
            }
            //北环填报动作
            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();
                }
            }
        }