Revision cbefd298 trunk/Pithos.Client.WPF/SelectiveSynch/SelectiveSynchViewModel.cs

b/trunk/Pithos.Client.WPF/SelectiveSynch/SelectiveSynchViewModel.cs
94 94
            //_monitor = monitor;
95 95
            _events = events;
96 96
            _apiKey = apiKey;
97
            IsEnabled = account.SelectiveSyncEnabled;
97 98
            TaskEx.Run(LoadRootNode);
98 99
        }
99 100

  
......
267 268
                          where record.Removed && record.Uri != null
268 269
                         select record.Uri).ToArray();
269 270
            //TODO: Include Uris for the containers as well
270
            _events.Publish(new SelectiveSynchChanges{Account=Account,Uris=uris,Added=added,Removed=removed});
271
            _events.Publish(new SelectiveSynchChanges{Enabled=IsEnabled, Account=Account,Uris=uris,Added=added,Removed=removed});
271 272
            
272 273

  
273 274
            
......
275 276
            TryClose(true);
276 277
        }
277 278

  
278
        
279
        private bool _isEnabled;
280
        public bool IsEnabled
281
        {
282
            get { return _isEnabled; }
283
            set
284
            {
285
                _isEnabled = value;
286
                NotifyOfPropertyChange(()=>IsEnabled);
287
            }
288
        }
289

  
279 290
        private void SaveSettings(IEnumerable<Uri> uris)
280 291
        {
281 292
            var selections = uris.Select(uri => uri.ToString()).ToArray();
282

  
293
            Account.SelectiveSyncEnabled = IsEnabled;
283 294
            Account.SelectiveFolders.Clear();
284 295
            Account.SelectiveFolders.AddRange(selections);
285 296
            Settings.Default.Save();            

Also available in: Unified diff