コード例 #1
0
ファイル: Logic.cs プロジェクト: qunqiang/IEProxy
 public void switchAutoDetectProxy()
 {
     WinInetInterop.SetInternetProxy(WinInetInterop.IsUseProxy(), WinInetInterop.GetProxyServerURL(), "", !WinInetInterop.IsAutoDetectProxy(),
                                     WinInetInterop.IsAutoConfigProxy(), WinInetInterop.GetAutoConfigURL());
 }
コード例 #2
0
ファイル: mainForm.cs プロジェクト: qunqiang/IEProxy
        private void fillProxyItem()
        {
            setProxyToolStripMenuItem.DropDownItems.Clear();
            Collection <proxyEntry> proxies = logic.getAllProxies();

            foreach (proxyEntry entry in proxies)
            {
                ToolStripMenuItem temp = new ToolStripMenuItem(entry.key);

                if (((WinInetInterop.GetAutoConfigURL() == entry.url || WinInetInterop.GetAutoConfigURL() == entry.url + "/") && WinInetInterop.IsAutoConfigProxy()) ||
                    (WinInetInterop.GetProxyServerURL() == entry.url || WinInetInterop.GetProxyServerURL() == entry.url + ":80") && WinInetInterop.IsUseProxy())
                {
                    temp.Checked = true;
                }
                if (entry.key.EndsWith(" (Proxy)"))
                {
                    temp.Click += new EventHandler(proxyItem_Click);
                }
                else
                {
                    temp.Click += new EventHandler(autoConfigItem_Click);
                }
                setProxyToolStripMenuItem.DropDownItems.Add(temp);
            }
        }
コード例 #3
0
ファイル: Logic.cs プロジェクト: qunqiang/IEProxy
 public void disableProxy()
 {
     WinInetInterop.SetInternetProxy(false, WinInetInterop.GetProxyServerURL(), "",
                                     WinInetInterop.IsAutoDetectProxy(), WinInetInterop.IsAutoConfigProxy(), WinInetInterop.GetAutoConfigURL());
 }