Esempio n. 1
0
        virtual protected void InternalRefreshObjects()
        {
            List <HtmlElement> elements = textField.htmlElements;
            int count = _toCollect != null ? _toCollect.Count : 0;

            if (count > 0)
            {
                for (int i = 0; i < count; i++)
                {
                    IHtmlObject htmlObject = _toCollect[i];
                    htmlObject.Remove();
                    htmlPageContext.FreeObject(htmlObject);
                }
                _toCollect.Clear();
            }

            count = elements.Count;
            for (int i = 0; i < count; i++)
            {
                HtmlElement element = elements[i];
                if (element.htmlObject != null)
                {
                    if ((element.status & 3) == 0)                     //not (hidden and clipped)
                    {
                        if ((element.status & 4) == 0)                 //not added
                        {
                            element.status |= 4;
                            element.htmlObject.Add();
                        }
                    }
                    else
                    {
                        if ((element.status & 4) != 0)                         //added
                        {
                            element.status &= 251;
                            element.htmlObject.Remove();
                        }
                    }
                }
            }
        }
        virtual protected void InternalRefreshObjects()
        {
            List <HtmlElement> elements = textField.htmlElements;
            int count = _toCollect != null ? _toCollect.Count : 0;

            if (count > 0)
            {
                for (int i = 0; i < count; i++)
                {
                    IHtmlObject htmlObject = _toCollect[i];
                    htmlObject.Remove();
                    htmlPageContext.FreeObject(htmlObject);
                }
                _toCollect.Clear();
            }

            count = elements.Count;
            for (int i = 0; i < count; i++)
            {
                HtmlElement element = elements[i];
                if (element.htmlObject != null)
                {
                    if (element.hidden)
                    {
                        if (element.added)
                        {
                            element.added = false;
                            element.htmlObject.Remove();
                        }
                    }
                    else
                    {
                        if (!element.added)
                        {
                            element.added = true;
                            element.htmlObject.Add();
                        }
                    }
                }
            }
        }