public SubMessage(SubMessageLayer subMessageLayer, string Message, float ShowTime, MessageType type) { this.SubMsgLayer = subMessageLayer; this.MsgMainBody = Message; this.ShowTime = ShowTime; messageType = type; }
public SubMessage(SubMessageLayer subMsgLayer, string MsgTitle, string MsgMainBody, string EnsureBtnStr) { this.SubMsgLayer = subMsgLayer; this.MsgTitle = MsgTitle; this.MsgMainBody = MsgMainBody; this.EnsureBtnStr = EnsureBtnStr; messageType = MessageType.WithoutCallBack; }
/// <summary> /// show方法,显示提示框 /// </summary> /// <param name="MsgLayer">优先级,1为最高,10为最低</param> /// <param name="MsgTitle">信息标题</param> /// <param name="Msg">主信息</param> /// <param name="EnsureBtnStr">确定按钮的文字</param> /// <param name="CancelBtnStr">取消按钮的文字</param> /// <param name="SureButtonCallBack">确定按钮的回调</param> /// <param name="CancelButtonCallBack">取消按钮的回调</param> public void Show(int MsgLayer, string MsgTitle, string Msg, string EnsureBtnStr, string CancelBtnStr, MessageBoxCallBack SureButtonCallBack, MessageBoxCallBack CancelButtonCallBack) { if (MessageArray[MsgLayer] == null) { MessageArray[MsgLayer] = new SubMessageLayer(MsgLayer); } MessageArray[MsgLayer].AddSubMessage(new SubMessage(MessageArray[MsgLayer], MsgTitle, Msg, EnsureBtnStr, CancelBtnStr, SureButtonCallBack, CancelButtonCallBack)); ShowLayerMsgBox(); }
/// <summary> /// show方法,显示提示框 /// </summary> /// <param name="MsgLayer">优先级,1为最高,10为最低</param> /// <param name="MsgTitle">信息标题</param> /// <param name="Msg">主信息</param> /// <param name="EnsureBtnStr">按钮文字</param> public void Show(int MsgLayer, string MsgTitle, string Msg, string EnsureBtnStr) { if (MessageArray[MsgLayer] == null) { MessageArray[MsgLayer] = new SubMessageLayer(MsgLayer); } MessageArray[MsgLayer].AddSubMessage(new SubMessage(MessageArray[MsgLayer], MsgTitle, Msg, EnsureBtnStr)); ShowLayerMsgBox(); }
/// <summary> /// 显示不锁屏类型tips /// </summary> public void ShowUnlockTips(int MsgLayer, string TipsInfo, float ShowTime) { if (MessageArray[MsgLayer] == null) { MessageArray[MsgLayer] = new SubMessageLayer(MsgLayer); } MessageArray[MsgLayer].AddSubMessage(new SubMessage(MessageArray[MsgLayer], TipsInfo, ShowTime, MessageType.UnlockTipsMessage)); ShowLayerMsgBox(); }
public SubMessage(SubMessageLayer subMsgLayer, string MsgTitle, string MsgMainBody, string EnsureBtnStr, MessageBoxCallBack SureMessageCallBack)//带确定返回参数 { this.SubMsgLayer = subMsgLayer; this.MsgTitle = MsgTitle; this.MsgMainBody = MsgMainBody; this.EnsureBtnStr = EnsureBtnStr; this.SureMessageCallBack = SureMessageCallBack; messageType = MessageType.WithAnParameter; }
//带消耗性货币 public SubMessage(SubMessageLayer subMsgLayer, EMessageCoinType coinType, string MsgMainBody, string MsgMoney, string EnsureBtnStr, string CancelBtnStr, MessageBoxCallBack SureMessageCallBack, MessageBoxCallBack CancelMessageCallBack) //带确定取消返回参数 { this.SubMsgLayer = subMsgLayer; //界面中把标题当消耗货币使用// this.MsgMainBody = MsgMainBody; this.MsgMoneyStr = MsgMoney; this.ShowCoinType = coinType; this.EnsureBtnStr = EnsureBtnStr; this.CancelBtnStr = CancelBtnStr; this.SureMessageCallBack = SureMessageCallBack; this.CancelMessageCallBack = CancelMessageCallBack; messageType = MessageType.WithTwoParamMoney; }
/// <summary> /// show方法,显示提示框(带消耗货币) /// </summary> /// <param name="MsgLayer">优先级,1为最高,10为最低</param> /// <param name="MsgTitle">信息标题</param> /// <param name="Msg">主信息</param> /// <param name="EnsureBtnStr">确定按钮的文字</param> /// <param name="CancelBtnStr">取消按钮的文字</param> /// <param name="SureButtonCallBack">确定按钮的回调</param> /// <param name="CancelButtonCallBack">取消按钮的回调</param> public void Show(int MsgLayer, EMessageCoinType coinType, string MsgText, int money, string EnsureBtnStr, string CancelBtnStr, MessageBoxCallBack SureButtonCallBack, MessageBoxCallBack CancelButtonCallBack) { if (MessageArray[MsgLayer] == null) { MessageArray[MsgLayer] = new SubMessageLayer(MsgLayer); } string strMoney = money.ToString(); if ((coinType == EMessageCoinType.EGoldType && !PlayerManager.Instance.IsBindPayEnough(money)) || (coinType == EMessageCoinType.ECuType && !PlayerManager.Instance.IsMoneyEnough(money))) { strMoney = "[ff0000]" + money + "[-]"; } MessageArray[MsgLayer].AddSubMessage(new SubMessage(MessageArray[MsgLayer], coinType, MsgText, strMoney, EnsureBtnStr, CancelBtnStr, SureButtonCallBack, CancelButtonCallBack)); ShowLayerMsgBox(); }