Exemplo n.º 1
0
        protected void RecycleElement(ComUIListElementScript elementScript, bool disableElement)
        {
            if (disableElement)
            {
                elementScript.Disable();
            }

            if (OnItemRecycle != null)
            {
                OnItemRecycle(elementScript);
            }

            this.m_elementScripts.Remove(elementScript);
            this.m_unUsedElementScripts.Add(elementScript);
        }
Exemplo n.º 2
0
        protected void RecycleElement(bool disableElement)
        {
            if (this.m_elementScripts == null)
            {
                return;
            }

            while (this.m_elementScripts.Count > 0)
            {
                ComUIListElementScript item = this.m_elementScripts[0];
                this.m_elementScripts.RemoveAt(0);
                if (disableElement)
                {
                    item.Disable();
                }

                if (OnItemRecycle != null)
                {
                    OnItemRecycle(item);
                }

                this.m_unUsedElementScripts.Add(item);
            }
        }