예제 #1
0
        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);
            }
        }
예제 #2
0
파일: Logic.cs 프로젝트: qunqiang/IEProxy
 public void setProxy(string text)
 {
     text = text.Remove(text.LastIndexOf(" "));
     WinInetInterop.SetInternetProxy(true, (string)manProxy.GetValue(text, ""), "",
                                     WinInetInterop.IsAutoDetectProxy(), false,
                                     WinInetInterop.GetAutoConfigURL());
 }
예제 #3
0
 private void disableProxiesToolStripMenuItem_Click(object sender, EventArgs e)
 {
     WinInetInterop.SetInternetProxy(false, WinInetInterop.GetProxyServerURL(), "", false, false,
                                     WinInetInterop.GetAutoConfigURL());
     testForProxies();
 }
예제 #4
0
파일: Logic.cs 프로젝트: qunqiang/IEProxy
 public void switchAutoDetectProxy()
 {
     WinInetInterop.SetInternetProxy(WinInetInterop.IsUseProxy(), WinInetInterop.GetProxyServerURL(), "", !WinInetInterop.IsAutoDetectProxy(),
                                     WinInetInterop.IsAutoConfigProxy(), WinInetInterop.GetAutoConfigURL());
 }
예제 #5
0
파일: Logic.cs 프로젝트: qunqiang/IEProxy
 public void disableAutoConfig()
 {
     WinInetInterop.SetInternetProxy(WinInetInterop.IsUseProxy(), WinInetInterop.GetProxyServerURL(), "",
                                     WinInetInterop.IsAutoDetectProxy(), false, WinInetInterop.GetAutoConfigURL());
 }