public InstallerProgressEventArgs(InstallCompletedEventArgs evtArgs, int total, int amountInstalled)
        {
            if (evtArgs != null)
            {
                Name = evtArgs.Extension.Header.Name;
                Error = evtArgs.Error;
            }

            Total = total;
            AmountInstalled = amountInstalled;
        }
Example #2
0
 /// <summary>Sets the UI when the installation of updates has completed.</summary>
 /// <param name="sender">The object that called the event.</param>
 /// <param name="e">The <c>SevenUpdate.InstallCompletedEventArgs</c> instance containing the event data.</param>
 void InstallCompleted(object sender, InstallCompletedEventArgs e)
 {
     if (!this.Dispatcher.CheckAccess())
     {
         this.Dispatcher.BeginInvoke(this.InstallCompleted, e);
     }
     else
     {
         this.InstallCompleted(e);
     }
 }
Example #3
0
        public InstallerProgressEventArgs(InstallCompletedEventArgs evtArgs, int total, int amountInstalled)
        {
            if (evtArgs != null)
            {
                Name  = evtArgs.Extension.Header.Name;
                Error = evtArgs.Error;
            }

            Total           = total;
            AmountInstalled = amountInstalled;
        }
Example #4
0
 /// <summary>Reports the installation has completed.</summary>
 /// <param name="sender">The object that called the event.</param>
 /// <param name="e">The <c>InstallCompletedEventArgs</c> instance containing the event data.</param>
 static void InstallCompleted(object sender, InstallCompletedEventArgs e)
 {
     IsInstalling = false;
     File.Delete(Path.Combine(AllUserStore, "updates.sui"));
     if (isClientConnected)
     {
         client.OnInstallCompleted(sender, e);
     }
     else
     {
         ShutdownApp();
     }
 }
Example #5
0
        /// <summary>Updates the UI when the installation has completed.</summary>
        /// <param name="e">The InstallCompleted data.</param>
        void InstallCompleted(InstallCompletedEventArgs e)
        {
            Settings.Default.LastInstall = DateTime.Now;
            Core.Instance.IsAdmin        = false;

            // if a reboot is needed lets say it
            if (Utilities.RebootNeeded)
            {
                Core.Instance.UpdateAction = UpdateAction.RebootNeeded;
                return;
            }

            Core.Instance.UpdateAction = UpdateAction.InstallationCompleted;

            if (e.UpdatesFailed <= 0)
            {
                this.tbStatus.Text = e.UpdatesInstalled == 1
                                         ? Properties.Resources.UpdateInstalled
                                         : string.Format(
                    CultureInfo.CurrentCulture,
                    Properties.Resources.UpdatesInstalled,
                    e.UpdatesInstalled);
                return;
            }

            Core.Instance.UpdateAction = UpdateAction.ErrorOccurred;

            if (e.UpdatesInstalled == 0)
            {
                this.tbStatus.Text = e.UpdatesFailed == 1
                                         ? Properties.Resources.UpdateFailed
                                         : string.Format(
                    CultureInfo.CurrentCulture,
                    Properties.Resources.UpdatesFailed,
                    e.UpdatesFailed);
            }
            else
            {
                this.tbStatus.Text = string.Format(
                    CultureInfo.CurrentCulture,
                    Properties.Resources.UpdatesInstalledFailed,
                    e.UpdatesInstalled,
                    e.UpdatesFailed);
            }
        }
Example #6
0
 /// <summary>Reports the installation has completed.</summary>
 /// <param name="sender">The object that called the event.</param>
 /// <param name="e">The <c>InstallCompletedEventArgs</c> instance containing the event data.</param>
 static void InstallCompleted(object sender, InstallCompletedEventArgs e)
 {
     IsInstalling = false;
     File.Delete(Path.Combine(AllUserStore, "updates.sui"));
     if (isClientConnected)
     {
         client.OnInstallCompleted(sender, e);
     }
     else
     {
         ShutdownApp();
     }
 }
Example #7
0
 /// <summary>Sets the UI when the installation of updates has completed.</summary>
 /// <param name="sender">The object that called the event.</param>
 /// <param name="e">The <c>SevenUpdate.InstallCompletedEventArgs</c> instance containing the event data.</param>
 void InstallCompleted(object sender, InstallCompletedEventArgs e)
 {
     if (!this.Dispatcher.CheckAccess())
     {
         this.Dispatcher.BeginInvoke(this.InstallCompleted, e);
     }
     else
     {
         this.InstallCompleted(e);
     }
 }
Example #8
0
        /// <summary>Updates the UI when the installation has completed.</summary>
        /// <param name="e">The InstallCompleted data.</param>
        void InstallCompleted(InstallCompletedEventArgs e)
        {
            Settings.Default.LastInstall = DateTime.Now;
            Core.Instance.IsAdmin = false;

            // if a reboot is needed lets say it
            if (Utilities.RebootNeeded)
            {
                Core.Instance.UpdateAction = UpdateAction.RebootNeeded;
                return;
            }

            Core.Instance.UpdateAction = UpdateAction.InstallationCompleted;

            if (e.UpdatesFailed <= 0)
            {
                this.tbStatus.Text = e.UpdatesInstalled == 1
                                         ? Properties.Resources.UpdateInstalled
                                         : string.Format(
                                             CultureInfo.CurrentCulture,
                                             Properties.Resources.UpdatesInstalled,
                                             e.UpdatesInstalled);
                return;
            }

            Core.Instance.UpdateAction = UpdateAction.ErrorOccurred;

            if (e.UpdatesInstalled == 0)
            {
                this.tbStatus.Text = e.UpdatesFailed == 1
                                         ? Properties.Resources.UpdateFailed
                                         : string.Format(
                                             CultureInfo.CurrentCulture,
                                             Properties.Resources.UpdatesFailed,
                                             e.UpdatesFailed);
            }
            else
            {
                this.tbStatus.Text = string.Format(
                    CultureInfo.CurrentCulture,
                    Properties.Resources.UpdatesInstalledFailed,
                    e.UpdatesInstalled,
                    e.UpdatesFailed);
            }
        }
Example #9
0
 /// <summary>Occurs when the installation of updates has completed.</summary>
 /// <param name="sender">The sender of the event.</param>
 /// <param name="e">The event data.</param>
 public void OnInstallCompleted(object sender, InstallCompletedEventArgs e)
 {
     this.Channel.OnInstallCompleted(sender, e);
 }