/// <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); } }
private void OnDownloadProgress(object sender, InstallProgressChangedEventArgs e) { Operation = e.Stage; Filename = e.Filename; Progress = e.Progress; NotifyPropertiesChanged(); }
/// <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)); }
/// <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); } }
private void OnAddonInstallProgress(object sender, InstallProgressChangedEventArgs e) { InstallProgressChanged?.Invoke(this, e); }
/// <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); }