Exemplo n.º 1
0
        protected void TryEvent_NoLock(InputEvent evt)
        {
            bool showBusyScreen = false;

            lock (_syncObj)
            {
                if (IsTerminated)
                {
                    return;
                }
                if (_callingClientStart.HasValue && _callingClientStart.Value < DateTime.Now - BUSY_TIMEOUT)
                {                       // Client call lasts longer than our BUSY_TIMEOUT
                    ClearInputBuffer(); // Discard all later input
                    if (!_busyScreenVisible)
                    {
                        showBusyScreen = true;
                    }
                }
            }
            if (showBusyScreen)
            {
                ISuperLayerManager superLayerManager = ServiceRegistration.Get <ISuperLayerManager>();
                superLayerManager.ShowBusyScreen();
                lock (_syncObj)
                    _busyScreenVisible = true;
                return; // Finished, no further processing
            }
            EnqueueEvent(evt);
        }
Exemplo n.º 2
0
        private void BusyTimeoutTimerCallback(object state)
        {
            lock (_syncObj)
            {
                if (IsTerminated || !_callingClientStart.HasValue)
                {
                    return;
                }
                // Client call lasts longer than our BUSY_TIMEOUT
                ClearInputBuffer(); // Discard all later input
                if (_busyScreenVisible)
                {
                    return;
                }
            }

            ISuperLayerManager superLayerManager = ServiceRegistration.Get <ISuperLayerManager>();

            superLayerManager.ShowBusyScreen();
            lock (_syncObj)
                _busyScreenVisible = true;
        }