예제 #1
0
        public MainWindow()
        {
            InitializeComponent();

            portChat = new PortChat();

            portChat.init("COM3", 9600);

            // Create the drawing group we'll use for drawing
            this.drawingGroup = new DrawingGroup();


            // Create an image source that we can use in our image control
            this.imageSource = new DrawingImage(this.drawingGroup);

            // Display the drawing using our image control
            SkeletonImage.Source = this.imageSource;

            // for old_skeletonFrameReady function
            skeletonBrushes = new Brush[] { Brushes.Red };

            this._WaveGesture = new WaveGesture();
            this._WaveGesture.GestureDetected        += new EventHandler(_WaveGesture_GestureDetected);
            KinectSensor.KinectSensors.StatusChanged += KinectSensors_StatusChanged;
            this.KinectDevice = KinectSensor.KinectSensors.FirstOrDefault(x => x.Status == KinectStatus.Connected);
        }
예제 #2
0
파일: Form1.cs 프로젝트: guigur/YADEL
        private void button1_Click(object sender, EventArgs e)
        {
            SerialPort _serialPort = new SerialPort("COM35", 9600, Parity.None, 8, StopBits.One);

            _serialPort.Handshake     = Handshake.None;
            _serialPort.DataReceived += new SerialDataReceivedEventHandler(sp_DataReceived);


            Debug.WriteLine("but");
            PortChat p = new PortChat();
        }
예제 #3
0
        public MainWindow()
        {
            InitializeComponent();

            portChat = new PortChat();
            portChat.init("COM3", 9600);
            _continue  = false;
            readThread = new Thread(sendServo);

            this._WaveGesture = new WaveGesture();
            this._WaveGesture.GestureDetected += new EventHandler(_WaveGesture_GestureDetected);
            this._kinectDevice = KinectSensor.KinectSensors.FirstOrDefault(x => x.Status == KinectStatus.Connected);
            this._kinectDevice.SkeletonFrameReady += KinectDevice_SkeletonFrameReady;
        }