SampleApp.MainForm.Disconnect C# (CSharp) Method

Disconnect() private method

private Disconnect ( ) : void
return void
        private void Disconnect( )
        {
            if ( videoSourcePlayer.VideoSource != null )
            {
                // stop video device
                videoSourcePlayer.SignalToStop( );
                videoSourcePlayer.WaitForStop( );
                videoSourcePlayer.VideoSource = null;

                if ( videoDevice.ProvideSnapshots )
                {
                    videoDevice.SnapshotFrame -= new NewFrameEventHandler( videoDevice_SnapshotFrame );
                }

                EnableConnectionControls( true );
            }
        }
MainForm