Merge branch 'AnHui_BaoShi' of http://git.zxkedu.com:33769/JiNan/VirtualFramework into AnHui_BaoShi
This commit is contained in:
commit
e35012f096
@ -27,6 +27,7 @@ namespace QFramework.Example
|
||||
|
||||
protected override void OnOpen(IUIData uiData = null)
|
||||
{
|
||||
mData = uiData as UIBackPackData ?? new UIBackPackData();
|
||||
Content.RemoveAllChildren();
|
||||
|
||||
foreach (var device in mData.devices)
|
||||
|
||||
@ -17,7 +17,6 @@ namespace QFramework.Example
|
||||
protected override void OnInit(IUIData uiData = null)
|
||||
{
|
||||
mData = uiData as UIOperationListData ?? new UIOperationListData();
|
||||
TypeEventSystem.Global.Register<OnOperationChanged>((arg) => Refresh()).UnRegisterWhenGameObjectDestroyed(gameObject);
|
||||
TypeEventSystem.Global.Register<OnModuleQuit>((arg) => Hide()).UnRegisterWhenGameObjectDestroyed(gameObject);
|
||||
}
|
||||
|
||||
@ -81,8 +80,9 @@ namespace QFramework.Example
|
||||
|
||||
protected override void OnOpen(IUIData uiData = null)
|
||||
{
|
||||
TypeEventSystem.Global.Register<OnOperationChanged>((arg) => Refresh());
|
||||
TypeEventSystem.Global.Register<StepStatusOnChange>(OnStepChanged).UnRegisterWhenDisabled(this);
|
||||
Refresh();
|
||||
|
||||
}
|
||||
|
||||
public void Refresh()
|
||||
@ -150,9 +150,17 @@ namespace QFramework.Example
|
||||
|
||||
protected override void OnShow()
|
||||
{
|
||||
Refresh();
|
||||
}
|
||||
protected override void OnClose()
|
||||
{
|
||||
TypeEventSystem.Global.UnRegister<OnOperationChanged>((arg) => Refresh());
|
||||
}
|
||||
|
||||
public override void Hide()
|
||||
{
|
||||
base.Hide();
|
||||
TypeEventSystem.Global.UnRegister<OnOperationChanged>((arg) => Refresh());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user