示例#1
0
        public bool Execute(WaitingProcFunc func, string Title, WaitingType type, string ConfirmPrompt)
        {
            Func = func;
            form = new WaitingForm(type);
            form.ConfirmPrompt = ConfirmPrompt;
            form.Text          = Title;

            WaitingThread      = new Thread(new ThreadStart(Waiting));
            WaitingThread.Name = "等待执行线程";
            WaitingThread.Start();
            form.ShowDialog();
            return(!form.bCancelled);
        }
示例#2
0
 public bool Execute(WaitingProcFunc func, string Title, WaitingType type, string ConfirmPrompt)
 {
     Func = func;
     form = new WaitingForm(type);
     form.ConfirmPrompt        = ConfirmPrompt;
     form.Text                 = Title;
     form.progressBar1.Minimum = MinProgress;
     form.progressBar1.Maximum = MaxProgress;
     WaitingThread             = new Thread(new ThreadStart(Waitting));
     WaitingThread.Name        = "等待执行线程";
     WaitingThread.Start();
     if (owner == null)
     {
         form.ShowDialog();
     }
     else
     {
         form.ShowDialog(owner);
     }
     return(!form.bCancelled);
 }