/// +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+= /// <summary> /// Sync the screen state to the player state /// </summary> /// <param name="playerState">the player state</param> /// <history> /// 01 Nov 18 Cynic - Originally Written /// </history> private void SyncScreenStateToPlayerState(TantaEVRPlayerStateEnum playerState) { if (playerState == TantaEVRPlayerStateEnum.Ready) { textBoxVideoFileNameAndPath.Enabled = true; buttonPickFile.Enabled = true; labelVideoFilePathAndName.Enabled = true; } else { textBoxVideoFileNameAndPath.Enabled = false; buttonPickFile.Enabled = false; labelVideoFilePathAndName.Enabled = false; } }
/// +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+= /// <summary> /// Sync the screen state to the player state /// </summary> /// <param name="playerState">the player state</param> /// <history> /// 01 Nov 18 Cynic - Originally Written /// </history> private void SyncScreenStateToPlayerState(TantaEVRPlayerStateEnum playerState) { if (playerState == TantaEVRPlayerStateEnum.Ready) { groupBoxTransforms.Enabled = true; textBoxVideoFileNameAndPath.Enabled = true; buttonPickFile.Enabled = true; labelVideoFilePathAndName.Enabled = true; } else { groupBoxTransforms.Enabled = false; textBoxVideoFileNameAndPath.Enabled = false; buttonPickFile.Enabled = false; labelVideoFilePathAndName.Enabled = false; } SyncRotateGroupToTransformState(); }
/// +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+= /// <summary> /// Handle player state changed events /// </summary> /// <param name="sender">the sender object</param> /// <param name="playerState">the new player state</param> /// <history> /// 01 Nov 18 Cynic - Originally Written /// </history> public void PlayerStateChangedEventHandler(object sender, TantaEVRPlayerStateEnum playerState) { // are we about to open and set up ? if (playerState == TantaEVRPlayerStateEnum.OpenPending) { // we do nothing here. The transform to use is already // set in the checked changed event of the radio buttons } else if (playerState == TantaEVRPlayerStateEnum.StartPending) { // we are about to start, we need to tell the transform // what rotate mode to use. We cannot do this before now // because the transform has to be found and instantiated // before we can set the FlipMode on it SyncFlipModeOnTransformToCurrentState(); } // always do this SyncScreenStateToPlayerState(playerState); }
/// +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+= /// <summary> /// Handle player state changed events /// </summary> /// <param name="sender">the sender object</param> /// <param name="playerState">the new player state</param> /// <history> /// 01 Nov 18 Cynic - Originally Written /// </history> public void PlayerStateChangedEventHandler(object sender, TantaEVRPlayerStateEnum playerState) { SyncScreenStateToPlayerState(playerState); }