Пример #1
0
 public static void LoadPage(Type type, object dat = null)
 {
     if (typeof(UIPage).IsAssignableFrom(type))
     {
         if (CurrentPage != null)
         {
             if (CurrentPage.GetType() == type)
             {
                 CurrentPage.Show(dat);
                 return;
             }
         }
         EventCallBack.ClearEvent();
         AnimationManage.Manage.ReleaseAll();
         if (CurrentPage != null)
         {
             CurrentPage.Dispose();
         }
         var t = Activator.CreateInstance(type) as UIPage;
         CurrentPage = t;
         t.Initial(Root, dat);
         t.ReSize();
         t.Recovery();
         t.ChangeLanguage();
     }
 }
Пример #2
0
 public static void LoadPage(Type type, object dat = null)
 {
     if (typeof(UIPage).IsAssignableFrom(type))
     {
         if (CurrentPage != null)
         {
             if (CurrentPage.GetType() == type)
             {
                 CurrentPage.Show(dat);
                 return;
             }
         }
         if (HCanvas.MainCanvas != null)//释放当前页面所有事件
         {
             HCanvas.MainCanvas.ClearAllAction();
         }
         TextInput.Clear();
         if (CurrentPage != null)
         {
             CurrentPage.Dispose();
         }
         var t = Activator.CreateInstance(type) as UIPage;
         CurrentPage = t;
         t.Initial(Root, dat);
         t.ReSize();
         t.Recovery();
     }
 }