Added UI for SelectiveSynch
[pithos-ms-client] / trunk / Pithos.Client.WPF / PreferencesViewModel.cs
index bcae81b..acdb412 100644 (file)
@@ -20,6 +20,7 @@ using System.Windows.Interop;
 using Caliburn.Micro;
 using Hardcodet.Wpf.TaskbarNotification;
 using Pithos.Client.WPF.Configuration;
+using Pithos.Client.WPF.SelectiveSynch;
 using Pithos.Core;
 using Pithos.Interfaces;
 using IWin32Window = System.Windows.Forms.IWin32Window;
@@ -55,11 +56,11 @@ namespace Pithos.Client.WPF
         
         public ShellViewModel Shell { get;  set; }
         //ShellExtensionController _extensionController=new ShellExtensionController();
-        
-        public PreferencesViewModel(IEventAggregator events,ShellViewModel shell, PithosSettings settings)
+
+        public PreferencesViewModel(IWindowManager windowManager, IEventAggregator events, ShellViewModel shell, PithosSettings settings)
         {
+            _windowManager = windowManager;
             _events = events;
-            _events.Subscribe(this);
 
             DisplayName = "Pithos Preferences";
             Shell = shell;
@@ -69,23 +70,7 @@ namespace Pithos.Client.WPF
 
         }
 
-/*
-        protected override void OnViewAttached(object view, object context)
-        {
-            var window = (Window)view;
-
-            base.OnViewAttached(view, context);
-        }
-
 
-        protected override void OnViewLoaded(object view)
-        {
-            var window = (Window)view;
-            window.Hide();
-            base.OnViewLoaded(view);
-        }
-
-*/
         #region Preferences Properties
 
         private bool _noProxy;
@@ -129,7 +114,14 @@ namespace Pithos.Client.WPF
        
         #region Commands
         
-
+        public void SelectiveSyncFolders()
+        {
+            var model = new SelectiveSynchViewModel(_events,CurrentAccount);
+            if (_windowManager.ShowDialog(model) == true)
+            {
+                
+            }
+        }
     
         public void SaveChanges()
         {
@@ -272,6 +264,8 @@ namespace Pithos.Client.WPF
         }
 
         private AccountSettings _currentAccount;
+        private IWindowManager _windowManager;
+
         public AccountSettings CurrentAccount
         {
             get {