Compare commits

..

No commits in common. "91b2e7f92eec9ca8e9371337a5859d92ff2b16c2" and "fce0e6a981e7029f2c0fa44132a53fd880f7d641" have entirely different histories.

2 changed files with 2 additions and 11 deletions

View File

@ -27,7 +27,6 @@ namespace QFramework.Example
protected override void OnOpen(IUIData uiData = null)
{
mData = uiData as UIBackPackData ?? new UIBackPackData();
Content.RemoveAllChildren();
foreach (var device in mData.devices)

View File

@ -17,6 +17,7 @@ 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);
}
@ -80,9 +81,8 @@ 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,17 +150,9 @@ 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());
}
}
}