Пример #1
0
 public ActionResult stop(ArgBag arg)
 {
     if (bStarted)
     {
         threadTimer.Dispose();
     }
     return(View());
 }
Пример #2
0
 public ActionResult start(ArgBag arg)
 {
     if (!bStarted)
     {
         System.Threading.TimerCallback timerDelegate = new System.Threading.TimerCallback(main);
         threadTimer = new System.Threading.Timer(timerDelegate, null, dueTime, period);
         bStarted    = true;
     }
     return(View());
 }
Пример #3
0
        public ActionResult Action2(ArgBag arg)
        {
            if (arg.isNotType("ArgNull"))
            {
                throw new Exception("[ERROR] Invalid argument.");
            }

            arg = (ArgNull)arg;

            return(View());
        }
Пример #4
0
        public ActionResult InputKeyRight(ArgBag arg)
        {
            if (arg.isNotType("ArgNull"))
            {
                throw new Exception("[ERROR] Invalid argument.");
            }

            arg = (ArgNull)arg;

            ((MainGameModel)model).notifyUpdate();

            return(View());
        }
Пример #5
0
        public ActionResult callAction(int ID, ArgBag arg)
        {
            ActionRouting target = null;

            foreach (ActionRouting action in actionRoutingList)
            {
                if (ID == action.actionID)
                {
                    target = action;
                }
            }

            if (null != target)
            {
                return(target.action(arg));
            }
            else
            {
                return(null);
            }
        }
Пример #6
0
 public ActionResult DefaultAction(ArgBag arg)
 {
     return(View());
 }