public UpdateViewModel(RootViewModel root) { this.root = root; WixBA.Model.Bootstrapper.DetectUpdateBegin += this.DetectUpdateBegin; this.State = UpdateState.Initializing; }
/// <summary> /// Creates the view populated with it's model. /// </summary> /// <param name="viewModel">Model for the view.</param> public RootView(RootViewModel viewModel) { this.DataContext = viewModel; this.Loaded += (sender, e) => WixBA.Model.Engine.CloseSplashScreen(); this.Closed += (sender, e) => this.Dispatcher.InvokeShutdown(); // shutdown dispatcher when the window is closed. this.InitializeComponent(); }
public UpdateViewModel(RootViewModel root) { this.root = root; this.root.PropertyChanged += new System.ComponentModel.PropertyChangedEventHandler(this.RootPropertyChanged); this.State = UpdateState.Unknown; this.worker = new BackgroundWorker(); this.worker.DoWork += new DoWorkEventHandler(worker_DoWork); }
public UpdateViewModel(RootViewModel root) { this.root = root; WixBA.Model.Bootstrapper.DetectUpdateBegin += this.DetectUpdateBegin; WixBA.Model.Bootstrapper.DetectComplete += DetectComplete; this.State = UpdateState.Initializing; this.worker = new BackgroundWorker(); this.worker.DoWork += new DoWorkEventHandler(worker_DoWork); }
public ProgressViewModel(RootViewModel root) { this.root = root; this.executingPackageOrderIndex = new Dictionary<string, int>(); this.root.PropertyChanged += new System.ComponentModel.PropertyChangedEventHandler(this.RootPropertyChanged); WixBA.Model.Bootstrapper.ExecuteMsiMessage += this.ExecuteMsiMessage; WixBA.Model.Bootstrapper.ExecuteProgress += this.ApplyExecuteProgress; WixBA.Model.Bootstrapper.PlanBegin += this.PlanBegin; WixBA.Model.Bootstrapper.PlanPackageComplete += this.PlanPackageComplete; WixBA.Model.Bootstrapper.Progress += this.ApplyProgress; WixBA.Model.Bootstrapper.CacheAcquireProgress += this.CacheAcquireProgress; WixBA.Model.Bootstrapper.CacheComplete += this.CacheComplete; }
/// <summary> /// Creates a new model of the installation view. /// </summary> public InstallationViewModel(RootViewModel root) { this.root = root; this.downloadRetries = new Dictionary<string, int>(); this.root.PropertyChanged += new System.ComponentModel.PropertyChangedEventHandler(this.RootPropertyChanged); WixBA.Model.Bootstrapper.DetectBegin += this.DetectBegin; WixBA.Model.Bootstrapper.DetectRelatedBundle += this.DetectedRelatedBundle; WixBA.Model.Bootstrapper.DetectComplete += this.DetectComplete; WixBA.Model.Bootstrapper.PlanPackageBegin += this.PlanPackageBegin; WixBA.Model.Bootstrapper.PlanComplete += this.PlanComplete; WixBA.Model.Bootstrapper.ApplyBegin += this.ApplyBegin; WixBA.Model.Bootstrapper.CacheAcquireBegin += this.CacheAcquireBegin; WixBA.Model.Bootstrapper.CacheAcquireComplete += this.CacheAcquireComplete; WixBA.Model.Bootstrapper.ExecutePackageBegin += this.ExecutePackageBegin; WixBA.Model.Bootstrapper.ExecutePackageComplete += this.ExecutePackageComplete; WixBA.Model.Bootstrapper.Error += this.ExecuteError; WixBA.Model.Bootstrapper.ResolveSource += this.ResolveSource; WixBA.Model.Bootstrapper.ApplyComplete += this.ApplyComplete; }
/// <summary> /// Thread entry point for WiX Toolset UX. /// </summary> protected override void Run() { this.Engine.Log(LogLevel.Verbose, "Running the WiX BA."); WixBA.Model = new Model(this); WixBA.Dispatcher = Threading.Dispatcher.CurrentDispatcher; RootViewModel viewModel = new RootViewModel(); // Kick off detect which will populate the view models. this.Engine.Detect(); // Create a Window to show UI. if (WixBA.Model.Command.Display == Display.Passive || WixBA.Model.Command.Display == Display.Full) { this.Engine.Log(LogLevel.Verbose, "Creating a UI."); WixBA.View = new RootView(viewModel); WixBA.View.Show(); } Threading.Dispatcher.Run(); this.PostTelemetry(); this.Engine.Quit(WixBA.Model.Result); }
/// <summary> /// Thread entry point for WiX Toolset UX. /// </summary> protected override void Run() { this.Engine.Log(LogLevel.Verbose, "Running the WiX BA."); WixBA.Model = new Model(this); WixBA.Dispatcher = Threading.Dispatcher.CurrentDispatcher; RootViewModel viewModel = new RootViewModel(); // Populate the view models with the latest data. This is where Detect is called. viewModel.Refresh(); // Create a Window to show UI. if (WixBA.Model.Command.Display == Display.Passive || WixBA.Model.Command.Display == Display.Full) { this.Engine.Log(LogLevel.Verbose, "Creating a UI."); WixBA.View = new RootView(viewModel); WixBA.View.Show(); } Threading.Dispatcher.Run(); this.PostTelemetry(); this.Engine.Quit(WixBA.Model.Result); }
/// <summary> /// Thread entry point for WiX Toolset UX. /// </summary> protected override void Run() { this.Engine.Log(LogLevel.Verbose, "Running the WiX BA."); WixBA.Model = new Model(this); WixBA.Dispatcher = Threading.Dispatcher.CurrentDispatcher; RootViewModel viewModel = new RootViewModel(); // Kick off detect which will populate the view models. this.Engine.Detect(); // Create a Window to show UI. if (WixBA.Model.Command.Display == Display.Passive || WixBA.Model.Command.Display == Display.Full) { this.Engine.Log(LogLevel.Verbose, "Creating a UI."); WixBA.View = new RootView(viewModel); WixBA.View.Show(); } Threading.Dispatcher.Run(); this.Engine.Quit(WixBA.Model.Result); }