Increased the number of retries before abandoning StartMonitor
[pithos-ms-client] / trunk / Pithos.Client.WPF / Shell / ShellViewModel.cs
index 4df7b46..897d7d7 100644 (file)
@@ -535,9 +535,13 @@ namespace Pithos.Client.WPF {
                {
                        //Settings.Reload();
             
-                   var preferences = new PreferencesViewModel(_windowManager, _events, this, Settings,currentTab);
-                   _windowManager.ShowDialog(preferences);
-                       
+                   var preferences = IoC.Get<PreferencesViewModel>();//??new PreferencesViewModel(_windowManager, _events, this, Settings,currentTab);
+            if (!String.IsNullOrWhiteSpace(currentTab))
+                preferences.SelectedTab = currentTab;
+            if (!preferences.IsActive)
+                       _windowManager.ShowWindow(preferences);
+            var view = (Window)preferences.GetView();
+            view.NullSafe(v=>v.Activate());
                }
 
                public void AboutPithos()
@@ -899,7 +903,7 @@ namespace Pithos.Client.WPF {
 
                private bool AbandonRetry(PithosMonitor monitor, int retries)
                {
-                       if (retries > 1)
+                       if (retries > 3)
                        {
                                var message = String.Format("Monitoring of account {0} has failed too many times. Will not retry",
                                                                                        monitor.UserName);