예제 #1
0
        /// <summary>Updates the UI when the installation progress has changed.</summary>
        /// <param name="e">The InstallProgress data.</param>
        void InstallProgressChanged(InstallProgressChangedEventArgs e)
        {
            if (Core.IsReconnect)
            {
                Core.Instance.UpdateAction = UpdateAction.Installing;
                Core.IsReconnect           = false;
            }

            if (e.CurrentProgress == -1)
            {
                this.tbStatus.Text        = Properties.Resources.PreparingInstall;
                App.TaskBar.ProgressState = TaskbarItemProgressState.Indeterminate;
            }
            else
            {
                App.TaskBar.ProgressState = TaskbarItemProgressState.Normal;
                App.TaskBar.ProgressValue = e.CurrentProgress;
                this.tbStatus.Text        = e.TotalUpdates > 1
                                         ? string.Format(
                    CultureInfo.CurrentCulture,
                    Properties.Resources.InstallExtendedProgress,
                    e.UpdateName,
                    e.UpdatesComplete,
                    e.TotalUpdates,
                    e.CurrentProgress)
                                         : string.Format(
                    CultureInfo.CurrentCulture,
                    Properties.Resources.InstallProgress,
                    e.UpdateName,
                    e.CurrentProgress);
            }
        }
예제 #2
0
 private void OnDownloadProgress(object sender, InstallProgressChangedEventArgs e)
 {
     Operation = e.Stage;
     Filename  = e.Filename;
     Progress  = e.Progress;
     NotifyPropertiesChanged();
 }
예제 #3
0
        /// <summary>Reports when the installation progress has changed.</summary>
        /// <param name="sender">The object that called the event.</param>
        /// <param name="e">The <c>InstallProgressChangedEventArgs</c> instance containing the event data.</param>
        static void InstallProgressChanged(object sender, InstallProgressChangedEventArgs e)
        {
            if (isClientConnected)
            {
                client.OnInstallProgressChanged(sender, e);
            }

            Application.Current.Dispatcher.BeginInvoke(
                UpdateNotifyIcon,
                string.Format(CultureInfo.CurrentCulture, Resources.InstallProgress, e.CurrentProgress));
        }
예제 #4
0
 /// <summary>Sets the UI when the install progress has changed.</summary>
 /// <param name="sender">The object that called the event.</param>
 /// <param name="e">The <c>SevenUpdate.InstallProgressChangedEventArgs</c> instance containing the event data.</param>
 void InstallProgressChanged(object sender, InstallProgressChangedEventArgs e)
 {
     if (!this.Dispatcher.CheckAccess())
     {
         this.Dispatcher.BeginInvoke(this.InstallProgressChanged, e);
     }
     else
     {
         this.InstallProgressChanged(e);
     }
 }
예제 #5
0
        /// <summary>Reports when the installation progress has changed.</summary>
        /// <param name="sender">The object that called the event.</param>
        /// <param name="e">The <c>InstallProgressChangedEventArgs</c> instance containing the event data.</param>
        static void InstallProgressChanged(object sender, InstallProgressChangedEventArgs e)
        {
            if (isClientConnected)
            {
                client.OnInstallProgressChanged(sender, e);
            }

            Application.Current.Dispatcher.BeginInvoke(
                UpdateNotifyIcon,
                string.Format(CultureInfo.CurrentCulture, Resources.InstallProgress, e.CurrentProgress));
        }
예제 #6
0
 /// <summary>Sets the UI when the install progress has changed.</summary>
 /// <param name="sender">The object that called the event.</param>
 /// <param name="e">The <c>SevenUpdate.InstallProgressChangedEventArgs</c> instance containing the event data.</param>
 void InstallProgressChanged(object sender, InstallProgressChangedEventArgs e)
 {
     if (!this.Dispatcher.CheckAccess())
     {
         this.Dispatcher.BeginInvoke(this.InstallProgressChanged, e);
     }
     else
     {
         this.InstallProgressChanged(e);
     }
 }
예제 #7
0
        /// <summary>Updates the UI when the installation progress has changed.</summary>
        /// <param name="e">The InstallProgress data.</param>
        void InstallProgressChanged(InstallProgressChangedEventArgs e)
        {
            if (Core.IsReconnect)
            {
                Core.Instance.UpdateAction = UpdateAction.Installing;
                Core.IsReconnect = false;
            }

            if (e.CurrentProgress == -1)
            {
                this.tbStatus.Text = Properties.Resources.PreparingInstall;
                App.TaskBar.ProgressState = TaskbarItemProgressState.Indeterminate;
            }
            else
            {
                App.TaskBar.ProgressState = TaskbarItemProgressState.Normal;
                App.TaskBar.ProgressValue = e.CurrentProgress;
                this.tbStatus.Text = e.TotalUpdates > 1
                                         ? string.Format(
                                             CultureInfo.CurrentCulture,
                                             Properties.Resources.InstallExtendedProgress,
                                             e.UpdateName,
                                             e.UpdatesComplete,
                                             e.TotalUpdates,
                                             e.CurrentProgress)
                                         : string.Format(
                                             CultureInfo.CurrentCulture,
                                             Properties.Resources.InstallProgress,
                                             e.UpdateName,
                                             e.CurrentProgress);
            }
        }
예제 #8
0
 private void OnAddonInstallProgress(object sender, InstallProgressChangedEventArgs e)
 {
     InstallProgressChanged?.Invoke(this, e);
 }
예제 #9
0
 /// <summary>Occurs when the installation progress has changed.</summary>
 /// <param name="sender">The sender of the event.</param>
 /// <param name="e">The event data.</param>
 public void OnInstallProgressChanged(object sender, InstallProgressChangedEventArgs e)
 {
     this.Channel.OnInstallProgressChanged(sender, e);
 }