Esempio n. 1
0
 public void AddItemResult(TutorialIdResultEvent e, Node any, [JoinAll] SingleNode <ResetFreeEnergyStepHandler> stepHandler, [JoinAll] ICollection <TutorialStepNode> steps, [JoinAll] SingleNode <ClientSessionComponent> session)
 {
     if (stepHandler.component.stepId == e.Id)
     {
         TutorialStepNode stepById = this.GetStepById(stepHandler.component.stepId, steps);
         this.AddItemResultHandler(e, stepHandler.component, stepById, session);
     }
 }
Esempio n. 2
0
 public void AddItemResult(TutorialIdResultEvent e, Node any, [JoinAll] ICollection <SingleNode <AddItemStepHandler> > stepHandlers, [JoinAll] ICollection <TutorialStepNode> steps, [JoinAll] SingleNode <ClientSessionComponent> session)
 {
     foreach (SingleNode <AddItemStepHandler> node in stepHandlers)
     {
         if (node.component.stepId == e.Id)
         {
             TutorialStepNode stepById = this.GetStepById(node.component.stepId, steps);
             this.AddItemResultHandler(e, node.component, stepById, session);
         }
     }
 }
Esempio n. 3
0
 private void AddItemResultHandler(TutorialIdResultEvent e, AddItemStepHandler stepHandler, TutorialStepNode step, SingleNode <ClientSessionComponent> session)
 {
     if (!e.ActionExecuted)
     {
         stepHandler.Fail(e.Id);
     }
     else
     {
         if (step != null)
         {
             IList <TutorialNode> source = base.Select <TutorialNode>(step.Entity, typeof(TutorialGroupComponent));
             if (source.Count > 0)
             {
                 TutorialNode node = source.Single <TutorialNode>();
                 base.ScheduleEvent(new ApplyTutorialIdEvent(node.tutorialData.TutorialId), session);
             }
         }
         stepHandler.Success(e.Id);
     }
 }