Esempio n. 1
0
 public void killTextInput()
 {
     foreach (OverlayContainer container in mO.GetChildContainerIterator())
     {
         foreach (OverlayElement element in container.GetChildIterator())
         {
             OverlayManager.Singleton.DestroyOverlayElement(element);
         }
     }
     foreach (OverlayElement element in mO.GetChildIterator())
     {
         OverlayManager.Singleton.DestroyOverlayElement(element);
     }
     mO.Parent.RemoveChild(mO.Name);
     OverlayManager.Singleton.DestroyOverlayElement(mO);
 }
Esempio n. 2
0
        public void killWindow()
        {
            for (int i = 0; i < mB.Count; i++)
            {
                mB[i].killButton();
            }
            for (int i = 0; i < mT.Count; i++)
            {
                mT[i].killTextInput();
            }

            try
            {
                for (int i = 0; i < mI.Count; i++)
                {
                    //foreach (OverlayContainer container in mI[i].GetChildContainerIterator())
                    // foreach (OverlayElement element in container.GetChildIterator())
                    //     OverlayManager.Singleton.DestroyOverlayElement(element);

                    OverlayManager.Singleton.DestroyOverlayElement(mI[i]);
                }

                /*foreach (OverlayElement element in mO.GetChildIterator())
                 * {
                 *   OverlayManager.Singleton.DestroyOverlayElement(element);
                 * }*/

                foreach (OverlayContainer container in mO.GetChildContainerIterator())
                {
                    foreach (OverlayElement element in container.GetChildIterator())
                    {
                        OverlayManager.Singleton.DestroyOverlayElement(element);
                    }
                }

                mO.Hide();
                mO.Dispose();
                mO = null;
            }
            catch (Exception ex)
            {
                LogManager.Singleton.LogMessage("Error while disposing GUI: " + ex.Message + ". Stack: " + ex.StackTrace);
            }
        }