Example #1
0
 public static void ExecuteAction(this TurnOffInverterAction a, int actionId = 0)
 {
     Messenger.Default.Send(new TurnOffInverterMessage()
     {
         Head         = a.Head,
         Order        = a.Order,
         Duration     = a.Duration,
         BackNotifyId = actionId
     });
 }
Example #2
0
 public static BaseAction CreateBackStepAction(this TurnOffInverterAction a)
 {
     if (a.RotationSpeed > 0)
     {
         return(new TurnOnInverterAction()
         {
             Head = a.Head,
             Order = a.Order,
             RotationSpeed = a.RotationSpeed
         });
     }
     else
     {
         return(null);
     }
 }
Example #3
0
 private BaseAction CreateBackStepAction(TurnOffInverterAction action)
 {
     if (action.RotationSpeed > 0)
     {
         return(new TurnOnInverterAction()
         {
             Head = action.Head,
             Order = action.Order,
             RotationSpeed = action.RotationSpeed
         });
     }
     else
     {
         return(null);
     }
 }
Example #4
0
 private void Execute(TurnOffInverterAction action, int notifyId)
 {
     InverterController.TurnOff();
     NotifyExecuted(notifyId);
 }