Example #1
0
 public void RegisterGestureRecognizer(string recognizerName)
 {
     if (mGestureRecognizer != null)
     {
         if (recognizerName.Equals(mGestureRecognizer.GetId()))
         {
             return;
         }
     }
     //try create a new one
     mGestureRecognizer = BaseGestureRecognizer.Create(recognizerName);
     mGestureRecognizer.Initialize();
     TryActiveTouchManager();
 }
Example #2
0
 public TouchManager(int maxCount = 10)
 {
     mActivedTouchQueue = new LinkedList <TouchQueue>();
     mGestureListeners  = new List <GestureListener>();
     mGestureRecognizer = BaseGestureRecognizer.Create(BaseGestureRecognizer.NAME_ID);
     mTimer             = new Stopwatch();
     mTimer.Reset();
     mMaxTouchQueueCount = maxCount;
     mTouchQueues        = new List <TouchQueue>();
     for (int i = 0; i < mMaxTouchQueueCount; i++)
     {
         mTouchQueues.Add(new TouchQueue(i));
     }
     mTimer.Start();
 }