Revision d78d765c trunk/Pithos.Client.WPF/Shell/ShellViewModel.cs

b/trunk/Pithos.Client.WPF/Shell/ShellViewModel.cs
375 375

  
376 376
        public string VersionMessage { get; set; }
377 377

  
378
	    private string _tooltipMessage;
379 378
	    public string TooltipMessage
380 379
	    {
381 380
	        get
......
647 646
			StatusIcon = String.Format(@"../Images/{0}.ico", iconKey);
648 647
		}
649 648

  
650
		public void ExitPithos()
651
		{
652
			foreach (var pair in Monitors)
653
			{
654
				var monitor = pair.Value;
655
				monitor.Stop();
656
			}
649
        public void ExitPithos()
650
        {
651
            try
652
            {
657 653

  
658
			((Window)GetView()).Close();
659
		}
660
		#endregion
654
                foreach (var monitor in Monitors.Select(pair => pair.Value))
655
                {
656
                    monitor.Stop();
657
                }
658

  
659
                var view = GetView() as Window;
660
                if (view != null)
661
                    view.Close();
662
                else
663
                    Application.Current.Shutdown();
664
            }
665
            catch (Exception exc)
666
            {
667
                Log.Info("Exception while exiting", exc);
668
                Application.Current.Shutdown();
669
            }
670
        }
671

  
672
	    #endregion
661 673

  
662 674

  
663 675
		private readonly Dictionary<PithosStatus, StatusInfo> _iconNames = new List<StatusInfo>

Also available in: Unified diff