| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191 | 
							- using FairyGUI;
 
- using System.Text.RegularExpressions;
 
- using UI.RoleInfo;
 
- namespace GFGGame
 
- {
 
-     public class GMPanelView : BaseWindow
 
-     {
 
-         private UI_GMPanelUI _ui;
 
-         public override void Dispose()
 
-         {
 
-             if (_ui != null)
 
-             {
 
-                 _ui.Dispose();
 
-             }
 
-             _ui = null;
 
-             base.Dispose();
 
-         }
 
-         protected override void OnInit()
 
-         {
 
-             base.OnInit();
 
-             packageName = UI_GMPanelUI.PACKAGE_NAME;
 
-             _ui = UI_GMPanelUI.Create();
 
-             this.viewCom = _ui.target;
 
-             this.viewCom.Center();
 
-             this.modal = true;
 
-             _ui.m_ComBtn.m_btnGetAllDressUpItem.onClick.Add(OnClickBtnGetAllDressUpItem);
 
-             _ui.m_ComBtn.m_btnGetAllCardItem.onClick.Add(OnClickBtnGetAllCardItem);
 
-             _ui.m_ComBtn.m_btnSetLv.onClick.Add(OnClickBtnSetLv);
 
-             _ui.m_ComBtn.m_btnSetChapter.onClick.Add(OnClickBtnSetChapter);
 
-             _ui.m_ComBtn.m_btnAll.onClick.Add(OnClickBtnAll);
 
-             _ui.m_btnAddItem.onClick.Add(OnClickBtnAddItem);
 
-             _ui.m_btnGM.onClick.Add(OnClickBtnGM);
 
-             _ui.m_ComBtn.m_btnSkipCheckOpen.onClick.Add(OnClickBtnSkipCheckOpen);
 
-         }
 
-         protected override void OnShown()
 
-         {
 
-             base.OnShown();
 
-         }
 
-         protected override void OnHide()
 
-         {
 
-             base.OnHide();
 
-         }
 
-         private void OnClickBtnGetAllDressUpItem()
 
-         {
 
-             GMController.GetAllDressUpItem().Coroutine();
 
-         }
 
-         private void OnClickBtnGetAllCardItem()
 
-         {
 
-             GMController.GetAllCardItem().Coroutine();
 
-         }
 
-         private void OnClickBtnAddItem(EventContext context)
 
-         {
 
-             string content = _ui.m_inputItem.text;
 
-             string[] infos = Regex.Split(content, " ");
 
-             if (infos.Length < 2)
 
-             {
 
-                 PromptController.Instance.ShowFloatTextPrompt("请按照指定格式输入物品信息", MessageType.ERR);
 
-                 return;
 
-             }
 
-             int itemId = int.Parse(infos[0]);
 
-             int itemNum = int.Parse(infos[1]);
 
-             if (itemId > 0 && itemNum > 0)
 
-             {
 
-                 string messageSuc = "已获得物品" + itemId + "*" + itemNum;
 
-                 GMController.SendGMCommand("getItem " + content, messageSuc).Coroutine();
 
-             }
 
-             else
 
-             {
 
-                 PromptController.Instance.ShowFloatTextPrompt("请按照指定格式输入物品信息", MessageType.ERR);
 
-             }
 
-         }
 
-         private void OnClickBtnSetLv()
 
-         {
 
-             int tmp;
 
-             if (!int.TryParse(_ui.m_ComBtn.m_txtRoleLv.text, out tmp))
 
-             {
 
-                 PromptController.Instance.ShowFloatTextPrompt("请输入数字");
 
-                 return;
 
-             }
 
-             string lv = _ui.m_ComBtn.m_txtRoleLv.text;
 
-             string messageSuc = "等级提升至" + lv;
 
-             GMController.SendGMCommand("lv " + lv, messageSuc).Coroutine();
 
-         }
 
-         private void OnClickBtnSetChapter()
 
-         {
 
-             int tmp;
 
-             int tmp1;
 
-             if (!int.TryParse(_ui.m_ComBtn.m_txtChapter.text, out tmp) || !int.TryParse(_ui.m_ComBtn.m_txtChapterLv.text, out tmp1))
 
-             {
 
-                 PromptController.Instance.ShowFloatTextPrompt("请输入数字");
 
-                 return;
 
-             }
 
-             string content = _ui.m_ComBtn.m_txtChapter.text + " " + _ui.m_ComBtn.m_txtChapterLv.text;
 
-             string messageSuc = string.Format("当前关卡第{0}章第{1}关", _ui.m_ComBtn.m_txtChapter.text, _ui.m_ComBtn.m_txtChapterLv.text);
 
-             GMController.SendGMCommand("chapter " + content, messageSuc).Coroutine();
 
-         }
 
-         private async void OnClickBtnSkipCheckOpen()
 
-         {
 
-             int isSkip = GameGlobal.skipCheckOpen == false ? 1 : 0;
 
-             bool result = await StorageSProxy.ReqSetClientValue(ConstStorageId.SKIP_CHECK_OPEN, isSkip);
 
-             if (result)
 
-             {
 
-                 GameGlobal.skipCheckOpen = !GameGlobal.skipCheckOpen;
 
-                 PromptController.Instance.ShowFloatTextPrompt("已开启跳过功能开启检测");
 
-             }
 
-         }
 
-         private async void OnClickBtnAll()
 
-         {
 
-             bool result = await StorageSProxy.ReqSetClientValue(ConstStorageId.STORAGE_SKIP_GUIDE, 2);
 
-             if (result)
 
-             {
 
-                 GameGlobal.skipGuide = true;
 
-             }
 
-             OnClickBtnGetAllDressUpItem();
 
-             OnClickBtnGetAllCardItem();
 
-             _ui.m_ComBtn.m_txtRoleLv.text = "99";
 
-             OnClickBtnSetLv();
 
-             _ui.m_ComBtn.m_txtChapter.text = "5";
 
-             _ui.m_ComBtn.m_txtChapterLv.text = "1";
 
-             OnClickBtnSetChapter();
 
-             OnClickBtnSkipCheckOpen();
 
-         }
 
-         private void OnClickBtnGM(EventContext context)
 
-         {
 
-             string content = _ui.m_inputGM.text;
 
-             string[] infos = Regex.Split(content, " ");
 
-             if (infos.Length < 2)
 
-             {
 
-                 PromptController.Instance.ShowFloatTextPrompt("请按照指定格式输入物品信息", MessageType.ERR);
 
-                 return;
 
-             }
 
-             switch (infos[0])
 
-             {
 
-                 case "log":
 
-                     if (infos[1] == "1")//开启日志按钮
 
-                     {
 
-                         LogController.Instance.SetBtnLogVisable(true);
 
-                     }
 
-                     else if (infos[1] == "0")//关闭日志按钮
 
-                     {
 
-                         LogController.Instance.SetBtnLogVisable(false);
 
-                     }
 
-                     else
 
-                     {
 
-                         PromptController.Instance.ShowFloatTextPrompt(string.Format("log指令没有{0}这个状态", infos[1]));
 
-                     }
 
-                     break;
 
-                 case "cjstime":
 
-                     if (infos[1].Length != 10)
 
-                     {
 
-                         PromptController.Instance.ShowFloatTextPrompt("请输入以秒为单位的正确的时间戳");
 
-                         return;
 
-                     }
 
-                     LuckyBoxDataManager.Instance.startTime = int.Parse(infos[1]);
 
-                     PromptController.Instance.ShowFloatTextPrompt("设置成功");
 
-                     break;
 
-                 case "cjetime":
 
-                     if (infos[1].Length != 10)
 
-                     {
 
-                         PromptController.Instance.ShowFloatTextPrompt("请输入以秒为单位的正确的时间戳");
 
-                         return;
 
-                     }
 
-                     LuckyBoxDataManager.Instance.endTime = int.Parse(infos[1]);
 
-                     PromptController.Instance.ShowFloatTextPrompt("设置成功");
 
-                     break;
 
-                 default:
 
-                     GMController.SendGMCommand(content, "设置成功").Coroutine();
 
-                     break;
 
-             }
 
-         }
 
-     }
 
- }
 
 
  |