コード例 #1
0
        private void SwitchLight(string recognizedText)
        {
            byte result = (byte)speechToInt(recognizedText);

            Console.Out.WriteLine("RESULT: {0} ({1})", recognizedText, result);

            TcpSocketManager.getInstance().sendMessage(result);
            WebSockeManager.getInstance().sendMessage(result);
        }
コード例 #2
0
ファイル: Form1.cs プロジェクト: thebradbain/kinect-my-light
        public Form1()
        {
            KinectManager.getInstance().run();

            Console.WriteLine("Awaiting connection...");
            Thread clientConnectionThread = new Thread(() => TcpSocketManager.getInstance().connectClients(5555));

            clientConnectionThread.Name         = "TCP Connection Thread";
            clientConnectionThread.IsBackground = true;

            Thread webClientConnectionThread = new Thread(() => WebSockeManager.getInstance().connectClients(5556));

            webClientConnectionThread.Name      = "WebClient Connection Thread";
            clientConnectionThread.IsBackground = true;

            clientConnectionThread.Start();
            webClientConnectionThread.Start();
        }