Revision ebc37b0d trunk/Pithos.Client.WPF/Preferences/PreferencesViewModel.cs

b/trunk/Pithos.Client.WPF/Preferences/PreferencesViewModel.cs
72 72
    /// The class is a single ViewModel for all Preferences tabs. It can be broken in separate
73 73
    /// ViewModels, one for each tab.
74 74
    /// </remarks>
75
    [Export]
75
    [Export, PartCreationPolicy(CreationPolicy.Shared)]
76 76
    public class PreferencesViewModel : Screen
77 77
    {
78 78
        private readonly IEventAggregator _events;
......
219 219

  
220 220
        public void SelectiveSyncFolders()
221 221
        {
222
            var monitor = Shell.Monitors[CurrentAccount.AccountName];
222
            var monitor = Shell.Monitors[CurrentAccount.AccountKey];
223 223
            
224 224

  
225 225
            var model = new SelectiveSynchViewModel(monitor,_events,CurrentAccount.Account);
......
318 318
            {
319 319
                foreach (var account in _accountsToRemove)
320 320
                {
321
                    Shell.RemoveMonitor(account.AccountName);
321
                    Shell.RemoveMonitor(account.ServerUrl, account.AccountName);
322 322
                    Shell.RemoveAccountFromDatabase(account);
323 323
                }
324 324

  
......
589 589
            var newPath= dlg.SelectedPath;                
590 590
            //Find the account's monitor and stop it
591 591
            PithosMonitor monitor;
592
            if (Shell.Monitors.TryGetValue(CurrentAccount.AccountName, out monitor))
592
            if (Shell.Monitors.TryGetValue(CurrentAccount.AccountKey, out monitor))
593 593
            {
594 594
                monitor.Stop();
595 595

  

Also available in: Unified diff