Example #1
0
 public UpgradeDlgVM(SetupApplication bootstrapper, IGuiService guiService)
     : base(bootstrapper, guiService)
 {
     this.productName = this.bootstrapper.ProductName;
     this.oldVersion  = this.bootstrapper.RelatedBundleVersion.ToString();
     this.newVersion  = this.bootstrapper.ProductVersionTrimmed.ToString();
 }
Example #2
0
        public DlgBaseVM(SetupApplication bootstrapper, IGuiService guiService)
        {
            _bootstrapper = bootstrapper ?? throw new ArgumentNullException("bootstrapper");
            _guiService   = guiService ?? throw new ArgumentNullException("guiService");

            _currentErrors = new Dictionary <string, string>();
        }
        public WizardWindowVM(SetupApplication bootstrapper, IGuiService guiService, IUacService uacService)
        {
            if (bootstrapper == null)
            {
                throw new ArgumentNullException("bootstrapper");
            }

            if (guiService == null)
            {
                throw new ArgumentNullException("guiService");
            }

            if (uacService == null)
            {
                throw new ArgumentNullException("uacService");
            }

            this.bootstrapper = bootstrapper;
            this.guiService   = guiService;
            this.uacService   = uacService;

            this.bootstrapper.CancelProgressRequestedChanged += bootstrapper_CancelProgressRequestedChanged;

            this.CreateViewModels();
        }
Example #4
0
        public ProgressDlgVM(SetupApplication bootstrapper, IGuiService guiService)
            : base(bootstrapper, guiService)
        {
            if (this.bootstrapper.IsUpgrade)
            {
                this.headerText = "Upgrading";
                this.descText   = "Please wait while the Setup Wizard upgrades " + this.bootstrapper.ProductName + " to version " + this.bootstrapper.ProductVersionTrimmed.ToString();
                this.statusText = "Upgrading...";
            }
            else
            {
                switch (this.bootstrapper.LaunchAction)
                {
                case LaunchAction.Install:
                    this.headerText = "Installing " + this.ProductNameVersionDisplay;
                    this.descText   = "Please wait while the Setup Wizard installs " + this.ProductNameVersionDisplay;
                    this.statusText = "Installing...";
                    break;

                case LaunchAction.Uninstall:
                    this.headerText = "Uninstalling " + this.ProductNameVersionDisplay;
                    this.descText   = "Please wait while the Setup Wizard uninstalls " + this.ProductNameVersionDisplay;
                    this.statusText = "Uninstalling...";
                    break;

                default:
                    throw new ApplicationException("Unsupported LaunchAction '" + this.bootstrapper.LaunchAction.ToString() + "'!");
                }
            }

            progressValue = 0;
        }
Example #5
0
        public UserCancelDlgVM(SetupApplication bootstrapper, IGuiService guiService)
            : base(bootstrapper, guiService)
        {
            if (_bootstrapper.IsUpgrade)
            {
                _headline = "Upgrade";
            }
            else
            {
                switch (_bootstrapper.LaunchAction)
                {
                case LaunchAction.Install:
                    _headline = "Installation";
                    break;

                case LaunchAction.Uninstall:
                    _headline = "Uninstallation";
                    break;

                default:
                    throw new ApplicationException("Unsupported LaunchAction '" + _bootstrapper.LaunchAction.ToString() + "'!");
                }
            }

            _headline += " has been cancelled";
        }
Example #6
0
        public UpgradeDlgVM(SetupApplication bootstrapper, IGuiService guiService, IUacService uacService)
            : base(bootstrapper, guiService)
        {
            _uacService = uacService;

            _productName = _bootstrapper.ProductName;
            _oldVersion  = _bootstrapper.RelatedBundleVersion.ToString();
            _newVersion  = _bootstrapper.ProductVersionTrimmed.ToString();
        }
        public WizardWindowVM(SetupApplication bootstrapper, IGuiService guiService, IUacService uacService)
        {
            _bootstrapper = bootstrapper ?? throw new ArgumentNullException("bootstrapper");
            _guiService   = guiService ?? throw new ArgumentNullException("guiService");
            _uacService   = uacService ?? throw new ArgumentNullException("uacService");

            _bootstrapper.CancelProgressRequestedChanged += Bootstrapper_CancelProgressRequestedChanged;

            CreateViewModels();
        }
        /// <summary>
        /// Workaround for using the <see cref="SetupApplication"/> class for host startup.
        /// </summary>
        /// <param name="builder">The <see cref="IHostBuilder"/> to configure.</param>
        /// <returns>The configured <paramref name="builder"/>.</returns>
        public static IHostBuilder UseSetupApplication(this IHostBuilder builder)
        {
            if (builder == null)
            {
                throw new ArgumentNullException(nameof(builder));
            }

            return(builder.ConfigureServices((context, services) =>
            {
                var setupApplication = new SetupApplication(context.Configuration);
                setupApplication.ConfigureServices(services);
            }));
        }
        internal GuiService(SetupApplication bootstrapper, Dispatcher dispatcher)
        {
            if (bootstrapper == null)
            {
                throw new ArgumentNullException("bootstrapper");
            }

            if (dispatcher == null)
            {
                throw new ArgumentNullException("dispatcher");
            }

            this.bootstrapper = bootstrapper;
            this.dispatcher   = dispatcher;
        }
Example #10
0
        public DlgBaseVM(SetupApplication bootstrapper, IGuiService guiService)
        {
            if (bootstrapper == null)
            {
                throw new ArgumentNullException("bootstrapper");
            }

            if (guiService == null)
            {
                throw new ArgumentNullException("guiService");
            }

            this.bootstrapper = bootstrapper;
            this.guiService   = guiService;

            this.currentErrors = new Dictionary <string, string>();
        }
Example #11
0
        public FinishedDlgVM(SetupApplication bootstrapper, IGuiService guiService)
            : base(bootstrapper, guiService)
        {
            if (_bootstrapper.IsUpgrade)
            {
                _headline = "Successfully upgraded " + _bootstrapper.ProductName + " " + _bootstrapper.RelatedBundleVersion.ToString() + " to version " + _bootstrapper.ProductVersionTrimmed.ToString();
            }
            else
            {
                switch (_bootstrapper.LaunchAction)
                {
                case LaunchAction.Install:
                    _headline = "Successfully installed " + ProductNameVersionDisplay;
                    break;

                case LaunchAction.Uninstall:
                    _headline = "Successfully uninstalled " + ProductNameVersionDisplay;
                    break;

                default:
                    throw new ApplicationException("Unsupported LaunchAction '" + _bootstrapper.LaunchAction.ToString() + "'!");
                }
            }
        }
Example #12
0
 public UninstallDlgVM(SetupApplication bootstrapper, IGuiService guiService, IUacService uacService)
     : base(bootstrapper, guiService)
 {
     _uacService = uacService;
 }
Example #13
0
 public WelcomeDlgVM(SetupApplication bootstrapper, IGuiService guiService)
     : base(bootstrapper, guiService)
 {
 }
Example #14
0
 public ReadyDlgVM(SetupApplication bootstrapper, IGuiService guiService, IUacService uacService)
     : base(bootstrapper, guiService)
 {
     this.uacService = uacService;
 }
 public UninstallDlgVM(SetupApplication bootstrapper, IGuiService guiService)
     : base(bootstrapper, guiService)
 {
 }
Example #16
0
 internal GuiService(SetupApplication bootstrapper, Dispatcher dispatcher)
 {
     _bootstrapper = bootstrapper ?? throw new ArgumentNullException("bootstrapper");
     _dispatcher   = dispatcher ?? throw new ArgumentNullException("dispatcher");
 }
Example #17
0
 public ReadyDlgVM(SetupApplication bootstrapper, IGuiService guiService)
     : base(bootstrapper, guiService)
 {
 }
Example #18
0
 public BitErrorDlgVM(SetupApplication bootstrapper, IGuiService guiService)
     : base(bootstrapper, guiService)
 {
     _installerBit = _bootstrapper.IsBundle64Bit ? "64" : "32";
     _osBit        = Environment.Is64BitOperatingSystem ? "64" : "32";
 }
Example #19
0
 public CustomizeDlgVM(SetupApplication bootstrapper, IGuiService guiService)
     : base(bootstrapper, guiService)
 {
 }
Example #20
0
 public BitErrorDlgVM(SetupApplication bootstrapper, IGuiService guiService)
     : base(bootstrapper, guiService)
 {
 }
Example #21
0
 public DowngradeDlgVM(SetupApplication bootstrapper, IGuiService guiService)
     : base(bootstrapper, guiService)
 {
     this.productName      = this.bootstrapper.ProductName;
     this.installedVersion = this.bootstrapper.RelatedBundleVersion.ToString();
 }