Exemplo n.º 1
0
        public void RequestTracker(GazeManager.ClientMode mode, GazeManager.ApiVersion version)
        {
            TrackerSetRequest gr = new TrackerSetRequest();

            gr.Values.Version = (int)version.GetTypeCode();
            gr.Values.Push = mode == GazeManager.ClientMode.Push;

            Request(JsonConvert.SerializeObject(gr));
        }
Exemplo n.º 2
0
 public static GazeManager GetTrackerState(GazeManager gazemanager, out String state)
 {
     state = gazemanager.Trackerstate.ToString();
     return(gazemanager);
 }
Exemplo n.º 3
0
 //returning and taking GazeManager as input even though it's singleton, so we don't have timing ambiguity in VL
 public static GazeManager Activate(GazeManager gazemanager)
 {
     gazemanager.Activate(GazeManager.ApiVersion.VERSION_1_0, GazeManager.ClientMode.Push);
     return(gazemanager);
 }
Exemplo n.º 4
0
 public static GazeManager CalibrationStart(GazeManager gazemanager, Int32 numCalibrationPoints, ICalibrationProcessHandler listener)
 {
     GazeManager.Instance.CalibrationStart(Convert.ToInt16(numCalibrationPoints), listener);
     return(gazemanager);
 }
        public void OnTrackerStateChanged(GazeManager.TrackerState trackerState)
        {
            if (labelDeviceConnected.Dispatcher.Thread != Thread.CurrentThread)
            {
                this.Dispatcher.BeginInvoke(new MethodInvoker(() => OnTrackerStateChanged(trackerState)));
                return;
            }

            gridContent.Visibility = Visibility.Hidden;

            switch (trackerState)
            {
                case GazeManager.TrackerState.TRACKER_CONNECTED:
                    labelDeviceConnected.Content = "";
                    gridContent.Visibility = Visibility.Visible;
                    break;
                case GazeManager.TrackerState.TRACKER_CONNECTED_NOUSB3:
                    labelDeviceConnected.Content = "Device connected to a USB2.0 port";
                    break;
                case GazeManager.TrackerState.TRACKER_CONNECTED_BADFW:
                    labelDeviceConnected.Content = "A firmware updated is required.";
                    break;
                case GazeManager.TrackerState.TRACKER_NOT_CONNECTED:
                    labelDeviceConnected.Content = "Device not connected.";
                    break;
                case GazeManager.TrackerState.TRACKER_CONNECTED_NOSTREAM:
                    labelDeviceConnected.Content = "No data coming out of the sensor.";
                    break;
            }
        }