コード例 #1
0
        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();
            }
        }
コード例 #2
0
        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;
            }
        }
コード例 #3
0
        protected override void UpdateProgress(RunworkEventArgs.ProgressIdentify progress)
        {
            base.UpdateProgress(progress);

            _form.SetProgress(progress.TaskCount <= 0, progress.TaskPercentage, progress.StateMessage);
        }
コード例 #4
0
 /// <summary>
 /// 构建进度发生变化
 /// </summary>
 /// <param name="progress"></param>
 protected virtual void UpdateProgress(RunworkEventArgs.ProgressIdentify progress)
 {
 }
コード例 #5
0
        protected override void UpdateProgress(RunworkEventArgs.ProgressIdentify progress)
        {
            base.UpdateProgress(progress);

            _form.SetProgress(progress);
        }