@@ -13,6 +13,11 @@ public SettingsForm()
1313 {
1414 InitializeComponent ( ) ;
1515 txtRemoveSiteName . Text = Properties . Settings . Default . RemoveSites ;
16+ chkUseProxy . Checked = Properties . Settings . Default . UseProxy ;
17+ txtProxyServer . Text = Properties . Settings . Default . ProxyServer ;
18+ txtProxyUsername . Text = Properties . Settings . Default . ProxyUsername ;
19+ txtProxyPassword . Text = Properties . Settings . Default . ProxyPassword ;
20+ chkUseProxy_CheckedChanged ( null , null ) ;
1621
1722 ddlTheme . DataSource = Enum . GetValues ( typeof ( MetroThemeStyle ) ) ;
1823 ddlTheme . SelectedItem = Properties . Settings . Default . Theme ;
@@ -41,6 +46,9 @@ private void btnOK_Click(object sender, EventArgs e)
4146 _settingsUC . SaveSettings ( ) ;
4247
4348 Properties . Settings . Default . RemoveSites = txtRemoveSiteName . Text ;
49+ Properties . Settings . Default . ProxyServer = txtProxyServer . Text ;
50+ Properties . Settings . Default . ProxyUsername = txtProxyUsername . Text ;
51+ Properties . Settings . Default . ProxyPassword = txtProxyPassword . Text ;
4452
4553 Properties . Settings . Default . Theme = ( MetroThemeStyle ) Enum . Parse ( typeof ( MetroThemeStyle ) , ddlTheme . Text ) ;
4654 Properties . Settings . Default . Style = ( MetroColorStyle ) Enum . Parse ( typeof ( MetroColorStyle ) , ddlStyle . Text ) ;
@@ -70,5 +78,15 @@ private void DdlTheme_SelectedIndexChanged(object sender, EventArgs e)
7078 lblStyleTitle . ForeColor = Color . FromName ( colorName ) ;
7179 lblStyleContent . ForeColor = Color . FromName ( colorName ) ;
7280 }
81+
82+ private void chkUseProxy_CheckedChanged ( object sender , EventArgs e )
83+ {
84+ lblProxyServer . Enabled =
85+ txtProxyServer . Enabled =
86+ lblProxyUsername . Enabled =
87+ txtProxyUsername . Enabled =
88+ lblProxyPassword . Enabled =
89+ txtProxyPassword . Enabled = chkUseProxy . Checked ;
90+ }
7391 }
7492}
0 commit comments