public InstallPageViewModel(IViewModelResolver viewModelResolver, IToInstallProvider toInstallProvider, IConfigurationProvider configurationProvider, IVsCodeInstallLocationProvider vsInstallProvider,
                                    IProgramWindow programWindow, ICatchableButtonFactory buttonFactory)
            : base("", "")
        {
            this.viewModelResolver     = viewModelResolver;
            this.toInstallProvider     = toInstallProvider;
            this.configurationProvider = configurationProvider;
            this.vsInstallProvider     = vsInstallProvider;
            this.programWindow         = programWindow;
            CancelInstall  = buttonFactory.CreateCatchableButton(CancelInstallFunc);
            runInstallTask = installFunc();

            async Task installFunc()
            {
                try
                {
                    await RunInstall();
                }
                catch (Exception e)
                {
                    viewModelResolver.ResolveMainWindow().HandleException(e);
                }
            }
        }
        public FinalPageViewModel(IProgramWindow progWindow, IConfigurationProvider configurationProvider, IVsCodeInstallLocationProvider vsCodeProvider)
            : base("Finish", "")
        {
            vsCodeInstalled = vsCodeProvider.Model.InstallingVsCode;
            if (vsCodeInstalled)
            {
                if (OperatingSystem.IsMacOS())
                {
                    FinishText = "Clicking finish will open the VS Code folder.\nPlease drag this to your dock.";
                }
                else
                {
                    FinishText = "Use the WPILib VS Code desktop icon to start VS Code.";
                }
            }
            else
            {
                FinishText = "";
            }

            this.progWindow            = progWindow;
            this.configurationProvider = configurationProvider;
        }