示例#1
0
        public void Begin(string displayName, int minProgress, int maxProgress,
                          int currentProgress)
        {
            Action begin = delegate {
                this.frm = new MyProgressIndicationForm();
                SubscribeFormEvents();
                this.frm.Begin(minProgress, maxProgress, currentProgress);
                this.frm.ShowDialog(this.snapControl);
            };

            this.snapControl.BeginInvoke(begin);
        }
示例#2
0
        public void End()
        {
            if (object.ReferenceEquals(this.frm, null))
            {
                return;
            }
            Action end = delegate {
                UnsubscribeFormEvents();
                this.frm.Dispose();
                this.frm = null;
            };

            this.snapControl.BeginInvoke(end);
        }
示例#3
0
 protected virtual void Dispose(bool disposing)
 {
     if (disposing)
     {
         if (!object.ReferenceEquals(this.frm, null))
         {
             this.frm.Dispose();
             this.frm = null;
         }
         if (!object.ReferenceEquals(this.cts, null))
         {
             this.cts.Dispose();
             this.cts = null;
         }
     }
 }