Beispiel #1
0
        private void Button_Click(object sender, RoutedEventArgs e)
        {
            if (imageviewer != null)
            {
                return;
            }
            string videopath;
            string widthstr, heightstr;

            string[]     strsplit = new string[2];
            StreamReader sr       = new StreamReader(cfgpath, Encoding.Default);

            if (sr == null)
            {
                MessageBox.Show("file does not exist");
                return;
            }
            videopath = sr.ReadLine();
            widthstr  = sr.ReadLine();
            heightstr = sr.ReadLine();

            strsplit = widthstr.Split(':');
            width    = System.Int32.Parse(strsplit[1]);
            strsplit = heightstr.Split(':');
            height   = System.Int32.Parse(strsplit[1]);
            OpenFile(videopath);
            KinectProcess();
            Gestures.AddGesture(SupportedGestures.ENLARGE);
            Gestures.AddGesture(SupportedGestures.CLOSE);
            Gestures.AddGesture(SupportedGestures.CIRCLE);
            Gestures.AddGesture(SupportedGestures.EXIT);
            EnlargeGestures.GestureDetected       += _EnlargeGestures_EnlargeGestureDetected;
            CloseGestures.GestureDetected         += _closeGestures_CloseGestureDetected;
            ExitGetures.GestureDetected           += _exitGestures_ExitDetected;
            CircleControlGestures.GestureDetected += _circleGestures_CircleGestureDetected;
            Gestures.CreateGestures();
        }