IModuleContainer.cs 773 B

12345678910111213141516171819202122232425
  1. using System.Xml.Linq;
  2. namespace ModuleBase;
  3. public interface IModuleContainer
  4. {
  5. public string MainReginName { get; }
  6. void AddModule(string name);
  7. void AddNavigation(ContainerInfo containerInfo);
  8. void RequestNavigation(string mainModuleName, string subModuleName);
  9. void NavigateToDefault();
  10. }
  11. public class ContainerInfo(int index, string? name, string moduleName, bool isDefault, Dictionary<int, string> subModules, bool isHidden = false)
  12. {
  13. public int Index { get; } = index;
  14. public string? DisplayName { get; } = name;
  15. public string ModuleName { get; } = moduleName;
  16. public bool IsDefault { get; } = isDefault;
  17. public bool IsHidden { get; } = isHidden;
  18. public Dictionary<int, string> SubModules { get; } = subModules;
  19. }