public static void ProgressProc(object sender, ProgressProcEventArgs e) { Now = GetNowTicks(); if (Now - lastUpdateTime < 100) { return; } lastUpdateTime = Now; if (progressSettings == null) { progressSettings = new ProgressSettings(); frm = new ProgressForm(); var r = ProgramCore.MainForm.Bounds; frm.Location = new Point(r.Left + (r.Width - frm.Width) / 2, r.Top + (r.Height - frm.Height) / 2); frm.ProgressSettings = progressSettings; } progressSettings.Status = e.Status ?? progressSettings.Status; progressSettings.SubStatus = e.SubProgressStatus; progressSettings.PercentDone = progressSettings.PercentDone == -1 ? progressSettings.PercentDone : e.PercentDone; progressSettings.SubPercentDone = e.SubProgressPercentDone; if (!stackReleaseWaiting) { stackReleaseWaiting = true; frm.StartProgress(); ProgramCore.AddCallStackReleasedProc(CallStackReleased); } else { frm.WorkProgress(); } }
public static void ProgressProc(object sender, ProgressProcEventArgs e) { Now = GetNowTicks(); if (Now - lastUpdateTime < 100) return; lastUpdateTime = Now; if (progressSettings == null) { progressSettings = new ProgressSettings(); frm = new ProgressForm(); var r = ProgramCore.MainForm.Bounds; frm.Location = new Point(r.Left + (r.Width - frm.Width) / 2, r.Top + (r.Height - frm.Height) / 2); frm.ProgressSettings = progressSettings; } progressSettings.Status = e.Status ?? progressSettings.Status; progressSettings.SubStatus = e.SubProgressStatus; progressSettings.PercentDone = progressSettings.PercentDone == -1 ? progressSettings.PercentDone : e.PercentDone; progressSettings.SubPercentDone = e.SubProgressPercentDone; if (!stackReleaseWaiting) { stackReleaseWaiting = true; frm.StartProgress(); ProgramCore.AddCallStackReleasedProc(CallStackReleased); } else { frm.WorkProgress(); } }
public static void Progress(object sender, ProgressProcEventArgs e) { Progress(sender, e.Status, e.PercentDone, e.SubProgressStatus, e.SubProgressPercentDone); }
private void ProgressProc(object sender, ProgressProcEventArgs e) { var now = DateTime.Now; if (!isProgress) { StartProgress(); } if (now - lastUpdateDateTime > TimeSpan.FromMilliseconds(40)) { Application.DoEvents(); lastUpdateDateTime = now; } ProgressManager.ProgressProc(sender, e); }