Example #1
0
        public Person(Device d)
        {
            Random r = new Random();

            skeletons        = new Queue <SmothendSkeleton>(); // newest skeletons are first
            _dev             = d;
            Id               = r.Next();
            wave             = new WaveGestureChecker(this);
            wave.Successful += Waving;

            /*
             * wave.Failed += delegate(object o, EventArgs e) { Console.WriteLine("fail"); };
             */
            zoom             = new ZoomGestureChecker(this);
            zoom.Successful += delegate(object o, GestureEventArgs ev)
            {
                if (OnZoom != null)
                {
                    OnZoom(this, ev);
                }
            };
            swipe             = new SwipeGestureChecker(this);
            swipe.Successful += delegate(object o, GestureEventArgs e)
            {
                if (OnSwipe != null)
                {
                    OnSwipe(this, e);
                }
            };
        }
Example #2
0
        public Person(Device d)
        {
            Random r = new Random();

            skeletons        = new Queue <SmothendSkeleton>(); // newest skeletons are first
            _dev             = d;
            Id               = r.Next();
            wave             = new WaveGestureChecker(this);
            wave.Successful += Waving;

            /*
             * wave.Failed += delegate(object o, EventArgs e) { Console.WriteLine("fail"); };
             */
            //zoom = new ZoomGestureChecker(this);
            //zoom.Successful += delegate(object o, GestureEventArgs ev)
            //{
            //    if (OnZoom != null)
            //    {
            //        OnZoom(this, ev);
            //    }
            //};
            //zoom.Failed += delegate(object o, GestureEventArgs e)
            //{
            //    Console.WriteLine("zoom fail");
            //};
            //swipe = new SwipeGestureChecker(this);
            //swipe.Successful += delegate(object o, GestureEventArgs e)
            //{
            //    if (OnSwipe != null)
            //    {
            //        OnSwipe(this, e);
            //    }
            //    //Console.WriteLine("SWIPED: " + ((SwipeGestureEventArgs)e).Direction.ToString());
            //};
            //swipe.Failed += delegate
            //    {
            //    //Console.WriteLine("FAIL: " + ((FailedGestureEventArgs)e).Condition.GetType().Name);
            //};
        }