Ejemplo n.º 1
0
        private void SkinButton4_Click(object sender, EventArgs e) //## 断开连接函数
        {
            if (!LoginInternet.checkInternetLink())
            {
                return;
            }

            LoginBW.Url = new Uri("http://down.gwifi.com.cn/");
            while (LoginBW.ReadyState != WebBrowserReadyState.Complete)
            {
                System.Windows.Forms.Application.DoEvents();
            }
            IHTMLDocument2 id2 = LoginBW.Document.DomDocument as IHTMLDocument2;
            IHTMLWindow2   win = id2.parentWindow;

            try
            {
                win.execScript("loginout()", "javascript");
            }
            finally
            {
                GiwifiReg.unALLsettingregedt32();
            }
            //timeOut(2000);
            LoginBW.Url = new Uri("http://down.gwifi.com.cn/");
            while (LoginBW.ReadyState != WebBrowserReadyState.Complete)
            {
                System.Windows.Forms.Application.DoEvents();
            }
            InternetLight(); // 刷新
            GiwifiReg.unALLsettingregedt32();
        }
Ejemplo n.º 2
0
 private void Form1_Load(object sender, EventArgs e)
 {
     //LoginBW.Visible = false; // 显示/关闭 浏览器
     GiwifiReg.RefreshIESettings("");
     LoginBW.ScriptErrorsSuppressed = true;
     InternetLight();
     SettingNowLoading();
     init();//修改
 }
Ejemplo n.º 3
0
        private void SkinButton1_Click(object sender, EventArgs e) //## 执行连接的按钮
        {                                                          //HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\NlaSvc\Parameters\Internet\EnableActiveProbing
            GiwifiReg.settingregedt32(@"SYSTEM\CurrentControlSet\Services\NlaSvc\Parameters\Internet\", "EnableActiveProbing", 0);


            if (LoginInternet.checkInternetLink())
            {
                return;
            }                                                  //## 检查连接情况


            if (client.Interfaces[0].NetworkInterface.OperationalStatus == OperationalStatus.Down) //System.Net.NetworkInformationd.Op
            {
                linkNetworkWifi();                                                                 // 发出连接请求,未必就连上了 因此 254行出现误报情况就是这样的。所以要设置三状态 对未配置 已配置 占位配置  登出 和 登入要有安排
            }
            Logingiwifiuser();                                                                     // 执行连接
            LoginLongCheck.Enabled = true;                                                         // 执行时钟扫描 防止误报连接情况
            SettingNowLoading();

            GiwifiReg.unALLsettingregedt32();
        }
Ejemplo n.º 4
0
 private void Form1_FormClosing(object sender, FormClosingEventArgs e)
 {
     GiwifiReg.unALLsettingregedt32();
 }