コード例 #1
0
        /// <summary>
        /// when engine detects a package, populate the appropriate local objects,
        /// including current installed state of the package on the system
        /// </summary>
        private void SetPackageDetectedState(Wix.DetectPackageCompleteEventArgs args)
        {
            var package = this.BundlePackages.FirstOrDefault(pkg => pkg.Package == args.PackageId);

            if (package != null)
            {
                Wix.PackageState currentState = args.State;
                package.CurrentInstallState = currentState;
            }
        }
コード例 #2
0
        /// <summary>Called when the detection for a specific package has completed.</summary>
        /// <param name="args">The arguments of the event.</param>
        protected override void OnDetectPackageComplete(Wix.DetectPackageCompleteEventArgs args)
        {
            this.LogBootstrapperEnterEvent(args, "DetectPackageComplete");
            WPFBootstrapperEventArgs <Wix.DetectPackageCompleteEventArgs> cancelArgs = new WPFBootstrapperEventArgs <Wix.DetectPackageCompleteEventArgs>(args);

            this.TryInvoke(new Action(() => { this.model.OnDetectPackageComplete(cancelArgs); }));
            if (!cancelArgs.Cancel)
            {
                base.OnDetectPackageComplete(cancelArgs.Arguments);
            }
            this.LogBootstrapperLeaveEvent(null, "DetectPackageComplete");
        }
コード例 #3
0
        /// <summary>Called when the detection for a specific package has completed.</summary>
        /// <param name="args">The arguments of the event.</param>
        protected override void OnDetectPackageComplete(Wix.DetectPackageCompleteEventArgs args)
        {
            LogVerbose("Enter Method: OnDetectPackageComplete");
            WPFBootstrapperEventArgs <Wix.DetectPackageCompleteEventArgs> cancelArgs = new WPFBootstrapperEventArgs <Wix.DetectPackageCompleteEventArgs>(args);

            TryInvoke(new Action(() => { _mainWindow.OnDetectPackageComplete(cancelArgs); }));
            if (!cancelArgs.Cancel)
            {
                base.OnDetectPackageComplete(cancelArgs.Arguments);
            }
            LogVerbose("Leaving Method: OnDetectPackageComplete");
        }
コード例 #4
0
ファイル: ManagedBA.cs プロジェクト: Eun/WixSharp
 /// <summary>
 /// Method that gets invoked when the Bootstrapper DetectPackageComplete event is fired.
 /// Checks the PackageId and sets the installation scenario. The PackageId is the ID
 /// specified in one of the package elements (msipackage, exepackage, msppackage,
 /// msupackage) in the WiX bundle.
 /// </summary>
 void ManagedBA_DetectPackageComplete(object sender, DetectPackageCompleteEventArgs e)
 {
     if (e.PackageId == "MyProduct")
     {
         if (e.State == PackageState.Absent)
         {
             MessageBox.Show("Installing");
             this.Engine.Plan(LaunchAction.Install);
         }
         else if (e.State == PackageState.Present)
         {
             MessageBox.Show("UnInstalling");
             this.Engine.Plan(LaunchAction.Uninstall);
         }
     }
 }
コード例 #5
0
        /// <summary>
        /// Method that gets invoked when the Bootstrapper DetectPackageComplete event is fired.
        /// Checks the PackageId and sets the installation scenario. The PackageId is the ID
        /// specified in one of the package elements (msipackage, exepackage, msppackage,
        /// msupackage) in the WiX bundle.
        /// </summary>
        private void OnDetectPackageComplete(object sender, DetectPackageCompleteEventArgs e)
        {
            if (e.PackageId == "DummyInstallationPackageId")
            {
                if (e.State == PackageState.Absent)
                    InstallEnabled = true;

                else if (e.State == PackageState.Present)
                    UninstallEnabled = true;
            }
        }
    /// <summary>
    /// Method that gets invoked when the Bootstrapper DetectPackageComplete event is fired.
    /// Checks the PackageId and sets the installation scenario. The PackageId is the ID
    /// specified in one of the package elements (msipackage, exepackage, msppackage,
    /// msupackage) in the WiX bundle.
    /// </summary>
    void OnDetectPackageComplete(object sender, DetectPackageCompleteEventArgs e)
    {
        if (e.PackageId == "SonarQubePackage")
        {
            if (e.State == PackageState.Absent)
            {
                this.LaunchAction = LaunchAction.Install;
            }

            else if (e.State == PackageState.Present)
            {
                this.LaunchAction = LaunchAction.Uninstall;
            }

            else if (e.State == PackageState.Obsolete)
            {
                this.SetupState = SetupState.FailedOnDowngrade;
            }

            autoEvent.Set();
        }
    }
コード例 #7
0
		void DetectedPackage(object sender, DetectPackageCompleteEventArgs e)
		{
			if (e.PackageId.Equals("Firesec", StringComparison.Ordinal))
			{ _root.State = (e.State == PackageState.Present) ? InstallationState.DetectedPresent : InstallationState.DetectedAbsent; }
		}
コード例 #8
0
ファイル: BootstrapperApplication.cs プロジェクト: zooba/wix3
 /// <summary>
 /// Called when the detection for a specific package has completed.
 /// </summary>
 /// <param name="args">Additional arguments for this event.</param>
 protected virtual void OnDetectPackageComplete(DetectPackageCompleteEventArgs args)
 {
     EventHandler<DetectPackageCompleteEventArgs> handler = this.DetectPackageComplete;
     if (null != handler)
     {
         handler(this, args);
     }
 }
コード例 #9
0
ファイル: MainViewModel.cs プロジェクト: jcw-/sparrowtoolkit
        /// <summary>
        /// Method that gets invoked when the Bootstrapper DetectPackageComplete event is fired.
        /// Checks the PackageId and sets the installation scenario. The PackageId is the ID
        /// specified in one of the package elements (msipackage, exepackage, msppackage,
        /// msupackage) in the WiX bundle.
        /// </summary>
        private void OnDetectPackageComplete(object sender, DetectPackageCompleteEventArgs e)
        {
            if (e.PackageId == "SparrowChartPackageId")
            {
                if (e.State == PackageState.Absent)
                {
                    InstallEnabled = true;
                    this.IsLicensePage = true;
                }

                else if (e.State == PackageState.Present)
                {
                    UninstallEnabled = true;
                    this.IsUnInstallPage = true;
                }
            }
        }
コード例 #10
0
		private void OnDetectPackageComplete(object sender, DetectPackageCompleteEventArgs e)
		{
		}
コード例 #11
0
ファイル: SilentBA.cs プロジェクト: Eun/WixSharp
 /// <summary>
 /// Method that gets invoked when the Bootstrapper DetectPackageComplete event is fired.
 /// Checks the PackageId and sets the installation scenario. The PackageId is the ID
 /// specified in one of the package elements (msipackage, exepackage, msppackage,
 /// msupackage) in the WiX bundle.
 /// </summary>
 void OnDetectPackageComplete(object sender, DetectPackageCompleteEventArgs e)
 {
     if (e.PackageId == PrimaryPackageId)
     {
         if (e.State == PackageState.Absent)
         {
             this.Engine.Plan(LaunchAction.Install);
         }
         else if (e.State == PackageState.Present)
         {
             this.Engine.Plan(LaunchAction.Uninstall);
         }
     }
 }
コード例 #12
0
 private void DetectedPackage(object sender, DetectPackageCompleteEventArgs e)
 {
     //Bootstrapper.Model.Bootstrapper.Engine.Log(LogLevel.Verbose, "Entering InstallationViewModel.DetectedPackage()");
     //Bootstrapper.Model.Bootstrapper.Engine.Log(LogLevel.Verbose, string.Format("  e.PackageID = '{0}' is {1}", e.PackageId, (e.State == PackageState.Present) ? "Present" : "Absent"));
     //if (e.PackageId.Equals("Wix", StringComparison.Ordinal))
     _root.State = (e.State == PackageState.Present) ? InstallationState.DetectedPresent : InstallationState.DetectedAbsent;
     //Bootstrapper.Model.Bootstrapper.Engine.Log(LogLevel.Verbose, "Leaving InstallationViewModel.DetectedPackage()");
 }
コード例 #13
0
ファイル: MainViewModel.cs プロジェクト: xbadcode/Rubezh
		void OnDetectPackageComplete(object sender, DetectPackageCompleteEventArgs e)
		{
			InstallEnabled = true;
			UninstallEnabled = true;
		}
コード例 #14
0
ファイル: MainViewModel.cs プロジェクト: xbadcode/Rubezh
		void OnDetectPackageComplete(object sender, DetectPackageCompleteEventArgs e)
		{
			if (e.PackageId == "FiresecId_1")
			{
				if (e.State == PackageState.Absent)
					IsInstallEnabled = true;
				else if (e.State == PackageState.Present)
					IsUninstallEnabled = true;
			}
		}
コード例 #15
0
 private void DetectedPackage(object sender, DetectPackageCompleteEventArgs e)
 {
     // The Package ID from the Bootstrapper chain.
     if (e.PackageId.Equals("SampleApp", StringComparison.Ordinal))
     {
         this.State = (e.State == PackageState.Present) ? InstallationState.DetectedPresent : InstallationState.DetectedAbsent;
     }
 }