Пример #1
0
 public Leds(string ip, int port)
 {
     LedsProxy led = new LedsProxy(ip, port);
     led.on("ChestLedsRed");
     Thread.Sleep(2000);
     led.on("ChestLedsGreen");
     Thread.Sleep(2000);
     led.off("ChestLeds");
 }
 public MainWindow(string ip,int port,int condition)
     : this()
 {
     this.ip = ip;
     this.port = port;
     this.condition = condition;
     this.started = false;
     led = new LedsProxy(ip, port);
     led.off("ChestLeds");
     led.on("ChestLedsGreen");
     completeCheck = new Check.Check();
 }
 public MainWindow(string ip,int port,int condition)
     : this()
 {
     this.ip = ip;
     this.port = port;
     led = new LedsProxy(ip, port);
     led.off("ChestLeds");
     led.on("ChestLedsGreen");
     this.condition = condition;
     this.started = false;
     this.interupted = false;
 }
        public MainWindow(string ip, int port, int condition)
        {
            count = 1;
            this.ip = ip;
            this.port = port;
            this.condition = condition;
            ready = true;

            this.Background = new SolidColorBrush(Colors.LightGreen);

            InitializeComponent();
            this.tts = new TextToSpeechProxy(ip, port);

            gazeControl = new GazeControl(ip, port);

            this.led = new LedsProxy(ip, port);
            led.off("ChestLeds");
            led.on("ChestLedsGreen");
            started = false;
        }
        public MainWindow(string ip, int port, int condition)
        {
            this.ip = ip;
            this.port = port;
            this.condition = condition;
            InitializeComponent();
            completeCheck = new Check.Check();
            ready = true;

            this.Background = new SolidColorBrush(Colors.LightGreen);

            gazeControl = new GazeControl(ip, port);
            kinect = new HCI.GAS.Kinect.KinectAudio("XMLs\\Thoughtfulness_Grammar.xml",ip,port);
            led = new LedsProxy(ip, port);
            led.off("ChestLeds");
            led.on("ChestLedsGreen");

            //TODO: check if auto has been depreciated.
            kinect.auto = false;

            end = false;
            tts = new TextToSpeechProxy(ip, port);
        }
 private void Window_Closing(object sender, System.ComponentModel.CancelEventArgs e)
 {
     end = true;
     if (gazeControl != null)
         gazeControl.end();
     if (kinect != null)
         kinect.EndKinect();
     LedsProxy led = new LedsProxy(ip, port);
     led.off("ChestLeds");
     led.on("ChestLedsRed");
     kinect = null;
 }