diff options
Diffstat (limited to 'Software/Visual_Studio/Tango.EmbroideryUI/EmbroideryMaterialsHelper.cs')
| -rw-r--r-- | Software/Visual_Studio/Tango.EmbroideryUI/EmbroideryMaterialsHelper.cs | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/Software/Visual_Studio/Tango.EmbroideryUI/EmbroideryMaterialsHelper.cs b/Software/Visual_Studio/Tango.EmbroideryUI/EmbroideryMaterialsHelper.cs new file mode 100644 index 000000000..86704a2fd --- /dev/null +++ b/Software/Visual_Studio/Tango.EmbroideryUI/EmbroideryMaterialsHelper.cs @@ -0,0 +1,23 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Tango.EmbroideryUI +{ + public static class EmbroideryMaterialsHelper + { + public static List<IEmbroideryMaterial> GetAvailableEmbroideryMaterials() + { + List<IEmbroideryMaterial> materials = new List<IEmbroideryMaterial>(); + + foreach (var type in typeof(IEmbroideryMaterial).Assembly.GetTypes().Where(x => typeof(IEmbroideryMaterial).IsAssignableFrom(x) && !x.IsAbstract)) + { + materials.Add(Activator.CreateInstance(type) as IEmbroideryMaterial); + } + + return materials; + } + } +} |
