Ejemplo n.º 1
0
    public void RaiseSourceDetected(IInputSource source, uint sourceId, object[] tags = null)
    {
        // Manage list of detected sources
        bool alreadyDetected = false;

        for (int iDetected = 0; iDetected < detectedInputSources.Count; iDetected++)
        {
            if (detectedInputSources[iDetected].Matches(source, sourceId))
            {
                alreadyDetected = true;
                break;
            }
        }

        if (!alreadyDetected)
        {
            detectedInputSources.Add(new InputSourceInfo(source, sourceId));
        }

        // Create input event
        sourceStateEventData.Initialize(source, sourceId, tags);

        // Pass handler through HandleEvent to perform modal/fallback logic
        HandleEvent(sourceStateEventData, OnSourceDetectedEventHandler);
    }
        public void RaiseSourceDetected(IInputSource source, uint sourceId, object[] tags = null)
        {
            AddSource(source, sourceId);

            // Create input event
            sourceStateEventData.Initialize(source, sourceId, tags);

            // Pass handler through HandleEvent to perform modal/fallback logic
            HandleEvent(sourceStateEventData, OnSourceDetectedEventHandler);
        }