Compare commits
No commits in common. "91b2e7f92eec9ca8e9371337a5859d92ff2b16c2" and "fce0e6a981e7029f2c0fa44132a53fd880f7d641" have entirely different histories.
91b2e7f92e
...
fce0e6a981
@ -27,7 +27,6 @@ namespace QFramework.Example
|
|||||||
|
|
||||||
protected override void OnOpen(IUIData uiData = null)
|
protected override void OnOpen(IUIData uiData = null)
|
||||||
{
|
{
|
||||||
mData = uiData as UIBackPackData ?? new UIBackPackData();
|
|
||||||
Content.RemoveAllChildren();
|
Content.RemoveAllChildren();
|
||||||
|
|
||||||
foreach (var device in mData.devices)
|
foreach (var device in mData.devices)
|
||||||
|
|||||||
@ -17,6 +17,7 @@ namespace QFramework.Example
|
|||||||
protected override void OnInit(IUIData uiData = null)
|
protected override void OnInit(IUIData uiData = null)
|
||||||
{
|
{
|
||||||
mData = uiData as UIOperationListData ?? new UIOperationListData();
|
mData = uiData as UIOperationListData ?? new UIOperationListData();
|
||||||
|
TypeEventSystem.Global.Register<OnOperationChanged>((arg) => Refresh()).UnRegisterWhenGameObjectDestroyed(gameObject);
|
||||||
TypeEventSystem.Global.Register<OnModuleQuit>((arg) => Hide()).UnRegisterWhenGameObjectDestroyed(gameObject);
|
TypeEventSystem.Global.Register<OnModuleQuit>((arg) => Hide()).UnRegisterWhenGameObjectDestroyed(gameObject);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -80,9 +81,8 @@ namespace QFramework.Example
|
|||||||
|
|
||||||
protected override void OnOpen(IUIData uiData = null)
|
protected override void OnOpen(IUIData uiData = null)
|
||||||
{
|
{
|
||||||
TypeEventSystem.Global.Register<OnOperationChanged>((arg) => Refresh());
|
|
||||||
TypeEventSystem.Global.Register<StepStatusOnChange>(OnStepChanged).UnRegisterWhenDisabled(this);
|
TypeEventSystem.Global.Register<StepStatusOnChange>(OnStepChanged).UnRegisterWhenDisabled(this);
|
||||||
|
Refresh();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Refresh()
|
public void Refresh()
|
||||||
@ -150,17 +150,9 @@ namespace QFramework.Example
|
|||||||
|
|
||||||
protected override void OnShow()
|
protected override void OnShow()
|
||||||
{
|
{
|
||||||
Refresh();
|
|
||||||
}
|
}
|
||||||
protected override void OnClose()
|
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