Business.MpcPlayerBusiness.Player_MPC_NowPlaying C# (CSharp) Method

Player_MPC_NowPlaying() private method

When playing new file, update CurrentVideo.Length and raise NowPlaying event.
private Player_MPC_NowPlaying ( MPC msg ) : void
msg MPC
return void
        private void Player_MPC_NowPlaying(MPC.MSGIN msg) {
            timerGetPosition.Start();

            string[] FileInfo = msg.Message.Split('|');
            CurrentVideo.Length = (short)double.Parse(FileInfo[4], CultureInfo.InvariantCulture);

            // In later version of MPC-HC, this event keeps firing repeatedly, so ignore when file path is the same.
            if (!string.IsNullOrEmpty(FileInfo[3]) && nowPlayingPath != FileInfo[3]) {
                nowPlayingPath = FileInfo[3];
                position = 0;
                timerPlayTimeout.Stop();

                if (NowPlaying != null)
                    NowPlaying(this, new EventArgs());

                TimerGetPositionEnabled = true;
            }
        }