74 lines
1.7 KiB
C#
74 lines
1.7 KiB
C#
|
|
using BingoBrain.Core;
|
||
|
|
using BingoBrain.HotFix;
|
||
|
|
|
||
|
|
namespace BingoBrain
|
||
|
|
{
|
||
|
|
public class FaqUIUICtrl : BaseUICtrl
|
||
|
|
{
|
||
|
|
private FaqUIUI ui;
|
||
|
|
private FaqUIModel model;
|
||
|
|
|
||
|
|
private uint openUIMsg = SkinInfo.FaqUIUI_Open;
|
||
|
|
private uint closeUIMsg = SkinInfo.FaqUIUI_Close;
|
||
|
|
|
||
|
|
#region 生命周期
|
||
|
|
protected override void OnInit()
|
||
|
|
{
|
||
|
|
//model = ModuleManager.Instance.GetModel(ModelConst.FaqUIModel) as FaqUIModel;
|
||
|
|
}
|
||
|
|
|
||
|
|
protected override void OnDispose()
|
||
|
|
{
|
||
|
|
}
|
||
|
|
|
||
|
|
public override void OpenUI(object args = null)
|
||
|
|
{
|
||
|
|
if (ui == null)
|
||
|
|
{
|
||
|
|
ui = new FaqUIUI(this);
|
||
|
|
ui.Open(args);
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
public override void CloseUI(object args = null)
|
||
|
|
{
|
||
|
|
if (ui != null && !ui.isClose)
|
||
|
|
{
|
||
|
|
ui.Close();
|
||
|
|
}
|
||
|
|
ui = null;
|
||
|
|
}
|
||
|
|
#endregion
|
||
|
|
|
||
|
|
#region 消息
|
||
|
|
public override uint GetOpenUIMsg(string uiName)
|
||
|
|
{
|
||
|
|
return openUIMsg;
|
||
|
|
}
|
||
|
|
public override uint GetCloseUIMsg(string uiName)
|
||
|
|
{
|
||
|
|
return closeUIMsg;
|
||
|
|
}
|
||
|
|
|
||
|
|
protected override void AddListener()
|
||
|
|
{
|
||
|
|
uiCtrlDispatcher.AddListener(openUIMsg, OpenUI);
|
||
|
|
uiCtrlDispatcher.AddListener(closeUIMsg, CloseUI);
|
||
|
|
}
|
||
|
|
protected override void RemoveListener()
|
||
|
|
{
|
||
|
|
uiCtrlDispatcher.RemoveListener(openUIMsg, OpenUI);
|
||
|
|
uiCtrlDispatcher.RemoveListener(closeUIMsg, CloseUI);
|
||
|
|
}
|
||
|
|
|
||
|
|
protected override void AddServerListener()
|
||
|
|
{
|
||
|
|
|
||
|
|
}
|
||
|
|
protected override void RemoveServerListener()
|
||
|
|
{
|
||
|
|
|
||
|
|
}
|
||
|
|
#endregion
|
||
|
|
}
|
||
|
|
}
|