void ChangeBuildingsListEvent(EventData ed) { if (ed?.Data["Action"] as string == "Add") { BuildingType.TryParse(ed.Data["Value"] as string, out BuildingType type); if (type == unitBase.awaliableAfter) { Show(); } } else if (ed?.Data["Action"] as string == "Remove") { BuildingType.TryParse(ed.Data["Value"] as string, out BuildingType type); if (type == unitBase.awaliableAfter) { Hide(); } } }