Beispiel #1
0
        public bool Redo(SpotOrder so)
        {
            if (so == null)
            {
                return(false);
            }
            if (!so.IsArrangable())
            {
                return(false);
            }
            if (so.IsArranging())
            {
                return(false);
            }
            so.State = OrderState.已撤销;
            var r = Container.Remove(so);

            so.UnFreeze();
            if (OnFinish != null)
            {
                foreach (var v in OnFinish.GetInvocationList())
                {
                    ((Action <SpotOrder>)v)(so);
                }
            }
            return(r);
        }
Beispiel #2
0
        internal static bool InvokeFinish(TrackedTeleport args)
        {
            var invocationList = OnFinish?.GetInvocationList();

            if (invocationList != null)
            {
                foreach (var m in invocationList)
                {
                    m?.DynamicInvoke(args);
                }
            }

            return(true);
        }
Beispiel #3
0
 void RaiseFinish(SpotOrder so)
 {
     if (so.IsDone())
     {
         so.Trader.RemoveSpotOrder(so);
         model.SpotOrders.Remove(so);
         if (OnFinish != null)
         {
             foreach (var v in OnFinish.GetInvocationList())
             {
                 ((Action <SpotOrder>)v)(so);
             }
         }
     }
     else
     {
         model.UpdatePartial(so);
         RaisePartialFinish(so);
     }
 }