Beispiel #1
0
        private async void ResetMarkerCandidateAsync()
        {
            await DoWithDelay(
                "Removing marker candidate",
                () => OnMarkerCandidateUpdated?.Invoke(MarkerCandidateState.NotDetected)
                );

            await Task.Delay(5000);

            await DoWithDelay(
                "Emulating marker candidate",
                () => OnMarkerCandidateUpdated?.Invoke(MarkerCandidateState.Detected)
                );
        }
Beispiel #2
0
        private void UpdateCandidateState(int count)
        {
            var newState = count == 3
                                ? MarkerCandidateState.Detected
                                : MarkerCandidateState.NotDetected;

            if (_candidateState != newState)
            {
                Debug.WriteLine($"{nameof(MarkerCandidateState)} - {newState}");

                _candidateState = newState;
                OnMarkerCandidateUpdated?.Invoke(newState);
            }
        }