Ejemplo n.º 1
0
        public void CleaningUp()
        {
#if DIALOG
            Father_ControlCollection.Remove(CharacterNameLabel);
            Father_ControlCollection.Remove(DialogLabel);
            if (Father_ControlCollection.Contains(LeftCharacterPicture))
            {
                Father_ControlCollection.Remove(LeftCharacterPicture);
            }
            if (Father_ControlCollection.Contains(RightCharacterPicture))
            {
                Father_ControlCollection.Remove(LeftCharacterPicture);
            }
            //---------------------------------
            CharacterNameLabel.Dispose();
            DialogLabel.Dispose();
            CharacterNameLabel = null;
            DialogLabel        = null;
            if (LeftCharacterPicture != null)
            {
                LeftCharacterPicture.Dispose();
                LeftCharacterPicture = null;
            }
            if (RightCharacterPicture != null)
            {
                RightCharacterPicture.Dispose();
                RightCharacterPicture = null;
            }
#endif
            GC.Collect();
        }