public static void Command_ClearAllTerritories() { Manager PluginTerritoryManager = Plugin.TerritoryManager; Territories.TerritoriesManager TerritoryManager = (Territories.TerritoriesManager)PluginTerritoryManager; TerritoryManager.DestroyTerritories(); }
// Constructor public TerritoryWarsMainMenu() : base(SubMenuTitle(Plugin.MainMenuName)) { Manager PluginTerritoryManager = Plugin.TerritoryManager; Territories.TerritoriesManager TerritoryManager = (Territories.TerritoriesManager)PluginTerritoryManager; NewChoice(ShowBlipsName, null, TerritoryManager.ShowAllTerritoryBlips); NewChoice(ClearBlipsName, null, TerritoryManager.RemoveAllTerritoryBlips); NewChoice(TerritoriesName, TerritoryMenu, TerritoryMenu.LoadTerritories); }
public void LoadTerritories(string EventText) { if (string.IsNullOrEmpty(EventText)) { throw new System.ArgumentException("message", nameof(EventText)); } Clear(); Manager PluginManager = Plugin.TerritoryManager; Territories.TerritoriesManager TerritoryManager = (Territories.TerritoriesManager)PluginManager; foreach (DictionaryEntry Enumerator in TerritoryManager.Territories) { string Name = (string)Enumerator.Key; UIMenuItem Choice = NewChoice(Name, null, TerritoryManager.BlipTerritory); } }