private void qtPlayer_StatusUpdate(object sender, AxQTOControlLib._IQTControlEvents_StatusUpdateEvent e)
        {
            Logger.Info("StatusUpdate: " + e.statusMessage);
            // Status update event handler
            // Handle movie fullscreen events

            /*
                qtMovieLoadStateError = -1,
                qtStatusNone = 0,
                qtStatusConnecting = 2,
                qtStatusNegotiating = 5,
                qtStatusRequestedData = 11,
                qtStatusBuffering = 12,
                qtMovieLoadStateLoading = 1000,
                qtMovieLoadStateLoaded = 2000,
                qtStatusURLChanged = 4096,
                qtStatusFullScreenBegin = 4097,
                qtStatusFullScreenEnd = 4098,
                qtStatusMovieLoadFinalize = 4099,
                qtMovieLoadStatePlayable = 10000,
                qtMovieLoadStatePlaythroughOK = 20000,
                qtMovieLoadStateComplete = 100000,
            */

            switch ((QTStatusCodesEnum)e.statusCode)
            {
                // fullscreen begin
                case QTStatusCodesEnum.qtStatusFullScreenBegin:
                    this.Hide();	// hide movie window
                    break;

                // fullscreen end
                case QTStatusCodesEnum.qtStatusFullScreenEnd:
                    qtPlayer.SetScale(1);	// set back to a reasonable size
                    this.Show();	// show movie window again
                    break;

                case QTStatusCodesEnum.qtMovieLoadStateError:
                    var playerErrorEventArgs = new PlayerErrorEventArgs();
                    playerErrorEventArgs.ErrorMessage = "We couldn't load the movie!";
                    playerErrorEventArgs.SupportID = "ErrorLoadingVideo";
                    if (PlayerError != null)
                        PlayerError(sender, playerErrorEventArgs);
                    break;

                case QTStatusCodesEnum.qtMovieLoadStateComplete:
                    var openStateEventArgs = new OpenStateChangedEventArgs();
                    openStateEventArgs.OpenState = GenericPlayerControl.OpenStates.Open;
                    if (OpenStateChanged != null)
                        OpenStateChanged(sender, openStateEventArgs);
                    break;
            }
        }
        private void wmPlayer_OpenStateChange(object sender, _WMPOCXEvents_OpenStateChangeEvent e)
        {
            var openStateEventArgs = new OpenStateChangedEventArgs();

            string friendlyState;
            switch ((WMPLib.WMPOpenState)e.newState)
            {
                case WMPLib.WMPOpenState.wmposUndefined: friendlyState = "Undefined"; break;
                case WMPLib.WMPOpenState.wmposPlaylistChanging: friendlyState = "PlaylistChanging"; break;
                case WMPLib.WMPOpenState.wmposPlaylistLocating: friendlyState = "PlaylistLocating"; break;
                case WMPLib.WMPOpenState.wmposPlaylistConnecting: friendlyState = "PlaylistConnecting"; break;
                case WMPLib.WMPOpenState.wmposPlaylistLoading: friendlyState = "PlaylistLoading"; break;
                case WMPLib.WMPOpenState.wmposPlaylistOpening: friendlyState = "PlaylistOpening"; break;
                case WMPLib.WMPOpenState.wmposPlaylistOpenNoMedia: friendlyState = "PlaylistOpenNoMedia"; break;
                case WMPLib.WMPOpenState.wmposPlaylistChanged: friendlyState = "PlaylistChanged"; break;
                case WMPLib.WMPOpenState.wmposMediaChanging: friendlyState = "MediaChanging"; break;
                case WMPLib.WMPOpenState.wmposMediaLocating: friendlyState = "MediaLocating"; break;
                case WMPLib.WMPOpenState.wmposMediaConnecting: friendlyState = "MediaConnecting"; break;
                case WMPLib.WMPOpenState.wmposMediaLoading: friendlyState = "MediaLoading"; break;
                case WMPLib.WMPOpenState.wmposMediaOpening: friendlyState = "MediaOpening"; break;
                case WMPLib.WMPOpenState.wmposMediaOpen:
                    openStateEventArgs.OpenState = GenericPlayerControl.OpenStates.Open;
                    friendlyState = "MediaOpen";
                    break;
                case WMPLib.WMPOpenState.wmposBeginCodecAcquisition: friendlyState = "BeginCodecAcquisition"; break;
                case WMPLib.WMPOpenState.wmposEndCodecAcquisition: friendlyState = "EndCodecAcquisition"; break;
                case WMPLib.WMPOpenState.wmposBeginLicenseAcquisition: friendlyState = "BeginLicenseAcquisition"; break;
                case WMPLib.WMPOpenState.wmposEndLicenseAcquisition: friendlyState = "EndLicenseAcquisition"; break;
                case WMPLib.WMPOpenState.wmposBeginIndividualization: friendlyState = "BeginIndividualization"; break;
                case WMPLib.WMPOpenState.wmposEndIndividualization: friendlyState = "EndIndividualization"; break;
                case WMPLib.WMPOpenState.wmposMediaWaiting: friendlyState = "MediaWaiting"; break;
                case WMPLib.WMPOpenState.wmposOpeningUnknownURL: friendlyState = "OpeningUnknownURL"; break;
                default: friendlyState = "Unknown"; break;
            }

            Logger.Debug("OpenStateChanged: " + friendlyState);

            if (OpenStateChanged != null)
            {
                OpenStateChanged(sender, openStateEventArgs);
            }
        }
        private void videoPlayer_OpenStateChanged(object sender, OpenStateChangedEventArgs e)
        {
            if (e.OpenState == GenericPlayerControl.OpenStates.Open)
            {
                playHeadBox.Visible = true;

                // do this here because we know media has loaded
                UpdateTickBoxLocations();
            }
        }
        private void handleOpenStateChanged(object sender, OpenStateChangedEventArgs e)
        {
            Logger.Info("OpenState: " + e.OpenState);

            if (OpenStateChanged != null)
                OpenStateChanged(sender, e);
        }