MapViewTemplate.txt 834 B

12345678910111213141516171819202122232425262728293031
  1. using <#ProductName>.Map.<#KeyName>;
  2. using XGame.Framework.Components;
  3. using XGame.Framework.Map;
  4. using XGame.Framework.ObjectCollection;
  5. namespace <#ProductName>.Map
  6. {
  7. public static partial class MapKeys
  8. {
  9. private static MapKey _<#KeyName>;
  10. public static MapKey <#KeyName> => _<#KeyName> ??= new MapKey("<#KeyName>", typeof(<#KeyName>View));
  11. }
  12. public class <#KeyName>View : MapView<<#KeyName>VM>, I<#ComponentName>Context
  13. {
  14. protected override void AddComponent(IComponentGroup group)
  15. {
  16. group.Add(new <#ComponentName>Component());
  17. }
  18. protected override <#KeyName>VM CtreatViewModel(IObjectCollector collector)
  19. {
  20. return new <#KeyName>VM(collector);
  21. }
  22. protected override void OnDispose()
  23. {
  24. }
  25. }
  26. }