Ejemplo n.º 1
0
        private int _TotalFile    = 0;              //枚举的文件总数

        public CodeCounter(Form owner, ICountStrategy strategy, UpdateProcessBarEventHandle eventHander, OnThreadFinished finish)
        {
            _owner         = owner;
            _CountStrategy = strategy;
            _event         = eventHander;
            _finish        = finish;
        }
Ejemplo n.º 2
0
 public VerifyDigitalSignature(Form owner, IVerifyStrategy strategy, UpdateProcessBarEventHandle eventHandle, OnThreadFinished finish)
 {
     _owner          = owner;
     _verifyStrategy = strategy;
     _event          = eventHandle;
     _finish         = finish;
 }
Ejemplo n.º 3
0
 private void RunThread()
 {
     try
     {
         _threadFunction();
     }
     finally
     {
         OnThreadFinished?.Invoke(this, new ThreadFinishedEventArgs(this));
     }
 }
Ejemplo n.º 4
0
 private void RunThread()
 {
     try
     {
         _threadFunction();
     }
     finally
     {
         OnThreadFinished?.Invoke(this, new ThreadFinishedEventArgs(this));
         _taskCompletionSource.SetResult(true);
     }
 }