Exemplo n.º 1
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);
        }
Exemplo n.º 2
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()));
        }