Exemplo n.º 1
0
        /// <summary>
        /// Checks, if an update for the element is needed
        /// </summary>
        /// <returns>true, if an update is needed</returns>
        public bool CheckForUpdate()
        {
            Control.UpdateVisibility();
            try
            {
                Control.DoRender(GUIGraphicsContext.TimePassed, (uint)System.Windows.Media.Animation.AnimationTimer.TickCount);
            }
            catch (Exception)
            {
                Log.Debug("Error in DoRender");
            }
            int  visibleCondition = Control.GetVisibleCondition();
            bool newVisible       = visibleCondition == 0 ? Control.Visible : GUIInfoManager.GetBool(visibleCondition, Control.ParentID);

            if (newVisible == _wasVisible)
            {
                if (newVisible)
                {
                    return(CheckElementSpecificForUpdate());
                }
                return(false);
            }
            _wasVisible = newVisible;
            if (true)
            {
                CheckElementSpecificForUpdate();
            }
            return(true);
        }
Exemplo n.º 2
0
        /// <summary>
        /// Checks, if an update for the element is needed
        /// </summary>
        /// <returns>true, if an update is needed</returns>
        public bool CheckForUpdate()
        {
            _control.UpdateVisibility();
            _control.DoRender(GUIGraphicsContext.TimePassed, (uint)System.Windows.Media.Animation.AnimationTimer.TickCount);

            int  _visibleCondition = _control.GetVisibleCondition();
            bool newVisible        = _visibleCondition == 0 ? _control.Visible : GUIInfoManager.GetBool(_visibleCondition, _control.ParentID);

            if (newVisible == _wasVisible)
            {
                if (newVisible)
                {
                    return(CheckElementSpecificForUpdate());
                }
                return(false);
            }
            _wasVisible = newVisible;
            if (true)
            {
                CheckElementSpecificForUpdate();
            }
            return(true);
        }