public void Register(BasePopup p)
 {
     if (!BasePopupCollection.Contains(p))
     {
         BasePopupCollection.Add(p);
         //
         if (this.Count == 1)
         {
             this.m_GlobalMouseHook.CreatHook();
         }
     }
 }
        public void Dismiss(BasePopup startPopup, DismissReason eDismissReason)
        {
            if (startPopup == null)
            {
                return;
            }
            //
            int index = BasePopupCollection.IndexOf(startPopup);

            //
            if (index >= 0)
            {
                Dismiss(index, eDismissReason);
            }
        }
        public void DismissChildren(BasePopup parent, DismissReason eDismissReason)
        {
            if (parent == null)
            {
                return;
            }
            //
            int index = BasePopupCollection.IndexOf(parent);

            //
            if (index >= 0)
            {
                Dismiss(index + 1, eDismissReason);
            }
        }