Beispiel #1
0
        // private IActorRef viewModelSyncActorRef;
        public AppViewModel(IWindowManager windowManager, IEventAggregator eventAggregator, IFeatureRepository repository)
        {
            DisplayName = "Feature Admin 3 for SharePoint 2013";

            this.windowManager = windowManager;

            this.eventAggregator = eventAggregator;
            this.eventAggregator.Subscribe(this);

            this.repository = repository;

            StatusBarVm = new StatusBarViewModel(eventAggregator);

            FeatureDefinitionListVm = new FeatureDefinitionListViewModel(eventAggregator, repository);

            LocationListVm = new LocationListViewModel(eventAggregator, repository);

            ActivatedFeatureVm = new ActivatedFeatureViewModel(eventAggregator);

            LogVm = new LogViewModel(eventAggregator);

            InitializeActors();

            InitializeFarmLoad();
        }
        // private IActorRef viewModelSyncActorRef;
        public AppViewModel(
            IWindowManager windowManager,
            IEventAggregator eventAggregator,
            IFeatureRepository repository,
            IDataService dataService)
        {
            // Load settings at the very beginning, so that they are up to date
            LoadSettings();

            this.windowManager = windowManager;

            this.eventAggregator = eventAggregator;
            this.eventAggregator.Subscribe(this);

            this.repository  = repository;
            this.dataService = dataService;

            DisplayName = Core.Common.StringHelper.GetApplicationDisplayName(dataService.CurrentBackend);

            StatusBarVm = new StatusBarViewModel(eventAggregator);

            FeatureDefinitionListVm = new FeatureDefinitionListViewModel(eventAggregator, repository);

            LocationListVm = new LocationListViewModel(eventAggregator, repository);
            UpgradeListVm  = new UpgradeListViewModel(eventAggregator, repository);
            CleanupListVm  = new CleanupListViewModel(eventAggregator, repository);

            Items.Add(LocationListVm);
            Items.Add(UpgradeListVm);
            Items.Add(CleanupListVm);

            ActivateItem(LocationListVm);

            ActivatedFeatureVm = new ActivatedFeatureViewModel(eventAggregator, repository);

            LogVm = new LogViewModel(eventAggregator);

            InitializeActors();

            TriggerFarmLoadTask(Common.Constants.Tasks.TaskTitleInitialLoad);
        }