コード例 #1
0
        public WebProxyPreferencesPanel()
        {
            // This call is required by the Windows.Forms Form Designer.
            InitializeComponent();

            groupBoxProxy.Text           = Res.Get(StringId.ProxyPrefCustom);
            proxyPasswordLabel.Text      = Res.Get(StringId.ProxyPrefPassword);
            proxyPassword.AccessibleName = ControlHelper.ToAccessibleName(proxyPasswordLabel.Text);
            proxyUsernameLabel.Text      = Res.Get(StringId.ProxyPrefUsername);
            proxyUsername.AccessibleName = ControlHelper.ToAccessibleName(proxyUsernameLabel.Text);
            proxyPortLabel.Text          = Res.Get(StringId.ProxyPrefPort);
            proxyPort.AccessibleName     = ControlHelper.ToAccessibleName(proxyPortLabel.Text);
            proxyServerLabel.Text        = Res.Get(StringId.ProxyPrefServer);
            proxyServer.AccessibleName   = ControlHelper.ToAccessibleName(proxyServerLabel.Text);
            proxyEnabled.Text            = Res.Get(StringId.ProxyPrefEnabled);
            PanelName = Res.Get(StringId.ProxyPrefName);

            PanelBitmap = ResourceHelper.LoadAssemblyResourceBitmap("Preferences.Images.WebProxyPanelBitmap.png");

            _webProxyPreferences = new WebProxyPreferences();
            _webProxyPreferences.PreferencesModified += new EventHandler(_connectionsPreferences_PreferencesModified);

            proxyEnabled.Checked = _webProxyPreferences.ProxyEnabled;
            proxyServer.Text     = _webProxyPreferences.Hostname;
            proxyPort.Text       = _webProxyPreferences.Port.ToString(CultureInfo.CurrentCulture);
            proxyUsername.Text   = _webProxyPreferences.Username;
            proxyPassword.Text   = _webProxyPreferences.Password;

            // give password field nice round circle
            proxyPassword.PasswordChar = Res.PasswordChar;
        }
コード例 #2
0
        public WebProxyPreferencesPanel()
        {
            // This call is required by the Windows.Forms Form Designer.
            InitializeComponent();

            groupBoxProxy.Text = Res.Get(StringId.ProxyPrefCustom);
            proxyPasswordLabel.Text = Res.Get(StringId.ProxyPrefPassword);
            proxyPassword.AccessibleName = ControlHelper.ToAccessibleName(proxyPasswordLabel.Text);
            proxyUsernameLabel.Text = Res.Get(StringId.ProxyPrefUsername);
            proxyUsername.AccessibleName = ControlHelper.ToAccessibleName(proxyUsernameLabel.Text);
            proxyPortLabel.Text = Res.Get(StringId.ProxyPrefPort);
            proxyPort.AccessibleName = ControlHelper.ToAccessibleName(proxyPortLabel.Text);
            proxyServerLabel.Text = Res.Get(StringId.ProxyPrefServer);
            proxyServer.AccessibleName = ControlHelper.ToAccessibleName(proxyServerLabel.Text);
            proxyEnabled.Text = Res.Get(StringId.ProxyPrefEnabled);
            PanelName = Res.Get(StringId.ProxyPrefName);

            PanelBitmap = ResourceHelper.LoadAssemblyResourceBitmap("Preferences.Images.WebProxyPanelBitmap.png");

            _webProxyPreferences = new WebProxyPreferences();
            _webProxyPreferences.PreferencesModified += new EventHandler(_connectionsPreferences_PreferencesModified);

            proxyEnabled.Checked = _webProxyPreferences.ProxyEnabled;
            proxyServer.Text = _webProxyPreferences.Hostname;
            proxyPort.Text = _webProxyPreferences.Port.ToString(CultureInfo.CurrentCulture);
            proxyUsername.Text = _webProxyPreferences.Username;
            proxyPassword.Text = _webProxyPreferences.Password;

            // give password field nice round circle
            proxyPassword.PasswordChar = Res.PasswordChar;

        }