Esempio n. 1
0
 //thread du RankChief
 public void WaiterWorkThread()
 {
     while (true)
     {
         if (ToDoWaiter.Count != 0)
         {
             theDelagate = ToDoWaiter.First().MyFunctionDelegate;
             theDelagate(ToDoWaiter.First().Group);
         }
         Thread.Sleep(1000);
     }
 }
Esempio n. 2
0
 //thread du RankChief
 public void RankChiefWorkThread()
 {
     Console.WriteLine("Thread Serveur n° " + Id + " pret.");
     group1 = new CustomerGroup
     {
         StateGroup = "ordering"
     };
     while (true)
     {
         if (ToDoRankChief.Count != 0)
         {
             Console.WriteLine("Chef de rang : je suis là");
             theDelagate = ToDoRankChief.First().MyFunctionDelegate;
             theDelagate(ToDoRankChief.First().Group);
             ToDoRankChief.Remove(ToDoRankChief.First());
         }
         Thread.Sleep(1000);
     }
 }
Esempio n. 3
0
 public ActionItem(String cmd, actionDelegate func)
 {
     this.cmd  = cmd;
     this.func = func;
 }
Esempio n. 4
0
        public void addDelegateAction(int stateId, ActionOnEnterOrLeaveEnum enterOrLeave, actionDelegate dlg)
        {
            StateAction c = new StateAction();

            c.stateId      = stateId;
            c.enterOrLeave = enterOrLeave;
            c.actionType   = StateActionTypeEnum.ExecDelegate;
            c.dlg          = dlg;
            stateActions.Add(c);
        }
 public SingleMission(actionDelegate action, string name)
 {
     SingleAction = action;
     Name         = name;
     Type         = "Single";
 }
 /// <summary>
 /// add action name and action to the container
 /// </summary>
 /// <param name="str">action name</param>
 /// <param name="action">action</param>
 void addStrAndAction(string str, actionDelegate action)
 {
     strToAction.Add(str, action);
 }
Esempio n. 7
0
 public Actions(actionDelegate action, CustomerGroup groups)
 {
     MyFunctionDelegate = action;
     Group = groups;
 }
 /// <summary>
 /// add action to the list
 /// </summary>
 /// <param name="action"> action to add to the mission </param>
 /// <returns> this- the composed mission with the added action for fluent programming </returns>
 public ComposedMission Add(actionDelegate action)
 {
     MultipleActions.Add(action);
     return(this);
 }
 public void SetActionToPerform(actionDelegate perform)
 {
     performAction = perform;
 }
Esempio n. 10
0
 public void Reset()
 {
     cList.Clear();
     gList.Clear();
     onCloseAction = null;
     performAction = null;
     bIsExitEnabled = true;
 }