| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140 | 
							
- using ET;
 
- using FairyGUI;
 
- using UI.Studio;
 
- using UnityEngine;
 
- namespace GFGGame
 
- {
 
-     public class StudioView : BaseWindow
 
-     {
 
-         private UI_StudioUI _ui;
 
-         public override void Dispose()
 
-         {
 
-             if (_ui != null)
 
-             {
 
-                 _ui.Dispose();
 
-                 _ui = null;
 
-             }
 
-             base.Dispose();
 
-         }
 
-         protected override void OnInit()
 
-         {
 
-             base.OnInit();
 
-             packageName = UI_StudioUI.PACKAGE_NAME;
 
-             _ui = UI_StudioUI.Create();
 
-             this.viewCom = _ui.target;
 
-             isfullScreen = true;
 
-             _ui.m_btnBack.onClick.Add(OnClickBtnBack);
 
-             _ui.m_comMetal.target.onClick.Add(OnClickComMetal);
 
-             _ui.m_comFabric.target.onClick.Add(OnCliclComFabric);
 
-             _ui.m_comProperty.target.onClick.Add(OnComProperty);
 
-             _ui.m_comFiling.target.onClick.Add(OnClickComFilling);
 
-         }
 
-         protected override void AddEventListener()
 
-         {
 
-             base.AddEventListener();
 
-             EventAgent.AddEventListener(ConstMessage.RED_CHANGE, UpdateRedDot);
 
-         }
 
-         protected override void OnShown()
 
-         {
 
-             base.OnShown();//1;//
 
-             StudioSProxy.ReqStudioInfos().Coroutine();
 
-             int isopen = FunctionOpenDataManager.Instance.CheckIsFunOpenById(typeof(StudioMetalView).FullName, false) ? 1 : 0;
 
-             _ui.m_comMetal.m_c1.selectedIndex = isopen;
 
-             isopen = FunctionOpenDataManager.Instance.CheckIsFunOpenById(typeof(StudioFabricView).FullName, false) ? 1 : 0; ;
 
-             _ui.m_comFabric.m_c1.selectedIndex = isopen;
 
-             isopen = FunctionOpenDataManager.Instance.CheckIsFunOpenById(typeof(StudioPropertyView).FullName, false) ? 1 : 0;
 
-             _ui.m_comProperty.m_c1.selectedIndex = isopen;
 
-             isopen = FunctionOpenDataManager.Instance.CheckIsFunOpenById(typeof(StudioFilingView).FullName, false) ? 1 : 0;
 
-             _ui.m_comFiling.m_c1.selectedIndex = isopen;
 
-             _ui.m_loaBg.url = ResPathUtil.GetBgImgPath("ejzjm_bj");
 
-             UpdateRedDot();
 
-             Timers.inst.AddUpdate(CheckGuide);
 
-         }
 
-         protected override void OnHide()
 
-         {
 
-             base.OnHide();
 
-             TryCompleteGuide();
 
-             Timers.inst.Remove(CheckGuide);
 
-         }
 
-         protected override void RemoveEventListener()
 
-         {
 
-             base.RemoveEventListener();
 
-             EventAgent.RemoveEventListener(ConstMessage.RED_CHANGE, UpdateRedDot);
 
-         }
 
-         private void OnClickBtnBack()
 
-         {
 
-             ViewManager.GoBackFrom(typeof(StudioView).FullName);
 
-         }
 
-         private void OnClickComMetal()
 
-         {
 
-             LogServerHelper.SendNodeLog((int)PlayParticipationEnum.JIN_SHU_XIU_FU, 1);
 
-             if (!FunctionOpenDataManager.Instance.CheckIsFunOpenById(typeof(StudioMetalView).FullName, true)) return;
 
-             ViewManager.Show<StudioMetalView>(new object[] { 0, 0 }, new object[] { typeof(StudioView).FullName, this.viewData });
 
-             this.Hide();
 
-         }
 
-         private void OnCliclComFabric()
 
-         {
 
-             LogServerHelper.SendNodeLog((int)PlayParticipationEnum.ZHI_WU_XIU_FU, 1);
 
-             if (!FunctionOpenDataManager.Instance.CheckIsFunOpenById(typeof(StudioFabricView).FullName, true)) return;
 
-             ViewManager.Show<StudioFabricView>(new object[] { 0, 0 }, new object[] { typeof(StudioView).FullName, this.viewData });
 
-             this.Hide();
 
-         }
 
-         private void OnComProperty()
 
-         {
 
-             LogServerHelper.SendNodeLog((int)PlayParticipationEnum.SHU_HUA_XIU_FU, 1);
 
-             if (!FunctionOpenDataManager.Instance.CheckIsFunOpenById(typeof(StudioPropertyView).FullName, true)) return;
 
-             ViewManager.Show<StudioPropertyView>(new object[] { 1, 0 }, new object[] { typeof(StudioView).FullName, this.viewData });
 
-             this.Hide();
 
-         }
 
-         private void OnClickComFilling()
 
-         {
 
-             ViewManager.Show<StudioFilingView>(null, new object[] { typeof(StudioView).FullName, this.viewData });
 
-         }
 
-         private void UpdateRedDot()
 
-         {
 
-             RedDotController.Instance.SetComRedDot(_ui.m_comFiling.target, RedDotDataManager.Instance.GetStudioFilingRed(), "", 10, 24);
 
-         }
 
-         private void CheckGuide(object param)
 
-         {
 
-             if (GuideDataManager.IsGuideFinish(ConstGuideId.STUDIO_OPEN) <= 0)
 
-             {
 
-                 UpdateToCheckGuide(null);
 
-             }
 
-             else
 
-             {
 
-                 Timers.inst.Remove(CheckGuide);
 
-             }
 
-         }
 
-         protected override void UpdateToCheckGuide(object param)
 
-         {
 
-             if (!ViewManager.CheckIsTopView(this.viewCom)) return;
 
-             GuideController.TryGuide(_ui.target, ConstGuideId.STUDIO_OPEN, 3, "通关相应副本,可以获得各种升级材料哦,快开始今天的日常工作吧。", -1, true, (int)(this.viewCom.height - 280), 0, 0, false, false);
 
-             GuideController.TryCompleteGuide(ConstGuideId.STUDIO_OPEN, 3);
 
-         }
 
-         protected override void TryCompleteGuide()
 
-         {
 
-             GuideCfg cfg = GuideCfgArray.Instance.GetCfg(ConstGuideId.STUDIO_OPEN);
 
-             GuideController.TryCompleteGuideIndex(cfg.id, 3);
 
-             GuideController.TryCompleteGuide(ConstGuideId.STUDIO_OPEN, 3);
 
-         }
 
-     }
 
- }
 
 
  |