Ejemplo n.º 1
0
        /// <summary>
        /// Returns true if it should be shown before song end and that criteria is enabled.
        /// </summary>
        /// <returns></returns>
        private bool BeforeSongEndSat()
        {
            IPlayControl pc = Main.PlayControl;

            if (!_beforeSongEnds.Value || !pc.IsPlaying() || pc.IsPaused())
            {
                return(false);
            }
            return(_lastSong != null && (_lastSong.GetLength() - _beforeSongEndsStay.Value <= pc.PlaybackGetPosition()));
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Returns true if foo_title is displayed because nothing is playing and showWhenNotPlaying is enabled.
        /// </summary>
        private bool NotPlayingSat()
        {
            if (!_showWhenNotPlaying.Value)
            {
                return(false);
            }
            IPlayControl pc = Main.PlayControl;

            return(!pc.IsPlaying() || pc.IsPaused());
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Returns true if foo_title should be shown according to the timing criteria - n seconds after song start
        /// and that criteria is enabled.
        /// </summary>
        private bool SongStartSat()
        {
            IPlayControl pc = Main.PlayControl;

            if (!_onSongStart.Value || !pc.IsPlaying() || pc.IsPaused())
            {
                return(false);
            }
            return(pc.PlaybackGetPosition() < _onSongStartStay.Value);
        }