Пример #1
0
        public virtual int backErase()
        {
            int retval = -1;

            if (mNowTill > 1)
            {
                for (int i = 0; i < mElemCount; i++)
                {
                    CompNumCheck component = mCheckComps[i];

                    if (component.amDigiLabel.Content.Equals((mNowTill - 1).ToString()))
                    {
                        component.amDigiLabel.Content = "";
                        component.setUnClicked();
                        mOrder.RemoveAt(mOrder.Count - 1);
                        retval = i;
                        break;
                    }
                }

                mNowTill--;

                while (mNowTill > 2 && mOrder[mNowTill - 2] == -1)
                {
                    mOrder.RemoveAt(mNowTill - 2);
                    mNowTill--;
                }
            }

            return(retval);
        }
Пример #2
0
        /*public void SetTouchFree()
         * {
         *  for (int i = 0; i < mCheckComps.Count; i++)
         *  {
         *      mCheckComps[i].IsHitTestVisible = false;
         *  }
         * }
         *
         * public void SetTouchable()
         * {
         *  for (int i = 0; i < mCheckComps.Count; i++)
         *  {
         *      mCheckComps[i].IsHitTestVisible = true;
         *  }
         * }*/

        public virtual void onAction(int actionCompIndex)
        {
            if (mNowTill < mClickLimit /*10*/ && mTouchActivated)
            {
                CompNumCheck component = (CompNumCheck)mCheckComps[actionCompIndex];
                if (!component.clicked())
                {
                    component.setOderDigit(mNowTill);
                    mOrder.Add(actionCompIndex);
                    mNowTill++;
                    component.setClicked();
                }
            }
        }