コード例 #1
0
        public WelcomeViewmodel(IBootstrapperController bootstrapperController, IView view)
            : base(bootstrapperController, view)
        {
            var runningDirectory = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);

            this.LicenseFile = Path.Combine(runningDirectory, DefaultLicenseFilename);
        }
コード例 #2
0
        public ViewActivator(Type pageType, IView view, IBootstrapperController bootstrapperController, bool maintainInstance = false)
        {
            this.MaintainInstance = maintainInstance;

            if (pageType == null)
            {
                throw new ArgumentNullException(nameof(pageType));
            }
            else if (view == null)
            {
                throw new ArgumentNullException(nameof(view));
            }
            else if (bootstrapperController == null)
            {
                throw new ArgumentNullException(nameof(bootstrapperController));
            }
            else if (pageType.IsInterface || pageType.IsAbstract)
            {
                throw new ArgumentException("Must be a concrete implementation", nameof(pageType));
            }
            else if (!typeof(IViewmodel).IsAssignableFrom(pageType))
            {
                throw new ArgumentException("Must implement " + nameof(IViewmodel), nameof(pageType));
            }
            else
            {
                this.ConcretePageType = pageType;
                this.view             = view;
            }
        }
コード例 #3
0
        public ViewmodelBase(IBootstrapperController bootstrapperController, IView view)
        {
            this.BootstrapperController = bootstrapperController;

            this.View = view;

            this.View.Viewmodel = this;
        }
コード例 #4
0
        public MainWindow(IBootstrapperController bootstrapperController)
        {
            this.bootstrapperController = bootstrapperController;

            this.Viewmodel = new BootstrapperMainWindowViewmodel(bootstrapperController);

            this.InitializeViewController();

            this.InitializeComponent();
        }
コード例 #5
0
        public BootstrapperMainWindowViewmodel(IBootstrapperController bootstrapperController)
        {
            this.BootstrapperController = bootstrapperController;

            this.Title = this.BootstrapperController.WixBootstrapper.Engine.StringVariables["WixBundleName"];

            BootstrapperController.ViewController.ViewChange += (view) =>
            {
                this.NotifyPropertyChanged(nameof(CurrentView));
            };
        }
コード例 #6
0
        public static void SetDefaultSequences(this IViewController viewController, IBootstrapperController bootstrapperController)
        {
            SetDefaultStartPage(viewController, bootstrapperController);
            SetDefaultCancelPage(viewController, bootstrapperController);
            SetDefaultErrorPage(viewController, bootstrapperController);

            SetDefaultInstallSequence(viewController, bootstrapperController);
            SetDefaultUninstallSequence(viewController, bootstrapperController);
            SetDefaultUpgradeSequence(viewController, bootstrapperController);
            SetDefaultModifySequence(viewController, bootstrapperController);
            SetDefaultRepairSequence(viewController, bootstrapperController);
        }
コード例 #7
0
 public WelcomePage(IBootstrapperController bootstrapperController)
     : base(bootstrapperController)
 {
     this.WelcomeView = new WelcomeView(new WelcomeViewmodel(bootstrapperController));
 }
コード例 #8
0
 public ProgressViewmodel(IBootstrapperController bootstrapperController, IView view)
     : base(bootstrapperController, view)
 {
 }
コード例 #9
0
 public FeaturesViewmodel(IBootstrapperController bootstrapperController, IView view)
     : base(bootstrapperController, view)
 {
     this.Packages = this.BootstrapperController.PackageManager.Packages.Select(
         package => new PackageViewmodel(package));
 }
コード例 #10
0
ファイル: CancelPage.cs プロジェクト: meetrilok/MaxBootstrap
 public CancelPage(IBootstrapperController bootstrapperController) : base(bootstrapperController)
 {
     this.CancelView = new CancelView(new CancelViewmodel(bootstrapperController));
 }
コード例 #11
0
 public CancelViewmodel(IBootstrapperController bootstrapperController, IView view) :
     base(bootstrapperController, view)
 {
     this.CancelledText = "Installation was cancelled by the user";
 }
コード例 #12
0
 public ProgressPage(IBootstrapperController bootstrapperController) : base(bootstrapperController)
 {
     this.ProgressView = new ProgressView(new ProgressViewmodel(bootstrapperController));
 }
コード例 #13
0
 public ConfigurationPage(IBootstrapperController bootstrapperController, IEnumerable <ConfigurationItem> configurationItems) : base(bootstrapperController)
 {
     this.ConfigurationView = new ConfigurationView(new ConfigurationViewmodel(bootstrapperController, configurationItems));
 }
コード例 #14
0
 public OptionsViewmodel(IBootstrapperController bootstrapperController, IView view)
     : base(bootstrapperController, view)
 {
 }
コード例 #15
0
        public static void SetDefaultRepairSequence(this IViewController viewController, IBootstrapperController bootstrapperController)
        {
            viewController.ViewCollection.RegisterView <CommitViewmodel>(new CommitViewmodel(bootstrapperController, new CommitView()));
            viewController.ViewCollection.RegisterView <ProgressViewmodel>(new ProgressViewmodel(bootstrapperController, new ProgressView()));
            viewController.ViewCollection.RegisterView <FinishViewmodel>(new FinishViewmodel(bootstrapperController, new FinishView()));

            viewController.ViewCollection.SetRepairSequence(new List <string>()
            {
                nameof(ProgressViewmodel), nameof(FinishViewmodel)
            });
        }
コード例 #16
0
 public BootstrapperMainWindowViewmodel(IBootstrapperController bootstrapperController)
 {
     this.BootstrapperController = bootstrapperController;
 }
コード例 #17
0
        public static void SetDefaultErrorPage(this IViewController viewController, IBootstrapperController bootstrapperController)
        {
            viewController.ViewCollection.RegisterView <ErrorViewmodel>(new ErrorViewmodel(bootstrapperController, new ErrorView()));

            viewController.ViewCollection.ErrorPage = nameof(ErrorViewmodel);
        }
コード例 #18
0
        public static void SetDefaultCancelPage(this IViewController viewController, IBootstrapperController bootstrapperController)
        {
            viewController.ViewCollection.RegisterView <CancelViewmodel>(new CancelViewmodel(bootstrapperController, new CancelView()));

            viewController.ViewCollection.CancelPage = nameof(CancelViewmodel);
        }
コード例 #19
0
        public static void SetDefaultStartPage(this IViewController viewController, IBootstrapperController bootstrapperController)
        {
            viewController.ViewCollection.RegisterView <WelcomeViewmodel>(new WelcomeViewmodel(bootstrapperController, new WelcomeView()));

            viewController.ViewCollection.StartPage = nameof(WelcomeViewmodel);
        }
コード例 #20
0
 public FinishViewmodel(IBootstrapperController bootstrapperController, IView view)
     : base(bootstrapperController, view)
 {
 }
コード例 #21
0
ファイル: ErrorPage.cs プロジェクト: meetrilok/MaxBootstrap
 public ErrorPage(IBootstrapperController bootstrapperController) : base(bootstrapperController)
 {
     this.ErrorView = new ErrorView(new ErrorViewmodel(bootstrapperController));
 }
コード例 #22
0
 public CommitViewmodel(IBootstrapperController bootstrapperController, IView view)
     : base(bootstrapperController, view)
 {
     this.CommitMessage = "Error: Viewmodel not activated!";
 }
コード例 #23
0
ファイル: OptionPage.cs プロジェクト: meetrilok/MaxBootstrap
 public OptionPage(IBootstrapperController bootstrapperController) : base(bootstrapperController)
 {
     this.OptionView = new OptionView(new OptionViewmodel(bootstrapperController));
 }
コード例 #24
0
 public ConfigurationViewmodel(IBootstrapperController bootstrapperController, IView view, IEnumerable <ConfigurationItem> configurationItems) : base(bootstrapperController, view)
 {
     this.ConfigurationItems = configurationItems;
 }
コード例 #25
0
ファイル: FinishPage.cs プロジェクト: meetrilok/MaxBootstrap
 public FinishPage(IBootstrapperController bootstrapperController) : base(bootstrapperController)
 {
     this.FinishView = new FinishView(new FinishViewmodel(bootstrapperController));
 }
コード例 #26
0
 public FeaturePage(IBootstrapperController bootstrapperController) : base(bootstrapperController)
 {
     this.FeatureView = new FeatureView(new FeatureViewmodel(bootstrapperController));
 }
コード例 #27
0
 public ErrorViewmodel(IBootstrapperController bootstrapperController, IView view)
     : base(bootstrapperController, view)
 {
 }