Exemplo n.º 1
0
 public DynamicBuildOrder SetCurrentBuildOrder(DynamicBuildOrder dynamicBuildOrder)
 {
     if (List.Contains(dynamicBuildOrder))
     {
         Current = dynamicBuildOrder;
     }
     else
     {
         Current = null;
     }
     return(Current);
 }
Exemplo n.º 2
0
        public DynamicBuildOrder Previous()
        {
            int index = List.IndexOf(Current);

            if (List.Count == 0 || index <= 0)
            {
                if (List.Count > 0)
                {
                    Current = List[List.Count - 1];
                }
                else
                {
                    Current = null;
                }
            }
            else
            {
                Current = List[index - 1];
            }
            return(Current);
        }
Exemplo n.º 3
0
        public DynamicBuildOrder Next()
        {
            int index = List.IndexOf(Current);

            if (List.Count == 0 || index + 1 >= List.Count || index == -1)
            {
                if (List.Count > 0)
                {
                    Current = List[0];
                }
                else
                {
                    Current = null;
                }
            }
            else
            {
                Current = List[index + 1];
            }
            return(Current);
        }