AppComponent.cs 598 B

123456789101112131415161718192021
  1. using FL.FGUI;
  2. using XGame.Framework.Nodes;
  3. namespace FL.Nodes
  4. {
  5. public class AppComponent : NodeComponent
  6. {
  7. public override void OnEnable(object intent)
  8. {
  9. Context.Tree.AddAsync(NodeKeys.Network);
  10. Context.Tree.AddAsync(NodeKeys.Login);
  11. Context.UI.OpenAsync(UIKeys.CommonToastPanel);
  12. }
  13. public override void OnDisable()
  14. {
  15. Context.Tree.Remove(NodeKeys.Login, true);
  16. Context.Tree.Remove(NodeKeys.Network, true);
  17. Context.UI.Close(UIKeys.CommonToastPanel, true);
  18. }
  19. }
  20. }