public void SaveUserOptions(string projectName, IProgressMonitor subProgressMonitor)
        {
            if (unsavedChanges == false)
            {
                return;
            }

            var projectUserOptionsFile = projectName + UserOptions.Extension;
            var userOptions            = new UserOptions
            {
                TreeViewCategory = TreeViewCategory,
                CollapsedNodes   = new List <string>(CollapsedNodes)
            };

            xmlSerializer.SaveToXml(userOptions, projectUserOptionsFile);

            eventAggregator.Send(this, new UserOptionsSaved());
        }
        public void LoadUserOptions(string projectLocation)
        {
            var projectUserOptionsFile = projectLocation + UserOptions.Extension;
            var userOptions            = new UserOptions();

            if (fileSystem.FileExists(projectUserOptionsFile))
            {
                try
                {
                    userOptions = xmlSerializer.LoadFromXml <UserOptions>(projectUserOptionsFile);
                }
                catch (Exception ex)
                {
                    unhandledExceptionPolicy.Report(Resources.UserOptionsController_Failed_to_load_user_options_, ex);
                }
            }

            TreeViewCategory = userOptions.TreeViewCategory;
            eventAggregator.Send(this, new TreeViewCategoryChanged(TreeViewCategory));

            CollapsedNodes = userOptions.CollapsedNodes;

            eventAggregator.Send(this, new UserOptionsLoaded());
        }