Ejemplo n.º 1
0
    public EyeXGazePointDataStream(EyeXHost host, EyeXGazePointType gazePointType)
    {
        _eyeXHost = host;
        _gazePointType = gazePointType;

        // create a global interactor for the data stream and register it with the EyeXHost.
        var interactor = new EyeXGlobalInteractor(InteractorId, AssignGazePointDataBehavior, HandleEvent);
        _eyeXHost.RegisterGlobalInteractor(interactor);
    }
Ejemplo n.º 2
0
    /// <summary>
    /// Registers a global interactor with the repository.
    /// </summary>
    /// <param name="interactor">Interactor.</param>
    public void RegisterGlobalInteractor(EyeXGlobalInteractor globalInteractor)
    {
        lock (_lock)
        {
            _globalInteractors[globalInteractor.Id] = globalInteractor;
        }

        if (_isConnected)
        {
            CommitGlobalInteractors(new[] { globalInteractor });
        }
    }