Пример #1
0
        /// <summary>The tick method to find and display the various media information icons</summary>
        private void TimerTvIcons()
        {
            try
            {
                // We need to wait for VLC to build up the media metadata.
                if (_currentMedia?.Tracks == null || _uiFadeoutTime == 0)
                {
                    return;
                }
            }
            catch (Exception)
            {
                return;
            }

            if (_currentTvIconData == null)
            {
                _currentTvIconData = TvIconData.CreateData(_ccDetected, _currentMedia.Tracks);

                GuiShow();
            }
            else
            {
                var tmpTvIcons = TvIconData.CreateData(_ccDetected, _currentMedia.Tracks);

                if (_currentTvIconData == tmpTvIcons)
                {
                    return;
                }

                _currentTvIconData = tmpTvIcons;

                GuiShow();
            }
        }
Пример #2
0
        /// <summary>Handler for TVCore's channel changed event</summary>
        /// <param name="channel">The new channel we are changing to</param>
        private void TvCoreOnChannelChanged(uint channel)
        {
            this.InvokeIfRequired(() =>
            {
                TvCore.LogDebug($"[.NET] TvCoreOnChannelChanged({channel})");

                RemoveErrorState();

                TvCore.Settings.Channel = channel;
                TvCore.Settings.Save();

                _ccDetected = false;
                ccOptionsDropDownButton.Visible = false;

                ThreadPool.QueueUserWorkItem(state => vlcControl.Stop());

                _currentMedia      = null;
                _currentTvIconData = null;

                GuiShow();
            });
        }