Revision 34bdb91d trunk/Pithos.Client.WPF/Preferences/PreferencesViewModel.cs
b/trunk/Pithos.Client.WPF/Preferences/PreferencesViewModel.cs | ||
---|---|---|
195 | 195 |
private void DoSave() |
196 | 196 |
{ |
197 | 197 |
Settings.Save(); |
198 |
//SetStartupMode(); |
|
199 |
|
|
198 |
//SetStartupMode(); |
|
200 | 199 |
|
201 | 200 |
foreach (var account in Settings.Accounts) |
202 | 201 |
{ |
... | ... | |
231 | 230 |
} |
232 | 231 |
*/ |
233 | 232 |
|
234 |
private WebProxy ProxyFromSettings() |
|
235 |
{ |
|
236 |
if (Settings.UseManualProxy) |
|
237 |
{ |
|
238 |
var proxy = new WebProxy(Settings.ProxyServer, Settings.ProxyPort); |
|
239 |
//If the proxy requires specific authentication settings, use them |
|
240 |
if (Settings.ProxyAuthentication) |
|
241 |
{ |
|
242 |
proxy.Credentials = new NetworkCredential(Settings.ProxyUsername, Settings.ProxyPassword, Settings.ProxyDomain); |
|
243 |
} |
|
244 |
//Otherwise, if there are generic authentication settings, use them |
|
245 |
if (!String.IsNullOrWhiteSpace(CredentialCache.DefaultNetworkCredentials.UserName)) |
|
246 |
{ |
|
247 |
proxy.Credentials = CredentialCache.DefaultNetworkCredentials; |
|
248 |
} |
|
249 |
return proxy; |
|
250 |
} |
|
251 |
return null; |
|
252 |
} |
|
233 |
|
|
253 | 234 |
|
254 | 235 |
public void AddAccount() |
255 | 236 |
{ |
256 |
var wizard = new AddAccountViewModel {Proxy = ProxyFromSettings()};
|
|
237 |
var wizard = new AddAccountViewModel();
|
|
257 | 238 |
if (_windowManager.ShowDialog(wizard) == true) |
258 | 239 |
{ |
259 | 240 |
string selectedPath = wizard.AccountPath; |
Also available in: Unified diff