public override void Init <T>(string name, UIInfo info, T arg)
        {
            base.Init(name, info, arg);
            int dataIndex = int.Parse(arg as string);

            int nextIndex = CampsiteMgr.singleton.GetNextUnlockPoint(dataIndex);

            NextBtn.gameObject.SetActive(dataIndex != nextIndex);
            LastBtn.gameObject.SetActive(dataIndex != nextIndex);

            SetData(dataIndex);
            Global.gApp.gMsgDispatcher.AddListener <int>(MsgIds.CampsitePointDataChange, RefreshData);
            CampsiteObjectMgr.Instance.SetFocusBuilding(dataIndex, focusScreenPos);
            CampsiteObjectMgr.Instance.camTouchInputCtrl.enabled = false;

            TaskUI taskPanel = Global.gApp.gUiMgr.GetPanelCompent <TaskUI>(Wndid.TaskUI);

            taskPanel?.HideRoot();

            HomeUI homePanel = Global.gApp.gUiMgr.GetPanelCompent <HomeUI>(Wndid.HomeUI);

            if (homePanel != null)
            {
                homePanel.HideBtns();
            }

            bool openSetGun = PlayerDataMgr.singleton.ModuleIsOpen(GameModuleType.BuildSetGun);

            SetGunBtn.gameObject.SetActive(openSetGun);
            CardFrame.gameObject.SetActive(openSetGun);
            AutoBtn.gameObject.SetActive(openSetGun);
        }
        private void SetData(int dataIndex)
        {
            pointDataMgr      = CampsiteMgr.singleton.GetPointByIndex(dataIndex);
            NameTxt.text.text = pointDataMgr.buildingRes.buildingName;
            var gunTypeRes = TableMgr.singleton.GunTypeTable.GetItemByID(pointDataMgr.buildingRes.gunType);

            //TypeImg.image.sprite = gunTypeRes.icon
            TypeTxt.text.text = LanguageMgr.GetText(gunTypeRes.tid_type);
            HomeUI homePanel = Global.gApp.gUiMgr.GetPanelCompent <HomeUI>(Wndid.HomeUI);

            if (homePanel != null)
            {
                homePanel.OnFocusPoint(dataIndex);
            }
            RefreshData(dataIndex);
        }
        public override void Release()
        {
            base.Release();
            CampsiteObjectMgr.Instance.CancelFocus();
            Global.gApp.gMsgDispatcher.RemoveListener <int>(MsgIds.CampsitePointDataChange, RefreshData);
            Global.gApp.gUiMgr.ClosePanel(Wndid.CampsitePointSetGunUI);
            if (CampsiteObjectMgr.Instance.camTouchInputCtrl != null)
            {
                CampsiteObjectMgr.Instance.camTouchInputCtrl.enabled = true;
            }
            TaskUI taskPanel = Global.gApp.gUiMgr.GetPanelCompent <TaskUI>(Wndid.TaskUI);

            taskPanel?.ResetRoot();
            HomeUI homePanel = Global.gApp.gUiMgr.GetPanelCompent <HomeUI>(Wndid.HomeUI);

            if (homePanel != null)
            {
                homePanel.ResetBtns();
                homePanel.OnCancelFocusPoint();
            }
        }