Example #1
0
        public void EndDelegate(object a)
        {
            try {
                AutoOperationInfo ao = (AutoOperationInfo)a;
                if (!autoOperation)
                {
                    return;
                }

                EndOperation(ao);
                operationList.Remove(FindOperation(ao._operationId));

                Thread.Sleep(2000);//暂停两秒

                im.mainWindow.Dispatcher.Invoke(() =>
                {
                    ao.SetDefaultLastTime();
                    Start(ao);
                });
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
            }
        }
Example #2
0
        public void EndDelegate(object a)
        {
            try {
                AutoOperationInfo ao = (AutoOperationInfo)a;
                if (!autoOperation)
                {
                    return;
                }

                Thread.Sleep(1000);//等待一秒
                var op = FindOperation(ao._operationId);
                if (op != null)
                {
                    EndOperation(ao);
                    operationList.Remove(op);
                }
                else
                {
                    return;
                }

                Thread.Sleep(GetWaitSec());//暂停

                im.mainWindow.Dispatcher.Invoke(() =>
                {
                    ao.SetDefaultLastTime();
                    Start(ao);
                });
            }
            catch (Exception e)
            {
                im.logger.Log(e);
            }
        }