protected override void UpdateProgress(RunworkEventArgs.ProgressIdentify progress) { base.UpdateProgress(progress); if (!string.IsNullOrEmpty(progress.StateMessage)) { Console.ForegroundColor = ConsoleColor.Gray; Console.WriteLine("[" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "] " + progress.StateMessage); Console.ResetColor(); } }
public void SetProgress(RunworkEventArgs.ProgressIdentify progress) { if (progress.TaskCount == 0) { pg.Style = ProgressBarStyle.Marquee; } else { pg.Style = ProgressBarStyle.Continuous; pg.Value = progress.TaskProgress; } if (!string.IsNullOrEmpty(progress.StateMessage)) { lblStatus.Text = progress.StateMessage; } }
protected override void UpdateProgress(RunworkEventArgs.ProgressIdentify progress) { base.UpdateProgress(progress); _form.SetProgress(progress.TaskCount <= 0, progress.TaskPercentage, progress.StateMessage); }
/// <summary> /// 构建进度发生变化 /// </summary> /// <param name="progress"></param> protected virtual void UpdateProgress(RunworkEventArgs.ProgressIdentify progress) { }
protected override void UpdateProgress(RunworkEventArgs.ProgressIdentify progress) { base.UpdateProgress(progress); _form.SetProgress(progress); }