Esempio n. 1
0
        public void Validate(ref InvalidationManagerClient currentObject)
        {
#if DEBUG
            {
                if (DebugMode)
                {
                    Debug.Log("SizeInvalidator -> Validate");
                }
            }
#endif
            //_currentObject = currentObject;

            // Keep traversing the invalidatePropertiesQueue until we've reached the end.
            // More elements may get added to the queue while we're in this loop, or a
            // a recursive call to this function may remove elements from the queue while
            // we're in this loop.
            InvalidationManagerClient obj = Queue.RemoveLargest();

            while (null != obj)
            {
                //Debug.Log("InvalidationManager calling validateProperties() on " + obj);

                //CONFIG::performanceInstrumentation

                #region Debug

#if DEBUG
                {
                    if (DebugMode)
                    {
                        _start = DateTime.Now;
                    }
                }
#endif

                #endregion


                //if (obj is ComboBox)
                //    Debug.Log("validating combo: " + obj);

                //if (-1 != obj.NestLevel)
                //{
                currentObject = obj;
                obj.ValidateSize(false);
                //obj.ValidateSize(!(currentObject is Container)); // added 20121212. ComboBox didn't measure when in designer application (its children were never measured, because it is not a container)
                //obj.ValidateSize(true);
                HandleUpdateCompletePendingFlag(obj);
                //}

                #region Debug

#if DEBUG
                {
                    if (DebugMode)
                    {
                        var end = DateTime.Now.Subtract(_start);
                        InvalidationHelper.Log("ValidateSize", obj);
                        Debug.Log(string.Format("SizeInvalidator -> Validated in {0} ms", end.Milliseconds));
                    }
                }
#endif

                #endregion


                obj = Queue.RemoveLargest();
            }

            if (Queue.IsEmpty())
            {
                // trace("Properties Queue is empty");

                Invalid = false;

                /*_systemManager.DispatchEvent(
                 *  new Event("validateSizeComplete"));*/
            }
        }
Esempio n. 2
0
        public void ValidateClient(InvalidationManagerClient target, ref InvalidationManagerClient currentObject)
        {
#if DEBUG
            {
                if (DebugMode)
                {
                    Debug.Log("SizeInvalidator -> ValidateClient");
                }
            }
#endif

            //IInvalidationManagerClient lastCurrentObject = _currentObject;

            //int i = 0;
            //bool done = false;
            //int oldTargetLevel = _targetLevel;

            //while (!done)
            //{
            //    done = true;


            // Keep traversing the invalidatePropertiesQueue until we've reached the end.
            // More elements may get added to the queue while we're in this loop, or a
            // a recursive call to this function may remove elements from the queue while
            // we're in this loop.
            InvalidationManagerClient obj = Queue.RemoveLargestChild(target);

            while (null != obj)
            {
                //Debug.Log("   ->Validating size: " + obj);

                #region Debug

#if DEBUG
                {
                    if (DebugMode)
                    {
                        _start = DateTime.Now;
                    }
                }
#endif

                #endregion

                /*if (-1 != obj.NestLevel)
                 * {*/
                currentObject = obj;
                obj.ValidateSize(false);
                //Debug.Log("       -> Width: " + ((DisplayObject)obj).Width + "; Height: " + ((DisplayObject)obj).Height);
                HandleUpdateCompletePendingFlag(obj);
                /*}*/

                // process additional handlers
                if (AdditionalHandlers.Count > 0)
                {
                    foreach (AdditionalHandler handler in AdditionalHandlers)
                    {
                        handler(target);
                    }
                }

                #region Debug

#if DEBUG
                {
                    if (DebugMode)
                    {
                        var end = DateTime.Now.Subtract(_start);
                        InvalidationHelper.Log("ValidateSize", obj);
                        Debug.Log(string.Format("SizeInvalidator -> Validated in {0} ms", end.Milliseconds));
                    }
                }
#endif

                #endregion

                // Once we start, don't stop.
                obj = Queue.RemoveLargestChild(target);
            }

            if (Queue.IsEmpty())
            {
                //Debug.Log("Size Queue is empty");

                Invalid       = false;
                InvalidClient = false;

                /*_systemManager.DispatchEvent(
                 *  new Event("validatePropertiesComplete"));*/
            }

            //}

            //_currentObject = lastCurrentObject;
        }
        public void ValidateClient(InvalidationManagerClient target, ref InvalidationManagerClient currentObject)
        {
#if DEBUG
            {
                if (DebugMode)
                {
                    Debug.Log("TransformInvalidator -> ValidateClient");
                }
            }
#endif

            //InvalidationManagerClient lastCurrentObject = _currentObject;

            //int i = 0;
            //bool done = false;
            //int oldTargetLevel = _targetLevel;

            //while (!done)
            //{
            //    done = true;


            // Keep traversing the invalidatePropertiesQueue until we've reached the end.
            // More elements may get added to the queue while we're in this loop, or a
            // a recursive call to this function may remove elements from the queue while
            // we're in this loop.
            InvalidationManagerClient obj = Queue.RemoveSmallestChild(target);

            while (null != obj)
            {
#if DEBUG
                {
                    if (DebugMode)
                    {
                        _start = DateTime.Now;
                    }
                }
#endif
                if (-1 != obj.NestLevel)
                {
                    currentObject = obj;
                    obj.ValidateTransform();
                    HandleUpdateCompletePendingFlag(obj);
                }


#if DEBUG
                {
                    //InvalidationHelper.Log("ValidateTransform", obj);
                    if (DebugMode)
                    {
                        var end = DateTime.Now.Subtract(_start);
                        InvalidationHelper.Log("ValidateTransform", obj);
                        Debug.Log(string.Format("TransformInvalidator -> Validated in {0} ms", end.Milliseconds));
                    }
                }
#endif

                // Once we start, don't stop.
                obj = Queue.RemoveSmallestChild(target);
            }

            if (Queue.IsEmpty())
            {
                Invalid       = false;
                InvalidClient = false;
            }

            //}

            //_currentObject = lastCurrentObject;
        }
        /*public bool Invalid { get; private set; }*/

        public void Validate(ref InvalidationManagerClient currentObject)
        {
#if DEBUG
            {
                if (DebugMode)
                {
                    Debug.Log("DisplayListInvalidator -> Validate");
                }
            }
#endif
            //_currentObject = currentObject;

            // Keep traversing the invalidatePropertiesQueue until we've reached the end.
            // More elements may get added to the queue while we're in this loop, or a
            // a recursive call to this function may remove elements from the queue while
            // we're in this loop.
            InvalidationManagerClient obj = Queue.RemoveSmallest();

            while (null != obj)
            {
                //Debug.Log("InvalidationManager calling validateProperties() on " + obj);

                //if (obj is LoadingMaskAnimator)
                //    Debug.Log("Validating display list for: " + obj);

                //CONFIG::performanceInstrumentation
#if DEBUG
                {
                    if (DebugMode)
                    {
                        _start = DateTime.Now;
                    }
                }
#endif

                //if (-1 != obj.NestLevel)
                //{
                currentObject = obj;
                obj.ValidateDisplayList();
                HandleUpdateCompletePendingFlag(obj);
                //}

                //CONFIG::performanceInstrumentation
#if DEBUG
                {
                    if (DebugMode)
                    {
                        var end = DateTime.Now.Subtract(_start);
                        InvalidationHelper.Log("ValidateDisplayList", obj);
                        Debug.Log(string.Format("DisplayListInvalidator -> Validated in {0} ms", end.Milliseconds));
                    }
                }
#endif

                // Once we start, don't stop.
                obj = Queue.RemoveSmallest();
            }

            if (Queue.IsEmpty())
            {
                // trace("Properties Queue is empty");

                Invalid = false;

                /*_systemManager.DispatchEvent(
                 *  new Event("validateDisplayListComplete"));*/
            }
        }
Esempio n. 5
0
        public void ValidateClient(InvalidationManagerClient target, ref InvalidationManagerClient currentObject)
        {
#if DEBUG
            {
                if (DebugMode)
                {
                    Debug.Log("EventInvalidator -> ValidateClient");
                }
            }
#endif

            //InvalidationManagerClient lastCurrentObject = _currentObject;

            //int i = 0;
            bool done = false;
            //int oldTargetLevel = _targetLevel;

            while (!done)
            {
                done = true;


                // Keep traversing the invalidatePropertiesQueue until we've reached the end.
                // More elements may get added to the queue while we're in this loop, or a
                // a recursive call to this function may remove elements from the queue while
                // we're in this loop.
                InvalidationManagerClient obj = Queue.RemoveSmallestChild(target);

                while (null != obj)
                {
                    //Debug.Log("InvalidationManager calling validateProperties() on " + obj);

                    //CONFIG::performanceInstrumentation
#if DEBUG
                    {
                        if (DebugMode)
                        {
                            _start = DateTime.Now;
                        }
                    }
#endif
                    if (-1 != obj.NestLevel)
                    {
                        currentObject = obj;
                        obj.ProcessQueue();
                        HandleUpdateCompletePendingFlag(obj);
                    }

                    //CONFIG::performanceInstrumentation
#if DEBUG
                    {
                        if (DebugMode)
                        {
                            var end = DateTime.Now.Subtract(_start);
                            InvalidationHelper.Log("ProcessQueue", obj);
                            Debug.Log(string.Format("EventInvalidator -> Validated in {0} ms", end.Milliseconds));
                        }
                    }
#endif

                    // Once we start, don't stop.
                    obj = Queue.RemoveSmallestChild(target);
                }

                if (Queue.IsEmpty())
                {
                    // trace("Properties Queue is empty");

                    Invalid       = false;
                    InvalidClient = false;

                    /*_systemManager.DispatchEvent(
                     *  new Event("validatePropertiesComplete"));*/
                }
            }

            //_currentObject = lastCurrentObject;
        }