/// <summary> /// 设置属性信息 /// </summary> public void SetPropInfo() { strong_info = EquipStrongConfig.GetEquipStrongInfo(cur_equip_info.star, cur_strong_lv); if (strong_info == null) { return; } panel.goldtext.text = strong_info.cost.ToString(); List <EquipAddInfo> prop_list = EquipConfig.GetPropAddDataListByID(1, cur_equip_info.id, cur_star, cur_strong_lv); for (int i = 0; i < prop_list.Count; i++) { EquipAddInfo info = prop_list[i]; string prop_name_label = string.Format("prop_name_{0}", i.ToString()); UILabel prop_name = UtilTools.GetChild <UILabel>(panel.prop_info, prop_name_label); prop_name.text = TextManager.GetUIString(info.prop_name); string cur_prop_txt_label = string.Format("cur_prop_value_{0}", i.ToString()); UILabel cur_prop_txt = UtilTools.GetChild <UILabel>(panel.prop_info, cur_prop_txt_label); cur_prop_txt.text = (info.prop_base_value + info.prop_strong_value + info.prop_star_value).ToString(); string next_prop_txt_label = string.Format("next_prop_value_{0}", i.ToString()); UILabel next_prop_txt = UtilTools.GetChild <UILabel>(panel.prop_info, next_prop_txt_label); next_prop_txt.text = (info.prop_base_value + info.prop_next_strong_value + info.prop_next_star_value).ToString(); } }
public void SetEffectRender(Transform parent, int value) { if (_effect != null) { UtilTools.SetEffectRenderQueueByUIParent(parent, _effect.transform, value); } }
/// <summary> /// 界面显示 /// </summary> protected override void OnShow(INotification notification) { ShowItemInfo showItemInfo = (notification.Body as List <object>)[0] as ShowItemInfo; shopItemInfo = (notification.Body as List <object>)[1] as ShopItemInfo; buyItem = showItemInfo.buyItem; panel.changeNum.text = "1"; if (shopItemInfo.moneyType == 3) { itemID = shopItemInfo.itemID; panel.buyPrcie.text = shopItemInfo.itemPrice.ToString(); } else { panel.buyPrcie.text = (shopItemInfo.itemPrice * (shopItemInfo.disCount * 1.0f / 100)).ToString(); itemID = shopItemInfo.itemID.Substring(0, shopItemInfo.itemID.Length - 1); } UtilTools.SetMoneySprite(shopItemInfo.moneyType, panel.moneyType); ItemInfo info = ItemManager.GetItemInfo(itemID); LoadSprite.LoaderItem(panel.itemIcon, itemID, false); panel.itemcolor.spriteName = UtilTools.StringBuilder("color", info.color); panel.itemName.text = TextManager.GetItemString(itemID); panel.itemdesc.text = TextManager.GetPropsString("description_" + itemID); }
void Awake() { if (key.Length == 0) { LogSys.LogWarning("key is empty"); return; } string str = ""; if (FromLua == false || !sluaAux.luaSvrManager.getInstance().IsLoaded) { str = GameText.GetStr(key); } else { SLua.LuaState ls = sluaAux.luaSvrManager.getInstance().GetLuaState(); if (ls != null) { SLua.LuaTable tb = ls.getTable("LuaText"); if (tb[key] == null) { str = GameText.GetStr(key); } else { str = tb[key].ToString(); } } } gameObject.GetComponent <UILabel>().text = UtilTools.Wrap(str); }
public ActionResult _ManageProductUsers(int clientId, int productId, string productName) { try { ViewBag.Error = ""; ViewBag.SessionError = ""; var userData = MvcApplication.GetUserData(User.Identity.Name) ?? new UserData(); if (userData.UserId < 1) { ViewBag.SessionError = "Your session has expired! Please re-login"; return(View(new ProductUserItemObj())); } if (clientId < 1 || string.IsNullOrEmpty(productName)) { ViewBag.Error = "Invalid Client Selection"; return(View(new ProductUserItemObj())); } return(View(new ProductUserItemObj { ProductName = productName, ProductId = productId, ClientId = clientId })); } catch (Exception ex) { ViewBag.Error = "Error Occurred! Please try again later"; UtilTools.LogE(ex.StackTrace, ex.Source, ex.Message); return(View(new ProductUserItemObj())); } }
/// <summary> /// 格式化字符串数据 /// </summary> /// <param name="value"></param> /// <param name="splt1"></param> /// <param name="splt2"></param> /// <returns> Dictionary<string, string> </returns> public static Dictionary <string, string> FormatKeyString(string value, char[] splt1, char[] splt2) { Dictionary <string, string> taskitems = new Dictionary <string, string>(); //string[] ss = value.Split(new char[] { ',' }, System.StringSplitOptions.RemoveEmptyEntries); string[] ss = value.Split(splt1, System.StringSplitOptions.RemoveEmptyEntries); // string[] no = new string[] { }; //string[] num = new string[] { }; string item = string.Empty; string[] temp; for (int i = 0; i < ss.Length; i++) { item = ss[i]; temp = item.Split(splt2, System.StringSplitOptions.RemoveEmptyEntries); if (temp.Length >= 2) { if (taskitems.ContainsKey(temp[0])) { string key = temp[0]; int old = UtilTools.IntParse(taskitems[key]); int newi = UtilTools.IntParse(temp[1]); taskitems[key] = UtilTools.StringBuilder(old, newi); } else { taskitems.Add(temp[0], temp[1]); } } } return(taskitems); }
public static ExpenseItemSettingRegRespObj AddExpenseItemSetting(RegExpenseItemSettingObj regObj, string username) { var response = new ExpenseItemSettingRegRespObj { Status = new APIResponseStatus { IsSuccessful = false, Message = new APIResponseMessage(), }, }; try { var apiResponse = new APIHelper(APIEndpoints.ADD_EXPENSE_ITEM_SETTING_ENDPOINT, username, Method.POST).ProcessAPI <RegExpenseItemSettingObj, ExpenseItemSettingRegRespObj>(regObj, out var msg); if (msg.Code == 0 && string.IsNullOrEmpty(msg.TechMessage) && string.IsNullOrEmpty(msg.Message)) { return(apiResponse); } response.Status.Message.FriendlyMessage = msg.Message; response.Status.Message.TechnicalMessage = msg.TechMessage; return(response); } catch (Exception ex) { UtilTools.LogE(ex.StackTrace, ex.Source, ex.GetBaseException().Message); response.Status.Message.FriendlyMessage = "Error Occurred! Please try again later"; response.Status.Message.TechnicalMessage = "Error: " + ex.GetBaseException().Message; return(response); } }
public static void ReConnectToServer() { var ctrl = UIManager.GetControler <LoginInputController>(); string md5Content = PlayerPrefs.GetString("accountServerLoginContent", ""); //打开登录界面 if (!string.IsNullOrEmpty(md5Content) && ClientDefine.isWXLogin) { //微信自动登录 UtilTools.ShowWaitWin(WaitFlag.LoginWin); AccountServer_WXLogin(md5Content); } else if (!ClientDefine.isWXLogin && !string.IsNullOrEmpty(GameDataMgr.LOGIN_DATA.lastLoginDeviceUUID)) { Utils.LogSys.LogWarning("快速登录"); //快速登录 // AccountServer_QuickLogin(); startUpMono.LoginFastTriuse(); } else if (!string.IsNullOrEmpty(GameDataMgr.LOGIN_DATA.lastLoginAccount) && !string.IsNullOrEmpty(GameDataMgr.LOGIN_DATA.lastLoginPassword)) { Utils.LogSys.LogWarning("手机号自动登陆"); //手机帐号自动登录 AccountServer_PhoneLogin(GameDataMgr.LOGIN_DATA.lastLoginAccount, GameDataMgr.LOGIN_DATA.lastLoginPassword); ctrl.LoginPhone(); } else { UtilTools.ReturnToLoginScene(); } }
public ActionResult AddWorkflowTask(int clientId, int productId) { try { ViewBag.Error = ""; ViewBag.SessionError = ""; #region Client Product productItem Session Check var userClientSession = (AppSession)Session["_UserClientSession_"]; if (userClientSession == null || userClientSession.ClientId < 1 || userClientSession.ProductId < 1 || userClientSession.ProductItemId < 1) { return(RedirectToAction("Index", "Dashboard")); } #endregion var userData = MvcApplication.GetUserData(User.Identity.Name) ?? new UserData(); if (userData.UserId < 1) { ViewBag.SessionError = "Your session has expired! Please re-login"; return(View(new RegWorkflowTaskObj())); } return(View(new RegWorkflowTaskObj { ProductId = productId, ClientId = clientId, ProductItemId = userClientSession.ProductItemId })); } catch (Exception ex) { ViewBag.Error = "Error Occurred! Please try again later"; UtilTools.LogE(ex.StackTrace, ex.Source, ex.Message); return(View(new RegWorkflowTaskObj())); } }
public static AlertItemRegRespObj DeleteAlertItem(DeleteAlertItemObj regObj, string username) { var response = new AlertItemRegRespObj { Status = new APIResponseStatus { IsSuccessful = false, Message = new APIResponseMessage(), }, }; try { var apiResponse = new APIHelper(APIEndpoints.DELETE_ALERT_ITEM_ENDPOINT, username, Method.POST).ProcessAPI <DeleteAlertItemObj, AlertItemRegRespObj>(regObj, out var msg); if (msg.Code == 0 && string.IsNullOrEmpty(msg.TechMessage) && string.IsNullOrEmpty(msg.Message)) { return(apiResponse); } response.Status.Message.FriendlyMessage = msg.Message; response.Status.Message.TechnicalMessage = msg.TechMessage; return(response); } catch (Exception ex) { UtilTools.LogE(ex.StackTrace, ex.Source, ex.GetBaseException().Message); response.Status.Message.FriendlyMessage = "Error Occurred! Please try again later"; response.Status.Message.TechnicalMessage = "Error: " + ex.GetBaseException().Message; return(response); } }
/// <summary> /// 获取验证码 /// </summary> /// <param name="go"></param> private void OnToGetVerificationHandler(GameObject go) { string phoneNum = _resetNameLb.value; if (!IsPhoneNum(phoneNum)) { UtilTools.ShowMessage(GameText.GetStr("login_name_empty"), TextColor.WHITE); return; } if (_bUpdateCooldwon) { UtilTools.ShowMessage(GameText.GetStr("try_later")); return; } _bUpdateCooldwon = true; if (sdk.SDKManager.isAppStoreVersion()) { LoginInputController.startUpMono.PhoneVerificationCode(phoneNum, "1002", "IOS"); } else { UtilTools.GetAvmpSign(phoneNum, 1002); } // }
public void wxBuy() { _shopData = GetShopItem(_itemID); if (_shopData == null) { return; } int payTag = 1; if (payTag == 1 && VX_recharge == false) //微信支付先关闭 { UtilTools.ShowMessage("微信支付通道暂时关闭", TextColor.RED); return; } GameObject sceneObj = GameObject.Find("Scene"); if (sceneObj) { StartUpScene startUpMono = sceneObj.GetComponent <StartUpScene>(); if (startUpMono != null) { startUpMono.startIOSWxPay(payTag, (int)_shopData.cost_list[0].cost_num, (int)_shopData.id, TextUtils.GetString(_shopData.name), TextUtils.GetString(_shopData.name)); } } }
/// <summary> /// 设置属性信息 /// </summary> private void SetPropInfo() { UISprite[] cur_star = UtilTools.GetChilds <UISprite>(panel.prop_info, "star"); UISprite[] next_star = UtilTools.GetChilds <UISprite>(panel.prop_info, "next_star"); UtilTools.SetStar(cur_star_num, cur_star); UtilTools.SetStar(next_star_num, next_star); List <EquipAddInfo> prop_list = EquipConfig.GetPropAddDataListByID(0, cur_equip_info.id, cur_star_num, cur_strong_lv); for (int i = 0; i < prop_list.Count; i++) { EquipAddInfo info = prop_list[i]; string prop_name_label = string.Format("prop_name_{0}", i.ToString()); UILabel prop_name = UtilTools.GetChild <UILabel>(panel.prop_info, prop_name_label); prop_name.text = TextManager.GetUIString(info.prop_name); string cur_prop_txt_label = string.Format("cur_prop_value_{0}", i.ToString()); UILabel cur_prop_txt = UtilTools.GetChild <UILabel>(panel.prop_info, cur_prop_txt_label); cur_prop_txt.text = (info.prop_base_value + info.prop_strong_value + info.prop_star_value).ToString(); string next_prop_txt_label = string.Format("next_prop_value_{0}", i.ToString()); UILabel next_prop_txt = UtilTools.GetChild <UILabel>(panel.prop_info, next_prop_txt_label); next_prop_txt.text = (info.prop_base_value + info.prop_next_strong_value + info.prop_next_star_value).ToString(); } }
public void setItemInfo(int nItemID, int nItemType, int nItemCount, Vector3 startpos,bool bAuto = false) { ItemBaseConfigItem itembasedata = ConfigDataMgr.getInstance().ItemBaseConfig.GetDataByKey(nItemType); UtilTools.SetIcon(_ItemIcon, itembasedata.icon); _bAuto = bAuto; _nItemID = nItemID; transform.position = new Vector3(startpos.x,startpos.y,transform.position.z); _startPos = transform.position; TweenScale scaleAction = _ItemIcon.gameObject.AddComponent<TweenScale>(); scaleAction.from = new Vector3(0, 0, 0); /*if (!NewbieGuideManager.getInstance().isNewbieGuide()) { scaleAction.to = new Vector3(1.5f, 1.5f, 1.5f); TweenPosition posAction = transform.gameObject.AddComponent<TweenPosition>(); posAction.from = transform.localPosition; posAction.to = new Vector3(transform.localPosition.x, transform.localPosition.y + 40f, transform.localPosition.z); posAction.duration = 1.5f; posAction.style = UITweener.Style.PingPong; } else { scaleAction.to = new Vector3(1f, 1f, 1f); }*/ scaleAction.duration = 0.5f; EventDelegate.Add(scaleAction.onFinished, ScaleBahaviorShowFinish, true); UIEventListener.Get(gameObject).onClick = catchItemBehavior; }
public static DisbursementRegRespObj UpdateDisbursement(EditDisbursementObj regObj, string username) { var response = new DisbursementRegRespObj { Status = new APIResponseStatus { IsSuccessful = false, Message = new APIResponseMessage(), }, }; try { var apiResponse = new APIHelper(APIEndpoints.UPDATE_DISBURSEMENT_ENDPOINT, username, Method.POST).ProcessAPI <EditDisbursementObj, DisbursementRegRespObj>(regObj, out var msg); if (msg.Code == 0 && string.IsNullOrEmpty(msg.TechMessage) && string.IsNullOrEmpty(msg.Message)) { return(apiResponse); } response.Status.Message.FriendlyMessage = msg.Message; response.Status.Message.TechnicalMessage = msg.TechMessage; return(response); } catch (Exception ex) { UtilTools.LogE(ex.StackTrace, ex.Source, ex.GetBaseException().Message); response.Status.Message.FriendlyMessage = "Error Occurred! Please try again later"; response.Status.Message.TechnicalMessage = "Error: " + ex.GetBaseException().Message; return(response); } }
void OnApplicationPause(bool isPause) { if (isPause) { _isPause = true; /*if (UIManager.IsWinShow(UIName.BATTLE_MAIN_WIN)) * { * ClientNetwork.Instance.HeartBeastSwitch(false); * ClientNetwork.Instance.CloseSocket(); * } * else if (!UIManager.IsWinShow(UIName.LOGIN_INPUT)) * { * //非登录界面时,暂停心跳包 * ClientNetwork.Instance.HeartBeastSwitch(false); * }*/ UIManager.CallLuaFuncCall("OnApplicationFocus", gameObject); Utils.LogSys.LogWarning("游戏已经游戏暂停"); _pauseTime = UtilTools.GetClientTime(); UIManager.DestroyWin(UIName.SHOP_RECHARGE_OTHER_WIN); if (ClientNetwork.Instance.IsConnected()) { ClientNetwork.Instance.HeartBeastSwitch(false); } Utils.LogSys.Log("游戏暂停 一切停止"); // 缩到桌面的时候触发 } else { Utils.LogSys.Log("游戏开始 万物生机"); //回到游戏的时候触发 最晚 } }
/// <summary> /// ²¥·Å±³¾°ÒôÀÖ /// </summary> /// <param name="canPlay"></param> public void PlayBacksound(string name, bool canPlay) { if (audio.clip != null) { if (name.IndexOf(audio.clip.name) > -1) { if (!canPlay) { audio.Stop(); audio.clip = null; UtilTools.ClearMemory(); } return; } } if (canPlay) { audio.loop = true; audio.clip = LoadAudioClip(name); audio.Play(); } else { audio.Stop(); audio.clip = null; UtilTools.ClearMemory(); } }
//语音宽度/ //private int defaultWidth; void Awake() { isInit = true; m_label = UtilTools.GetChild <UILabel>(transform, "content"); m_labelName = UtilTools.GetChild <UILabel>(transform, "Sprite/Label"); m_labelTime = UtilTools.GetChild <UILabel>(transform, "time"); }
/// <summary> /// 格式化字符串 /// </summary> /// <param name="value"></param> /// <param name="first"></param> /// <param name="second"></param> /// <returns></returns> public static Dictionary <string, int> FormatKeyNumber(string value, char[] first, char[] second) { Dictionary <string, int> taskitems = new Dictionary <string, int>(); //string[] ss = value.Split(new char[] { ',' }, System.StringSplitOptions.RemoveEmptyEntries); string[] ss = value.Split(first, System.StringSplitOptions.RemoveEmptyEntries); // string[] no = new string[] { }; // string[] num = new string[] { }; string item = string.Empty; string[] temp; for (int i = 0; i < ss.Length; i++) { item = ss[i]; temp = item.Split(second, System.StringSplitOptions.RemoveEmptyEntries); if (temp.Length >= 2) { if (taskitems.ContainsKey(temp[0])) { string key = temp[0]; int old = taskitems[key]; int newi = UtilTools.IntParse(temp[1]); taskitems[key] = old + newi; } else { taskitems.Add(temp[0], UtilTools.IntParse(temp[1])); } } } return(taskitems); }
public ActionResult _AddAlertProviderItem(int providerId, string providerName) { try { ViewBag.Error = ""; ViewBag.SessionError = ""; var userData = MvcApplication.GetUserData(User.Identity.Name) ?? new UserData(); if (userData.UserId < 1) { ViewBag.SessionError = "Your session has expired! Please re-login"; return(View(new RegAlertProviderItemObj())); } if (providerId < 1 || string.IsNullOrEmpty(providerName) || providerName.Length < 2) { ViewBag.SessionError = "Your session has expired! Please re-login"; return(View(new RegAlertProviderItemObj())); } return(View(new RegAlertProviderItemObj { AlertProviderId = providerId, AlertProviderName = providerName })); } catch (Exception ex) { ViewBag.Error = "Error Occurred! Please try again later"; UtilTools.LogE(ex.StackTrace, ex.Source, ex.Message); return(View(new RegAlertProviderItemObj())); } }
/* @brief:登录账号错误回调 * @param: args 回调参数列表 * @return void */ public static void on_error_code(VarList args) { ConnectStage.mbConnected = false; ConnectStage.mbNeedReConnect = false; ConnectStage.mbSecondTimeConnect = false; loginStatus = false; if (TimerManager.IsHaveTimer("OnNetBlockTimer")) { TimerManager.Destroy("OnNetBlockTimer"); } //SystemWaitPanel.End(); UtilTools.PrintVarlist("on_error_code", args); int errorCode = args.GetInt(0); miErrorCode = errorCode; LogSystem.Log("LoginState ErrorCode::", errorCode); if (ConnectStage.isGameOut) { //服务器自动踢出游戏后,不在更新提示框 return; } PromptManager.Instance.ShowPromptUI(XmlManager.Instance.GetCommonText("Error" + errorCode)); }
/// <summary> /// 击飞 /// </summary> /// <param name="floatType"></param> public void BlowupAnim(int floatType) { if (animator.GetBool("ToppleState")) { PlayToppleback(); return; } if (animator.GetBool("Blow")) { PlayFloatback(); return; } if (floatType < 1) { return; } if (!animator.GetBool("InjuredState")) { animator.SetBool("InjuredState", true); } string floatName = UtilTools.StringBuilder("float", floatType); animator.Play(floatName, -1, 0.0f); animator.Update(0.0f); }
public ActionResult AddProduct(int clientId, string clientName) { try { ViewBag.Error = ""; ViewBag.SessionError = ""; var userData = MvcApplication.GetUserData(User.Identity.Name) ?? new UserData(); if (userData.UserId < 1) { ViewBag.SessionError = "Your session has expired! Please re-login"; return(View(new RegProductObj())); } if (clientId < 1 || clientName.IsNullOrEmpty() || clientName.Length < 2) { ViewBag.SessionError = "Invalid Client Selection"; return(View(new RegProductObj())); } return(View(new RegProductObj { ClientId = clientId, ClientName = clientName })); } catch (Exception ex) { ViewBag.SessionError = "Error Occurred! Please try again later"; UtilTools.LogE(ex.StackTrace, ex.Source, ex.Message); return(View(new RegProductObj())); } }
void UpdatePieceGrid(UIGridItem item) { if (item == null || item.mScripts == null || item.oData == null) { return; } RewardInfo rewardInfo = item.oData as RewardInfo; UISprite color = item.mScripts[0] as UISprite; UITexture head = item.mScripts[1] as UITexture; UILabel Name = item.mScripts[2] as UILabel; UISlider slider = item.mScripts[3] as UISlider; UISprite btn = item.mScripts[4] as UISprite; UILabel Num = item.mScripts[5] as UILabel; UISprite hetong = item.mScripts[6] as UISprite; slider.value = 0; ItemInfo info = ItemManager.GetItemInfo(rewardInfo.itemID); color.spriteName = UtilTools.StringBuilder("color" + info.color); Name.text = TextManager.GetItemString(rewardInfo.itemID); if (info.color == 5) { hetong.spriteName = "jinhetong"; } else { hetong.spriteName = "zihetong"; } LoadSprite.LoaderItem(head, rewardInfo.itemID, false); }
private void StartTweenAlpha(int playIndex) { playIndex = GetPlayIndex(playIndex); if (_lastIndex == -1) { _lastIndex = playIndex; } else { _trList[_lastIndex].localScale = new Vector3(1f, 1f, 1f); _lastIndex = playIndex; } if (playIndex < _spList.Count && playIndex < _tweenList.Count) { if (!_isStop && _isColor) { SetEffect(playIndex); } _tweenList[playIndex].from = 1; _tweenList[playIndex].to = 0; _tweenList[playIndex].delay = 0; _tweenList[playIndex].duration = 0.8f; _tweenList[playIndex].style = 0; _tweenList[playIndex].ResetToBeginning(); _tweenList[playIndex].value = 1; //_tweenList[playIndex].enabled = true; _tweenList[playIndex].PlayForward(); _trList[playIndex].localScale = new Vector3(1.1f, 1.1f, 1.1f); UtilTools.PlaySoundEffect("Sounds/RichCar/circle", taget: _tweenList[playIndex].gameObject); } }
protected override void ReplaceAwake() { _ctrl = UIManager.GetControler <RegisterBindingController>(); _btnClose = FindGameObject("Container/bg/btnClose"); _phoneInput = FindComponent <UIInput>("Container/phone/Sprite"); _passwordInput = FindComponent <UIInput>("Container/password/Sprite"); _verifyInput = FindComponent <UIInput>("Container/verify/Sprite"); _btnGetverifyCode = FindGameObject("Container/verify/btnVerify"); _btnGetverifyCodeGray = FindGameObject("Container/verify/btnVerifyGray"); _btnGetverifyCodeLb = FindComponent <UILabel>("Container/verify/btnVerifyGray/Label"); _btnSure = FindGameObject("Container/btnSure"); //_verifyBtnSpr = _btnGetverifyCode.GetComponent<UISprite>(); // _phoneInput.activeTextColor = new Color(dc661f); _phoneInput.defaultText = GameText.GetStr("login_name_default"); _passwordInput.defaultText = GameText.GetStr("reset_passWord_default"); _verifyInput.defaultText = GameText.GetStr("verify_default"); if (_ctrl.cooldownEndTime - UtilTools.GetClientTime() > 0) { _bUpdateCooldwon = true; SetVerifyShow(true); } else { SetVerifyShow(false); } }
public JsonResult ProcessForgotPasswordRequest(string email) { try { if (string.IsNullOrEmpty(email) || email.Length < 5) { return(Json(new { IsAuthenticated = true, IsSuccessful = false, IsReload = false, Error = "Invalid Email Address" })); } var passObj = new EmailResendObj { Email = email }; var response = new PortalUserManager().SendPasswordResetEmail(passObj, ""); if (response?.Status == null) { return(Json(new { IsAuthenticated = true, IsSuccessful = false, IsReload = false, Error = "Error Occurred! Please try again later" })); } if (!response.Status.IsSuccessful) { return(Json(new { IsAuthenticated = true, IsSuccessful = false, IsReload = false, Error = string.IsNullOrEmpty(response.Status.Message.FriendlyMessage) ? "Process Failed! Unable to process your request. Please try again later" : response.Status.Message.FriendlyMessage })); } return(Json(new { IsAuthenticated = true, IsSuccessful = true, IsReload = false, Error = "" })); } catch (Exception ex) { UtilTools.LogE(ex.StackTrace, ex.Source, ex.Message); return(Json(new { IsAuthenticated = true, IsSuccessful = false, IsReload = false, Error = "Process Error Occurred! Please try again later" })); } }
private void OnSureRegisterOrBinder(GameObject go) { //TODO 确定注册或者绑定 string phoneNum = _phoneInput.value; string password = _passwordInput.value; if (!IsPhoneNum(phoneNum)) { UtilTools.MessageDialog(GameText.GetStr("please_input_right_phone_num")); return; } if (!IsPassword(password)) { UtilTools.MessageDialog(GameText.GetStr("reset_passWord_default")); return; } string verifyCode = _verifyInput.value; if (_ctrl.isBinding) { LoginInputController.startUpMono.PhoneBind(phoneNum, password, verifyCode); // UtilTools.ShowWaitWin(WaitFlag.BindPhone, 5f); } else { LoginInputController.startUpMono.PhoneRegister(phoneNum, password, verifyCode); // UtilTools.ShowWaitWin(WaitFlag.RegisterAccount, 5f); } }
public static ClientRespObj LoadClients(ClientSearchObj regObj, string username) { var response = new ClientRespObj { Status = new APIResponseStatus { IsSuccessful = false, Message = new APIResponseMessage(), }, }; try { var apiResponse = new APIHelper(APIEndpoints.LOAD_CLIENTS_ENDPOINT, username, Method.POST).ProcessAPI <ClientSearchObj, ClientRespObj>(regObj, out var msg); if (msg.Code == 0 && string.IsNullOrEmpty(msg.TechMessage) && string.IsNullOrEmpty(msg.Message)) { return(apiResponse); } response.Status.Message.FriendlyMessage = msg.Message; response.Status.Message.TechnicalMessage = msg.TechMessage; return(response); } catch (Exception ex) { UtilTools.LogE(ex.StackTrace, ex.Source, ex.GetBaseException().Message); response.Status.Message.FriendlyMessage = "Error Occurred! Please try again later"; response.Status.Message.TechnicalMessage = "Error: " + ex.GetBaseException().Message; return(response); } }
//设置公会保护时间 public void SetCutOffTime() { string timeStr = ""; int time = 0; if (GuildMainMediator.mMyGuild.protectTime > 0) { time = (int)GuildMainMediator.mMyGuild.protectTime / 3600; if (time == 0) { timeStr = UtilTools.formatDuring(GuildMainMediator.mMyGuild.protectTime); panel.time.color = Color.green; panel.time.text = timeStr; } else { timeStr = time.ToString(); panel.time.color = Color.green; panel.time.text = timeStr + TextManager.GetUIString("UI_GuildBuild18"); } } else if (GuildMainMediator.mMyGuild.protectTime == 0) { panel.time.color = Color.red; panel.time.text = TextManager.GetUIString("UI_GuildTactic19"); } count = 1; SetProtectInfo(); }