Exemplo n.º 1
0
 //Private Functions
 public void SetCurrent(PlanningAppState planningAppState)
 {
     foreach (var state  in OrderedPlanningAppStates)
     {
         state.CurrentState = false;
     }
     OrderedPlanningAppStates[OrderedPlanningAppStates.IndexOf(planningAppState)].CurrentState = true;
 }
Exemplo n.º 2
0
 public PlanningAppState SeekPrev(PlanningAppState planningAppState) //Get previous state based on specified State
 {
     if (!Completed() && !isFirstState(planningAppState))
     {
         return(OrderedPlanningAppStates[OrderedPlanningAppStates.IndexOf(planningAppState) - 1]);
     }
     else
     {
         return(null);
     }
 }
Exemplo n.º 3
0
 public PlanningAppState SeekPrev()  //Get previous state based on CurrentState
 {
     if (!Completed() && !isFirstState(Current()))
     {
         return(OrderedPlanningAppStates[OrderedPlanningAppStates.IndexOf(Current()) - 1]);
     }
     else
     {
         return(null);
     }
 }
Exemplo n.º 4
0
 public PlanningAppState SeekNext()
 {
     if (!Completed() && !isLastState(Current()))
     {
         return(OrderedPlanningAppStates[OrderedPlanningAppStates.IndexOf(Current()) + 1]);
     }
     else
     {
         return(null);
     }
 }
Exemplo n.º 5
0
        public PlanningAppState Next(PlanningAppState planningAppState)
        {
            PlanningAppState nextState = new PlanningAppState();

            if (!isLastState(planningAppState))
            {
                nextState = OrderedPlanningAppStates[OrderedPlanningAppStates.IndexOf(planningAppState) + 1];
                planningAppState.CurrentState = false;
                nextState.CurrentState        = true;
                return(nextState);
            }
            else
            {
                return(null);
            }
        }
Exemplo n.º 6
0
 public bool isFirstState(PlanningAppState planningAppState)
 {
     return(OrderedPlanningAppStates.IndexOf(planningAppState) == 0);
 }
Exemplo n.º 7
0
 public bool isLastState(PlanningAppState planningAppState)
 {
     return(OrderedPlanningAppStates.Count() == (OrderedPlanningAppStates.IndexOf(planningAppState) + 1));
 }