private void button_getIESet_Click(object sender, RoutedEventArgs e)
        {
            CurrentUserIEProxyConfig ieConfig = new CurrentUserIEProxyConfig();

            textBox_proxy_addr.Text = "";
            if (util.GetIEProxyConfig(ref ieConfig) == true)
            {
                if (ieConfig.proxy.Length == 0)
                {
                    ProxyConfig proxyConfig = new ProxyConfig();
                    if (ieConfig.autoDetect == 1)
                    {
                        util.GetProxyAutoDetect(ref proxyConfig);
                        if (proxyConfig.proxy.Length > 0)
                        {
                            textBox_proxy_addr.Text = proxyConfig.proxy;
                        }
                    }
                    if (proxyConfig.proxy.Length == 0 && ieConfig.autoConfigUrl.Length > 0)
                    {
                        util.GetProxyAutoScript(ieConfig.autoConfigUrl, ref proxyConfig);
                        if (proxyConfig.proxy.Length > 0)
                        {
                            textBox_proxy_addr.Text = proxyConfig.proxy;
                        }
                    }
                }
                else
                {
                    textBox_proxy_addr.Text = ieConfig.proxy;
                }
            }
        }
Esempio n. 2
0
 private void button_getIESet_Click(object sender, RoutedEventArgs e)
 {
     CurrentUserIEProxyConfig ieConfig = new CurrentUserIEProxyConfig();
     textBox_proxy_addr.Text = "";
     if (util.GetIEProxyConfig(ref ieConfig) == true)
     {
         if (ieConfig.proxy.Length == 0)
         {
             ProxyConfig proxyConfig = new ProxyConfig();
             if (ieConfig.autoDetect == 1)
             {
                 util.GetProxyAutoDetect(ref proxyConfig);
                 if (proxyConfig.proxy.Length > 0)
                 {
                     textBox_proxy_addr.Text = proxyConfig.proxy;
                 }
             }
             if (proxyConfig.proxy.Length == 0 && ieConfig.autoConfigUrl.Length > 0)
             {
                 util.GetProxyAutoScript(ieConfig.autoConfigUrl, ref proxyConfig);
                 if (proxyConfig.proxy.Length > 0)
                 {
                     textBox_proxy_addr.Text = proxyConfig.proxy;
                 }
             }
         }
         else
         {
             textBox_proxy_addr.Text = ieConfig.proxy;
         }
     }
 }