public static Map CreateMap(MapTypesList TypeID) { switch (TypeID) { case MapTypesList.Bricks: return new BricksMap(); case MapTypesList.Clouds: return new CloudsMap(); case MapTypesList.Fibers: return new FibersMap(); case MapTypesList.Gradient: return new GradientMap(); case MapTypesList.Grid: return new GridMap(); case MapTypesList.Image: return new ImageMap(); case MapTypesList.Khaki: return new KhakiMap(); case MapTypesList.Noise: return new NoiseMap(); case MapTypesList.Single_Color: return new SingleColorMap(); case MapTypesList.Text: return new TextMap(); default: throw new ArgumentException("Unknown TypeID"); } }
private string EnumName(MapTypesList Item) { return Item.ToString().Replace("_", " "); }