Revision f734ab5b trunk/Pithos.Client.WPF/Shell/ShellViewModel.cs
b/trunk/Pithos.Client.WPF/Shell/ShellViewModel.cs | ||
---|---|---|
131 | 131 |
private async Task StartMonitoring() |
132 | 132 |
{ |
133 | 133 |
try |
134 |
{ |
|
134 |
{ |
|
135 |
if (Settings.Accounts == null) |
|
136 |
{ |
|
137 |
Settings.Accounts=new AccountsCollection(); |
|
138 |
Settings.Save(); |
|
139 |
return; |
|
140 |
} |
|
141 |
|
|
135 | 142 |
foreach (var account in Settings.Accounts) |
136 | 143 |
{ |
137 | 144 |
await MonitorAccount(account); |
... | ... | |
196 | 203 |
|
197 | 204 |
var appSettings = Properties.Settings.Default; |
198 | 205 |
monitor.AuthenticationUrl = account.UsePithos |
199 |
? appSettings.PithosAuthenticationUrl
|
|
206 |
? account.ServerUrl.ToString()
|
|
200 | 207 |
: appSettings.CloudfilesAuthenticationUrl; |
201 | 208 |
|
202 | 209 |
_monitors[accountName] = monitor; |
... | ... | |
326 | 333 |
} |
327 | 334 |
|
328 | 335 |
|
336 |
/* |
|
329 | 337 |
public void GoToSite() |
330 | 338 |
{ |
331 | 339 |
var site = Properties.Settings.Default.PithosSite; |
332 | 340 |
Process.Start(site); |
333 | 341 |
} |
342 |
*/ |
|
334 | 343 |
|
335 | 344 |
public void GoToSite(AccountInfo account) |
336 | 345 |
{ |
337 | 346 |
var site = String.Format("{0}/ui/?token={1}&user={2}", |
338 |
Properties.Settings.Default.PithosSite,account.Token,
|
|
347 |
account.SiteUri,account.Token,
|
|
339 | 348 |
account.UserName); |
340 | 349 |
Process.Start(site); |
341 | 350 |
} |
... | ... | |
624 | 633 |
return; |
625 | 634 |
|
626 | 635 |
account.SiteUri= String.Format("{0}/ui/?token={1}&user={2}", |
627 |
Properties.Settings.Default.PithosSite, account.Token,
|
|
636 |
account.SiteUri, account.Token,
|
|
628 | 637 |
account.UserName); |
629 | 638 |
|
630 | 639 |
IProducerConsumerCollection<AccountInfo> accounts = Accounts; |
Also available in: Unified diff