/// <summary> /// AS-> public function CreateMessageBox(_title:String,_message:String,_type:uint,_btnOKCallBack:String=null,_btnCancelCallBack:String=null) /// </summary> /// <param name="_title">信息框标题</param> /// <param name="_message">信息内容,可html</param> /// <param name="_type">信息框显示类型</param> /// <param name="_btnOKCallBack">确认按钮点击回调,可为空</param> /// <param name="_btnCancelCallBack">取消按钮点击回调,可为空</param> public void CreateMessageBox(string _title, string _message, EMessageBoxType _type, string _btnOKCallBack = null, string _btnCancelCallBack = null) { int type = (Convert.ToInt32(_type)); Trace.Log("CreateMessageBox"); if (MyRoot.Invoke("CreateMessageBox", _title, _message, type, _btnOKCallBack, _btnCancelCallBack) == null) { Trace.LogError("error call CreateMessageBox failed"); return; } SetDepth((int)SFGFxMovieManager.EGFxMovieLayer.EGFxLayer_Loading); }
public DialogActions GetNewAction(EMessageBoxType _eType, Func <bool> _okCallback, Func <bool> _cancelCallback) { DialogActions result = new DialogActions(); if ((_eType & EMessageBoxType.EMBT_OK) > 0) { result.Add(ULocalizationService.Instance.Get("UIView", "Common", "ConfirmBtn"), _okCallback); } else if ((_eType & EMessageBoxType.EMBT_Cancel) > 0) { result.Add(ULocalizationService.Instance.Get("UIView", "Common", "CancelBtn"), _cancelCallback); } else if ((_eType & EMessageBoxType.EMBT_OKCancel) > 0) { result.Add(ULocalizationService.Instance.Get("UIView", "Common", "ConfirmBtn"), _okCallback); result.Add(ULocalizationService.Instance.Get("UIView", "Common", "CancelBtn"), _cancelCallback); } return(result); }
public static EResultType Show(EMessageBoxType pType, string pMsg, params string[] ps) { EResultType re = EResultType.Cancel; switch (pType) { case EMessageBoxType.Alert: CustomAlertDialog cad = new CustomAlertDialog(pMsg, ps); cad.ShowDialog(); break; case EMessageBoxType.Confirm: CustomConfirmDialog ccd = new CustomConfirmDialog(pMsg, ps); ccd.ShowDialog(); re = ccd.ConfirmResult; break; default: break; } return(re); }
/// <summary> /// /// </summary> /// <param name="_eType">按钮类型</param> /// <param name="_strOkCallback">确定按钮点击回调函数名</param> /// <param name="_strCancelCallback">取消按钮点击回调函数名</param> /// <returns></returns> public DialogActions GetNewAction(EMessageBoxType _eType, string _strOkCallback = null, string _strCancelCallback = null) { return(GetNewAction(_eType, GetCallback(_strOkCallback), GetCallback(_strCancelCallback))); }