Esempio n. 1
0
        private void StopCapture(bool bNotifyRemote, bool bNotifyGUI)
        {
            if (State == EState.NONE)
            {
                return;
            }

            if (bNotifyRemote)
            {
                m_captureServer?.SendStopCapture();
            }

            State = EState.NONE;
            m_startScreenCaptureTCS?.TrySetResult(false);
            m_startScreenCaptureTCS = null;

            m_CancelToken?.Cancel();
            if (bNotifyGUI)
            {
                ScreenCaptureCancelled?.Invoke(this, new EventArgs());
            }

            if (m_captureServer != null)
            {
                m_captureServer.ReceivedScreenCapture -= OnScreenCaptureReceivedEvent;
            }

            m_lastDecodedFrame = null;
            m_transferRateList.Clear();
            m_nTransferRate = 0;
        }
Esempio n. 2
0
 internal void OnScreenCaptureCancelled(object sender)
 {
     ScreenCaptureCancelled?.Invoke(sender, EventArgs.Empty);
 }