public InstallComponentScreenViewModel(
            IEventAggregator eventAggregator,
            IMessageService messageService,
            ISettingsProvider settingsProvider,
            IInstallerService installer,
            String header,
            String description)
            : base(eventAggregator, messageService, settingsProvider, header, description)
        {
            this.installer = installer;

            var settings = settingsProvider.GetScreenSettings(ScreenSettingsEntryType.ComponentSelectionScreen);

            this.BackgroundImage = MiscImageUtilities.LoadBitmap(settings.Background);

            var componentsModels = GetComponents();

            if (componentsModels.Count() == 0)
            {
                var component = CreateMockupComponent();
                componentsModels = new[] { component };

                isMockupComponentUsed = true;
            }

            this.Components = CreateComponentsViewModels(componentsModels);
        }
Beispiel #2
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="eventAggeregator"></param>
        /// <param name="messageService"></param>
        /// <param name="progressManager"></param>
        /// <param name="installer"></param>
        /// <param name="header"></param>
        /// <param name="description"></param>
        public InstallProgressViewModel(
            IEventAggregator eventAggeregator,
            IMessageService messageService,
            ISettingsProvider settingsProvider,
            IProgressManager progressManager,
            IInstallerService installer,
            String header,
            String description)
            : base(eventAggeregator, messageService, settingsProvider, header, description)
        {
            this.installer = installer;
            this.installer.InstallCompleted += InstallCompletedHandler;
            this.installer.InstallCanceled  += InstallCanceledHandler;
            this.installer.InstallFailed    += InstallFailedHandler;

            this.installer.RestoreCompleted += RestoreCompletedHandler;
            this.installer.RestoreCanceled  += RestoreCanceledHandler;
            this.installer.RestoreFailed    += RestoreFailedHandler;

            this.installer.CleanupCompleted += CleanupCompletedHandler;
            this.installer.CleanupCanceled  += CleanupCanceledHandler;
            this.installer.CleanupFailed    += CleanupFailedHandler;

            this.progressManager = progressManager;
            this.progressManager.ProgressChanged += ProgressManagerProgressChangedHandler;

            var settings = settingsProvider.GetScreenSettings(ScreenSettingsEntryType.ProgressScreen);

            this.BackgroundImage = MiscImageUtilities.LoadBitmap(settings.Background);
        }
Beispiel #3
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="eventAggeregator"></param>
        /// <param name="messageService"></param>
        /// <param name="progressManager"></param>
        /// <param name="installer"></param>
        public InstallProgressViewModel(
            IEventAggregator eventAggeregator,
            IMessageService messageService,
            ISettingsProvider settingsProvider,
            IProgressManager progressManager,
            IInstallerService installer)
            : base(eventAggeregator, messageService, settingsProvider)
        {
            //To zamienione miejscem z tym udo³u, spr czy nie ma konsekwencji.
            this.progressManager = progressManager;
            this.progressManager.ProgressChanged += ProgressManagerProgressChangedHandler;

            this.installer = installer;
            this.installer.InstallCompleted += InstallCompletedHandler;
            this.installer.InstallCanceled  += InstallCanceledHandler;
            this.installer.InstallFailed    += InstallFailedHandler;

            this.installer.RestoreCompleted += RestoreCompletedHandler;
            this.installer.RestoreCanceled  += RestoreCanceledHandler;
            this.installer.RestoreFailed    += RestoreFailedHandler;

            this.installer.CleanupCompleted += CleanupCompletedHandler;
            this.installer.CleanupCanceled  += CleanupCanceledHandler;
            this.installer.CleanupFailed    += CleanupFailedHandler;

            var settings = settingsProvider.GetScreenSettings(ScreenSettingsEntryType.ProgressScreen);

            this.BackgroundImage = MiscImageUtilities.LoadBitmap(settings.Background);
            this.Header          = settings.Header;
            this.Description     = settings.Description;
        }
Beispiel #4
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="eventAggeregator"></param>
        /// <param name="messageService"></param>
        /// <param name="header"></param>
        /// <param name="description"></param>
        public InstallFinishViewModel(
            IEventAggregator eventAggeregator,
            IMessageService messageService,
            ISettingsProvider settingsProvider,
            String header,
            String description)
            : base(eventAggeregator, messageService, settingsProvider, header, description)
        {
            var settings = settingsProvider.GetScreenSettings(ScreenSettingsEntryType.InstallCompletedScreen);

            this.BackgroundImage = MiscImageUtilities.LoadBitmap(settings.Background);
        }
Beispiel #5
0
        public InstallWelcomeViewModel(
            IEventAggregator eventAggeregator,
            IMessageService messageService,
            ISettingsProvider settingsProvider)
            : base(eventAggeregator, messageService, settingsProvider)
        {
            var settings = settingsProvider.GetScreenSettings(ScreenSettingsEntryType.WelcomeScreen);

            this.BackgroundImage = MiscImageUtilities.LoadBitmap(settings.Background);
            this.Header          = settings.Header;
            this.Description     = settings.Description;
        }
        public InstallLocationViewModel(
            IEventAggregator eventAggeregator,
            IMessageService messageService,
            ISettingsProvider settingsProvider,
            IDirectoryLocationService dirLocationService,
            IWargameInstallDirService installDirProvider,
            IInstallerService installer,
            String header,
            String description)
            : base(eventAggeregator, messageService, settingsProvider, header, description)
        {
            this.dirLocationService = dirLocationService;
            this.installDirProvider = installDirProvider;
            this.installer          = installer;

            this.Location = installDirProvider.TryGetInstallDirectory();

            var settings = settingsProvider.GetScreenSettings(ScreenSettingsEntryType.LocationScreen);

            this.BackgroundImage = MiscImageUtilities.LoadBitmap(settings.Background);
        }