Esempio n. 1
0
        public virtual void Dispose()
        {
            m_bDisposing = true;
            //if (m_autoAnimator != null)
            //    m_autoAnimator.Dispose();
            if (m_mb != null)
            {
                m_mb.RemoveSprite(this);
            }
            if (m_spParent != null)
            {
                m_spParent.RemoveChild(this);
            }

            for (int i = m_aBehaviors.Count - 1; i >= 0; i--)
            {
                Behavior bh = (Behavior)m_aBehaviors[i];
                bh.Dispose();
            }

            for (int i = this.ChildCount - 1; i >= 0; i--)
            {
                this[i].Dispose();
            }

            m_renderStrategy.Dispose();
        }
Esempio n. 2
0
        private void btnRemove_Click(object sender, System.EventArgs e)
        {
            if (this.listView1.SelectedItems.Count == 0)
            {
//			if (listBox1.SelectedItem == null)
                return;
            }
            ListViewItem item  = this.listView1.SelectedItems[0];
            int          index = Convert.ToInt32(item.SubItems[1].Text);
            //int index = listBox1.SelectedIndex;
            Behavior bh = (Behavior)m_sp.GetBehaviorByIndex(index);

            bh.Dispose();
            RefreshView();
        }