예제 #1
0
        private List <RuleObj> UpdateTupleList(List <RuleObj> bambozledList, TrackingBuffer buffObj, int i, Keys key)
        {
            RuleObj tuple = new RuleObj(buffObj.buffer[i]._input, key);

            bambozledList.Add(tuple);
            bambozledList = SortTupleList(bambozledList, buffObj);
            return(bambozledList);
        }
예제 #2
0
        /* Checks if word has already been deleted */
        public bool OneWordValidation(Keys vkCode, TrackingBuffer buffer)
        {
            bool result = false;

            if (vkCode == Keys.Back && buffer.ValidateBounds(0))
            {
                if (buffer.GetValue(0) == " ")
                {
                    result = true;
                }
                else
                {
                    result = false;
                }
            }
            return(result);
        }
예제 #3
0
 public List <RuleObj> SortTupleList(List <RuleObj> bambozledList, TrackingBuffer buffObj)
 {
     if (bambozledList.Count > 0 && buffObj.Count() > 0)
     {
         for (int i = bambozledList.Count - 1; i >= 0; i--)
         {
             if (bambozledList[i].ruleKeyUsed == Keys.Back)
             {
                 RuleObj tupleObject = bambozledList[i];
                 tupleObject.ruleKeyUsed = Keys.Delete;
                 bambozledList.RemoveAt(i);
                 bambozledList.Insert(0, tupleObject);
             }
         }
     }
     return(bambozledList);
 }
예제 #4
0
        public List <RuleObj> RuleKey(Keys vkCode, List <RuleObj> bambozledList, TrackingBuffer buffObj, int timer_deleted)
        {
            RuleObj tupleObject = new RuleObj();

            if (vkCode == Keys.Delete && buffObj.ValidateBounds(1))
            {
                tupleObject.ruleKeyUsed  = Keys.Delete;
                tupleObject.deltedKey    = buffObj.GetDeleteValue();
                tupleObject.timerDeleted = timer_deleted;
            }
            else if (vkCode == Keys.Back && buffObj.ValidateBounds(0))
            {
                tupleObject.ruleKeyUsed  = Keys.Back;
                tupleObject.deltedKey    = buffObj.GetBackSpaceValue();
                tupleObject.timerDeleted = timer_deleted;
            }
            bambozledList.Add(tupleObject);

            return(bambozledList);
        }