Esempio n. 1
0
        private int GetStateIndex(HCOperState aState)
        {
            for (int i = 0; i < FStates.Count; i++)
            {
                if (FStates[i].State == aState)
                {
                    return(i);
                }
            }

            return(-1);
        }
Esempio n. 2
0
        public void Exclude(HCOperState aState)
        {
            int vIndex = GetStateIndex(aState);

            if (vIndex >= 0)
            {
                if (FStates[vIndex].Count > 1)
                {
                    FStates[vIndex].Count--;
                }
                else
                {
                    DeleteState(vIndex);
                }
            }
        }
Esempio n. 3
0
        public void Include(HCOperState aState)
        {
            int vIndex = GetStateIndex(aState);

            if (vIndex >= 0)
            {
                FStates[vIndex].Count++;
            }
            else
            {
                HCStateDictionary vStateDic = new HCStateDictionary();
                vStateDic.State = aState;
                vStateDic.Count = 1;
                FStates.Add(vStateDic);
            }
        }
Esempio n. 4
0
 public bool Contain(HCOperState aState)
 {
     return(GetStateIndex(aState) >= 0);
 }