示例#1
0
        public BGWorker(StartFunc startFunc, CompleteFunc completeFunc)
        {
            _startFunc = startFunc;
            _completeFunc = completeFunc;

            bw = new BackgroundWorker();
            bw.DoWork += DoWork;
            bw.RunWorkerCompleted += Complete;
            bw.RunWorkerAsync();
        }
示例#2
0
 public BGWorker(StartFunc startFunc, CompleteFunc completeFunc)
 {
     _startFunc    = startFunc;
     _completeFunc = completeFunc;
     bw            = new BackgroundWorker();
     bw.WorkerSupportsCancellation = true;
     bw.DoWork             += DoWork;
     bw.RunWorkerCompleted += Complete;
     bw.RunWorkerAsync();
 }
示例#3
0
 public override void Start()
 {
     if (!loaded && Product == null)
     {
         LoadProduct();
     }
     if (Product != null)
     {
         StartFunc.Invoke(Product, null);
     }
 }
示例#4
0
        public BGWorker(StartFunc startFunc, CompleteFunc completeFunc)
        {

            _startFunc = startFunc;
            _completeFunc = completeFunc;
            bw = new BackgroundWorker();
            bw.WorkerSupportsCancellation = true;
            bw.DoWork += DoWork;
            bw.RunWorkerCompleted += Complete;
            bw.RunWorkerAsync();
        }
示例#5
0
 public override void Start()
 {
     if (Plugin == null)
     {
         LoadPlugin();
     }
     if (Plugin != null)
     {
         StartFunc.Invoke(Plugin, null);
     }
 }
示例#6
0
 public override void Start() => StartFunc?.Invoke(Plugin, null);