Пример #1
0
 private void AddViewLibrary(UIViewLibrary views)
 {
     m_activeViewLibraries.Add(views);
     foreach (UIView view in views.Views)
     {
         if (!m_viewsMap.ContainsKey(view.GetType()))
         {
             m_viewsMap.Add(view.GetType(), view);
         }
     }
 }
Пример #2
0
        private void UnloadViewLibrary(UIViewLibrary views)
        {
            for (int i = 0, count = views.Views.Count; i < count; i++)
            {
                List <NullableReference <UIView> > foundRefs = m_activeViews.FindAll((nr) => nr.Reference.GetType() == views.Views[i].GetType());
                if (foundRefs.Count > 0)
                {
                    for (int m = 0, count2 = foundRefs.Count; m < count2; m++)
                    {
                        foundRefs[i].Reference.CloseView();
                    }
                }

                if (m_viewsMap.ContainsKey(views.Views[i].GetType()))
                {
                    m_viewsMap.Remove(views.Views[i].GetType());
                }
            }

            m_activeViewLibraries.Remove(views);
        }