wpf_player.ObservableStream.launchEvent C# (CSharp) Method

launchEvent() private method

This method is used to launch stream events. This performs check for waiting state and last launched position and raise the right event in the right moment.
private launchEvent ( ) : void
return void
        private void launchEvent()
        {
            if ((waiting) && (Position >= positionWaited))
            {
                waiting = false;
                OnWaitedPositionReached(new EventArgs());
            }
            if ((Position == Length) || ((Position - lastLaunchedPosition) > 1024))
            {
                lastLaunchedPosition = Position;
                OnPositionChanges(new EventArgs());
            }
        }