/// <summary> /// 显示消息弹窗 /// </summary> /// <param name="style">样式</param> /// <param name="handler">点击处理</param> /// <param name="title">标题</param> /// <param name="content">内容</param> /// <param name="ok">OK按钮文本</param> /// <param name="cancel">取消按钮文本</param> public void ShowMsgBox(UIMsgBoxStyle style, UIMsgBoxDelegate handler, string content, string title = "", string ok = "", string cancel = "") { if (string.IsNullOrEmpty(content)) { JW.Common.Log.LogE("ShowMsgBox Error Content"); return; } if (_msgBox != null) { UIFormHelper.DisposeFormClass <UIMsgBox>(ref _msgBox); _msgBox = null; } _msgBox = UIFormHelper.CreateResidentFormClass <UIMsgBox>(); if (_msgBox != null) { if (string.IsNullOrEmpty(title)) { title = _msgBoxDefaultTitle; } if (string.IsNullOrEmpty(ok)) { ok = _msgBoxDefaultOk; } if (string.IsNullOrEmpty(cancel)) { cancel = _msgBoxDefaultCancel; } _msgBoxHandler = handler; _msgBox.InitShow(style, OnMsgBoxResult, title, content, ok, cancel); } }
private void OnBubbleTiming(UIBubble bb) { if (bb != null) { UIFormHelper.DisposeFormClass <UIBubble>(ref bb); } }
/// <summary> /// 显示提示 /// </summary> /// <param name="info"></param> public void ShowBubble(string info) { UIBubble bb = UIFormHelper.CreateFormClass <UIBubble>(false, null); if (bb != null) { bb.InitShow(info, OnBubbleTiming); } }
/// <summary> /// 清除菊花 /// </summary> public void CleanWaiting() { _waitingKeyList.Clear(); if (null != _waiting) { UIFormHelper.DisposeFormClass <UIWaiting>(ref _waiting); _waiting = null; } }
public void CloseMsgBox() { if (_msgBox != null) { UIFormHelper.DisposeFormClass <UIMsgBox>(ref _msgBox); _msgBox = null; } _msgBoxHandler = null; _msgBoxLuaHandler = null; }
private void OnMsgBoxResultLua(UIMsgBoxResult result) { if (_msgBox != null) { UIFormHelper.DisposeFormClass <UIMsgBox>(ref _msgBox); _msgBox = null; } // if (_msgBoxLuaHandler != null) { _msgBoxLuaHandler((int)result); } _msgBoxLuaHandler = null; }
public override void Uninitialize() { if (_msgBox != null) { UIFormHelper.DisposeFormClass <UIMsgBox>(ref _msgBox); _msgBox = null; } if (null != _waiting) { UIFormHelper.DisposeFormClass <UIWaiting>(ref _waiting); _waiting = null; } _msgBoxDefaultCancel = null; _msgBoxDefaultOk = null; _msgBoxDefaultTitle = null; _msgBoxHandler = null; _msgBoxLuaHandler = null; }
/// <summary> /// 显示或者关闭菊花 /// </summary> /// <param name="key">键</param> /// <param name="isShow">是否显示</param> public void ShowWaiting(string key, bool isShow, string tip = "") { if (isShow) { if (_waitingKeyList.Contains(key)) { //JW.Common.Log.LogE("ShowWaiting Logic Error Repeat Key:" + key); if (_waiting != null) { _waiting.ShowTip(tip); } return; } _waitingKeyList.Add(key); if (_waiting == null) { _waiting = UIFormHelper.CreateResidentFormClass <UIWaiting>(); _waiting.ShowTip(tip); } else { _waiting.ActiveForm(true); _waiting.ShowTip(tip); } } else { int firstIndex = _waitingKeyList.IndexOf(key); if (firstIndex >= 0 && firstIndex < _waitingKeyList.Count) { _waitingKeyList.RemoveAt(firstIndex); } if (_waitingKeyList.Count == 0) { if (null != _waiting) { _waiting.ActiveForm(false); //UIFormHelper.DisposeFormClass<UIWaiting>(ref _waiting); //_waiting = null; } } } }