Пример #1
0
        /*protected void OnLyricRequired()
         * {
         *  if (LyricRequired != null) LyricRequired(this, EventArgs.Empty);
         * }*/

        protected void OnMediaPlayingEnded(MediaPlayingEndedEventArgs e)
        {
            if (MediaPlayingEnded != null)
            {
                MediaPlayingEnded(this, e);
            }
        }
Пример #2
0
        private void Audio_Ending(object sender, EventArgs e)
        {
            if (loopEnabled)
            {
                audio.CurrentPosition = 0;
            }
            else
            {
                MediaPlayingEndedEventArgs mpee = new MediaPlayingEndedEventArgs();
                this.OnMediaPlayingEnded(mpee);
                if (mpee.Media != null)
                {
                    this.CurrentMedia          = mpee.Media;
                    this.Text                  = mpee.Media.Name.ToProperCase();
                    this.CurrentMediaScrobbled = false;
                }

                if (this.IsPlaying)
                {
                    this.Stop();
                }

                this.LoadFile(mpee.Media.Filename, mpee.Media == null);
                if (Properties.Settings.Default.VisibleMainTime)
                {
                    this.UpdateTiming("00:00 / " + Utility.ParseDuration((int)((IDurationable)mpee.Media).Duration, "D2"), 72, null);
                }
                if (continueToPlay)
                {
                    this.Play();
                }
            }
        }