// Check for the progress protected void CheckProgress(bool finished) { const int MILIS_PROGRESS_DEFAULT = 500; DateTime mmlast = System.DateTime.Now; TimeSpan difmilis = mmlast - mmfirst; #if REPMAN_COMPACT if ((difmilis.Seconds >= (double)MILIS_PROGRESS_DEFAULT / 1000) || finished) #else if ((difmilis.Milliseconds >= MILIS_PROGRESS_DEFAULT) || finished) #endif { mmfirst = System.DateTime.Now; bool docancel = false; nmeta.WorkProgress(nrecord, npage, ref docancel); if (docancel) { throw new UnNamedException(Translator.TranslateStr(503)); } } }