Exemplo n.º 1
0
 /// <summary>
 /// 添加UI界面到dictioary表里面
 /// </summary>
 /// <param name="_viewid"></param>
 /// <param name="_view"></param>
 public void Addviewtodictioary(string _viewid, Baseview _view)
 {
     if (!viewdictionary.ContainsKey(_viewid))
     {
         viewdictionary.Add(_viewid, _view);
     }
 }
Exemplo n.º 2
0
 public override void Bindingeventstobtn()
 {
     back.onClick.AddListener(() =>
     {
         Uistack.Getinstance().Return(2);
     });
     cleancach.onClick.AddListener(() =>
     {
         Caching.CleanCache();
         Calculaterspaceoccupied();
     });
     aboutbtn.onClick.AddListener(() =>
     {
         Baseview show = Uimanager.Getinstance().Getviewfromviewid(typeof(Aboutview).Name);
         Uistack.Getinstance().Openview(show, Viewstatus.SHOW);
     });
     histroy.onClick.AddListener(() =>
     {
         Baseview show = Uimanager.Getinstance().Getviewfromviewid(typeof(Histroyview).Name);
         Uistack.Getinstance().Openview(show, Viewstatus.SHOW);
     });
     favorite.onClick.AddListener(() =>
     {
         Baseview show = Uimanager.Getinstance().Getviewfromviewid(typeof(Favoriteview).Name);
         Uistack.Getinstance().Openview(show, Viewstatus.SHOW);
     });
 }
Exemplo n.º 3
0
        /// <summary>
        /// 获取viewid的ui界面
        /// </summary>
        /// <param name="_viewid"></param>
        /// <returns></returns>
        public Baseview Getviewfromviewid(string _viewid)
        {
            Baseview mbaseview = null;

            if (viewdictionary.ContainsKey(_viewid))
            {
                viewdictionary.TryGetValue(_viewid, out mbaseview);
                return(mbaseview);
            }
            return(null);
        }
Exemplo n.º 4
0
        private void Viewop()
        {
            //界面之间的逻辑切换
            Baseview scanview   = Uimanager.Getinstance().Getviewfromviewid(typeof(Scanview).Name);
            Baseview caseview   = Uimanager.Getinstance().Getviewfromviewid(typeof(Showcaseview).Name);
            Baseview detailview = Uimanager.Getinstance().Getviewfromviewid(typeof(Detaildescriptionview).Name);

            //Uistack.Getinstance().Openview(caseview, Viewstatus.HIDE, caseview.viewid);
            //Uistack.Getinstance().Openview(detailview, Viewstatus.HIDE, detailview.viewid);
            //Uistack.Getinstance().Openview(scanview, Viewstatus.SHOW, scanview.viewid);
        }
Exemplo n.º 5
0
        /// <summary>
        /// 关闭UI界面
        /// </summary>
        /// <param name="_viewid"></param>
        public void Closeview(string _viewid)
        {
            if (Getviewfromviewid(_viewid) == null)
            {
                return;
            }
            Baseview bview = Getviewfromviewid(_viewid);

            GameObject targetview = bview.gameObject;
            // bview.Updateviewstatus();
        }
Exemplo n.º 6
0
 public void Return(int depth = 1)
 {
     for (int i = 0; i < depth; i++)
     {
         Baseview bv_a = Pop();
         if (bv_a != null)
         {
             bv_a.Updateviewstatus(Viewstatus.HIDE);
         }
     }
 }
Exemplo n.º 7
0
        private Baseview Pop()
        {
            if (viewstack.Count <= 0)
            {
                return(null);
            }
            Baseview bv = viewstack[viewstack.Count - 1];

            viewstack.RemoveAt(viewstack.Count - 1);
            return(bv);
        }
Exemplo n.º 8
0
        private void Start()
        {
            detaildescriptionview = Uimanager.Getinstance().Getviewfromviewid(typeof(Detaildescriptionview).Name);


            clickarea.onClick.AddListener(Addfuntobtn);
#if VERSION2_0
            Debug.Log(item.thumbnails);
            Browser.Getinstance().GetMarkless(item.thumbnails, Uimanager.Getinstance().Setmarkerless, null, background);
#endif
        }
Exemplo n.º 9
0
        /// <summary>
        /// 打开UI界面
        /// </summary>
        /// <param name="_viewid"></param>
        public void Openview(string _viewid)
        {
            if (Getviewfromviewid(_viewid) == null)
            {
                return;
            }
            Baseview bview = Getviewfromviewid(_viewid);

            GameObject targetview = bview.gameObject;

            targetview.SetActive(true);
            //bview.Updateviewstatus();
        }
Exemplo n.º 10
0
        public override void Bindingeventstobtn()
        {
            //需要隐藏的界面
            Baseview hide = Uimanager.Getinstance().Getviewfromviewid(typeof(Mainview).Name);


            //打开showcase view
            Baseview showcaseview = Uimanager.Getinstance().Getviewfromviewid(typeof(Showcaseview).Name);

            showcase.onClick.AddListener(() =>
            {
                Uistack.Getinstance().Openview(showcaseview, Viewstatus.SHOW);
                Uistack.Getinstance().Openview(hide, Viewstatus.SHOW);
            });


            //打开menu view
            Baseview menuview = Uimanager.Getinstance().Getviewfromviewid(typeof(Menuview).Name);

            menu.onClick.AddListener(() =>
            {
                Uistack.Getinstance().Openview(menuview, Viewstatus.SHOW);
                Uistack.Getinstance().Openview(hide, Viewstatus.SHOW);
            });


            //打开scan view
            Baseview scanview = Uimanager.Getinstance().Getviewfromviewid(typeof(Scanview).Name);

            gotoscan.onClick.AddListener(() =>
            {
                Cloudrecoeventhandler.Getinstance().Restartscanning();
                Uistack.Getinstance().Openview(scanview, Viewstatus.SHOW);
                Uistack.Getinstance().Openview(hide, Viewstatus.SHOW);
            });
        }
Exemplo n.º 11
0
 public void Openview(Baseview _opview, Viewstatus _viewstatus)
 {
     Push(_opview).Updateviewstatus(_viewstatus);
 }
Exemplo n.º 12
0
 private Baseview Push(Baseview _baseview)
 {
     viewstack.Add(_baseview);
     return(_baseview);
 }