Example #1
0
        public void Show(int id, object body)
        {
            AbsView view = null;

            if (mViewDys.TryGetValue(id, out view))
            {
                if (IsHide(id))
                {
                    mVisibleDys.Add(id, view);
                    if (!mStartDys.ContainsKey(id))
                    {
                        mStartDys.Add(id, id);
                        view.OnStart();
                    }
                    view.OnShowBefore();
                    view.OnShow(body);
                    view.Root.transform.SetAsLastSibling();
                    view.IsVisible = true;
                }
                else
                {
                    view.OnRepeat(body);
                }
            }
        }
Example #2
0
 public void RegView(int id, AbsView view)
 {
     if (!mViewDys.ContainsKey(id))
     {
         mViewDys.Add(id, view);
         view.OnInit();
         view.OnRegEvent();
     }
 }
Example #3
0
        public void UnRegView(int id)
        {
            AbsView view = null;

            if (mViewDys.TryGetValue(id, out view))
            {
                mViewDys.Remove(id);
                mVisibleDys.Remove(id);
                view.OnRemove();
            }
        }
Example #4
0
 public void OnUpdate(float delta)
 {
     Dictionary <int, AbsView> .Enumerator enumerator = mViewDys.GetEnumerator();
     while (enumerator.MoveNext())
     {
         AbsView view = enumerator.Current.Value;
         if (view.IsUpdate)
         {
             view.OnUpdate(delta);
         }
     }
 }
Example #5
0
 public void Hide(int id, object body)
 {
     if (IsShow(id))
     {
         AbsView view = null;
         if (mViewDys.TryGetValue(id, out view))
         {
             mVisibleDys.Remove(id);
             view.OnHideBefore();
             view.OnHide(body);
             view.IsVisible = false;
         }
     }
 }
Example #6
0
 public void RegView(int id, AbsView view)
 {
     mViewMgr.RegView(id, view);
 }