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

b/trunk/Pithos.Client.WPF/Preferences/PreferencesViewModel.cs
97 97
        public ShellViewModel Shell { get;  set; }
98 98
        //ShellExtensionController _extensionController=new ShellExtensionController();
99 99

  
100
        public PreferencesViewModel(IWindowManager windowManager, IEventAggregator events, ShellViewModel shell, PithosSettings settings)
100
        public PreferencesViewModel(IWindowManager windowManager, IEventAggregator events, ShellViewModel shell, PithosSettings settings, string currentTab)
101 101
        {
102 102
            _windowManager = windowManager;
103 103
            _events = events;
104 104

  
105 105
            DisplayName = "Pithos Preferences";
106 106
            Shell = shell;
107

  
107
            
108 108
            Settings=settings;
109 109
            Accounts = new ObservableConcurrentCollection<AccountSettings>();
110 110
            if (settings.Accounts == null)
......
120 120

  
121 121
            StartOnSystemStartup = File.Exists(_shortcutPath);
122 122

  
123
            SelectedTab = currentTab;
124
        }
125

  
126
        private string _selectedTab="General";
127
        public string SelectedTab
128
        {
129
            get { return _selectedTab; }
130
            set
131
            {
132
                _selectedTab = value??"General";
133
                NotifyOfPropertyChange(()=>SelectedTab);
134
                NotifyOfPropertyChange(() => AccountTabSelected);
135
            }
123 136
        }
124 137

  
125 138

  
139
        public bool AccountTabSelected
140
        {
141
            get { return _selectedTab == "AccountTab"; }
142
        }
126 143
        #region Preferences Properties
127 144

  
128 145
        private bool _noProxy;

Also available in: Unified diff