예제 #1
0
 public ReparseStatusEventArgs(ReparseType reparseType, int completeCount, int totalCount)
 {
     ReparseType   = reparseType;
     CompleteCount = completeCount;
     TotalCount    = totalCount;
 }
 private void SetReparseStatus(ThreadWatcher watcher, ReparseType reparseType, int completeCount, int totalCount)
 {
     string type;
     bool hideDetail = false;
     switch (reparseType) {
         case ReparseType.Page:
             type = totalCount == 1 ? "page" : "pages";
             hideDetail = totalCount == 1;
             break;
         case ReparseType.Image:
             type = "images";
             break;
         default:
             return;
     }
     string status = hideDetail ? "Reparsing " + type :
         String.Format("Reparsing {0}: {1} of {2} completed", type, completeCount, totalCount);
     DisplayStatus(watcher, status);
 }
 private void SetReparseStatus(ThreadWatcher watcher, ReparseType reparseType, int completeCount, int totalCount)
 {
     string type;
     bool hideDetail = false;
     switch (reparseType) {
         case ReparseType.Page:
             type = totalCount == 1 ? "page" : "pages";
             hideDetail = totalCount == 1;
             break;
         case ReparseType.Image:
             type = "images";
             break;
         default:
             return;
     }
     string status = hideDetail ? "Reparsing " + type :
         String.Format("Reparsing {0}: {1} of {2} completed", type, completeCount, totalCount);
     DisplayStatus(watcher, status);
     //TODO: Find alternative to Application.DoEvents() (throws StackOverflowException when reparsing a large number of images)
     //Application.DoEvents();
 }