private void ProxyAccountsAddButton_Click(object sender, EventArgs e)
        {
            WebProxy proxy = ZAppHelper.GetDefaultWebProxy();

            ProxyAdd(new ProxyInfo(Environment.UserName, "", proxy.Address.Host, proxy.Address.Port));
            cboProxyConfig.SelectedIndex = (int)EProxyConfigType.ManualProxy;
        }
예제 #2
0
        public ProxyUI()
        {
            InitializeComponent();
            WebProxy proxy = ZAppHelper.GetDefaultWebProxy();

            Proxy = new ProxyInfo(Environment.UserName, "", proxy.Address.Host, proxy.Address.Port);
        }
예제 #3
0
        private void btnAutofillProxy_Click(object sender, EventArgs e)
        {
            if (string.IsNullOrEmpty(Program.Settings.ProxySettings.UserName))
            {
                Program.Settings.ProxySettings.UserName = Environment.UserName;
            }

            WebProxy proxy = ZAppHelper.GetDefaultWebProxy();

            if (proxy != null && proxy.Address != null)
            {
                if (string.IsNullOrEmpty(Program.Settings.ProxySettings.Host))
                {
                    Program.Settings.ProxySettings.Host = proxy.Address.Host;
                }
                if (Program.Settings.ProxySettings.Port == 0)
                {
                    Program.Settings.ProxySettings.Port = proxy.Address.Port;
                }
            }

            pgProxy.SelectedObject = Program.Settings.ProxySettings;
        }