diff options
| author | Roy Ben-Shabat <Roy@Twine-s.com> | 2018-03-05 12:34:58 +0200 |
|---|---|---|
| committer | Roy Ben-Shabat <Roy@Twine-s.com> | 2018-03-05 12:34:58 +0200 |
| commit | 628819a1787290f84c22ecc7cb747f649fd54468 (patch) | |
| tree | abc7aa70a02818bc0549e36f82564d278ec247c6 /Software/Visual_Studio/Embroidery | |
| parent | 4a9f241ed8230586242621795f76aa0add9f6008 (diff) | |
| download | Tango-628819a1787290f84c22ecc7cb747f649fd54468.tar.gz Tango-628819a1787290f84c22ecc7cb747f649fd54468.zip | |
Added dynamic factoring for embroidery import thread length.
Diffstat (limited to 'Software/Visual_Studio/Embroidery')
15 files changed, 376 insertions, 0 deletions
diff --git a/Software/Visual_Studio/Embroidery/Tango.EmbroideryUI/EmbroideryMaterialsHelper.cs b/Software/Visual_Studio/Embroidery/Tango.EmbroideryUI/EmbroideryMaterialsHelper.cs new file mode 100644 index 000000000..86704a2fd --- /dev/null +++ b/Software/Visual_Studio/Embroidery/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; + } + } +} diff --git a/Software/Visual_Studio/Embroidery/Tango.EmbroideryUI/IEmbroideryMaterial.cs b/Software/Visual_Studio/Embroidery/Tango.EmbroideryUI/IEmbroideryMaterial.cs new file mode 100644 index 000000000..e1d304086 --- /dev/null +++ b/Software/Visual_Studio/Embroidery/Tango.EmbroideryUI/IEmbroideryMaterial.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Tango.EmbroideryUI +{ + public interface IEmbroideryMaterial + { + double Coefficient { get; } + + String Name { get; } + } +} diff --git a/Software/Visual_Studio/Embroidery/Tango.EmbroideryUI/Materials/Jersey.cs b/Software/Visual_Studio/Embroidery/Tango.EmbroideryUI/Materials/Jersey.cs new file mode 100644 index 000000000..004a67940 --- /dev/null +++ b/Software/Visual_Studio/Embroidery/Tango.EmbroideryUI/Materials/Jersey.cs @@ -0,0 +1,27 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Tango.EmbroideryUI.Materials +{ + public class Jersey : IEmbroideryMaterial + { + public double Coefficient + { + get + { + return 1; + } + } + + public string Name + { + get + { + return "Jersey"; + } + } + } +} diff --git a/Software/Visual_Studio/Embroidery/Tango.EmbroideryUI/Materials/Leather.cs b/Software/Visual_Studio/Embroidery/Tango.EmbroideryUI/Materials/Leather.cs new file mode 100644 index 000000000..5cf26d890 --- /dev/null +++ b/Software/Visual_Studio/Embroidery/Tango.EmbroideryUI/Materials/Leather.cs @@ -0,0 +1,27 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Tango.EmbroideryUI.Materials +{ + public class Leather : IEmbroideryMaterial + { + public double Coefficient + { + get + { + return 1; + } + } + + public string Name + { + get + { + return "Leather"; + } + } + } +} diff --git a/Software/Visual_Studio/Embroidery/Tango.EmbroideryUI/Materials/Linen.cs b/Software/Visual_Studio/Embroidery/Tango.EmbroideryUI/Materials/Linen.cs new file mode 100644 index 000000000..db7f2fcaa --- /dev/null +++ b/Software/Visual_Studio/Embroidery/Tango.EmbroideryUI/Materials/Linen.cs @@ -0,0 +1,27 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Tango.EmbroideryUI.Materials +{ + public class Linen : IEmbroideryMaterial + { + public double Coefficient + { + get + { + return 1; + } + } + + public string Name + { + get + { + return "Linen"; + } + } + } +} diff --git a/Software/Visual_Studio/Embroidery/Tango.EmbroideryUI/Materials/Lycra.cs b/Software/Visual_Studio/Embroidery/Tango.EmbroideryUI/Materials/Lycra.cs new file mode 100644 index 000000000..1e020d3f2 --- /dev/null +++ b/Software/Visual_Studio/Embroidery/Tango.EmbroideryUI/Materials/Lycra.cs @@ -0,0 +1,27 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Tango.EmbroideryUI.Materials +{ + public class Lycra : IEmbroideryMaterial + { + public double Coefficient + { + get + { + return 1; + } + } + + public string Name + { + get + { + return "Lycra"; + } + } + } +} diff --git a/Software/Visual_Studio/Embroidery/Tango.EmbroideryUI/Materials/Mesh.cs b/Software/Visual_Studio/Embroidery/Tango.EmbroideryUI/Materials/Mesh.cs new file mode 100644 index 000000000..e99dd4823 --- /dev/null +++ b/Software/Visual_Studio/Embroidery/Tango.EmbroideryUI/Materials/Mesh.cs @@ -0,0 +1,27 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Tango.EmbroideryUI.Materials +{ + public class Mesh : IEmbroideryMaterial + { + public double Coefficient + { + get + { + return 1; + } + } + + public string Name + { + get + { + return "Mesh"; + } + } + } +} diff --git a/Software/Visual_Studio/Embroidery/Tango.EmbroideryUI/Materials/MicroFiber.cs b/Software/Visual_Studio/Embroidery/Tango.EmbroideryUI/Materials/MicroFiber.cs new file mode 100644 index 000000000..51b16afe7 --- /dev/null +++ b/Software/Visual_Studio/Embroidery/Tango.EmbroideryUI/Materials/MicroFiber.cs @@ -0,0 +1,27 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Tango.EmbroideryUI.Materials +{ + public class MicroFiber : IEmbroideryMaterial + { + public double Coefficient + { + get + { + return 1; + } + } + + public string Name + { + get + { + return "Micro Fiber"; + } + } + } +} diff --git a/Software/Visual_Studio/Embroidery/Tango.EmbroideryUI/Materials/Nylon.cs b/Software/Visual_Studio/Embroidery/Tango.EmbroideryUI/Materials/Nylon.cs new file mode 100644 index 000000000..9cf33d1ee --- /dev/null +++ b/Software/Visual_Studio/Embroidery/Tango.EmbroideryUI/Materials/Nylon.cs @@ -0,0 +1,27 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Tango.EmbroideryUI.Materials +{ + public class Nylon : IEmbroideryMaterial + { + public double Coefficient + { + get + { + return 1; + } + } + + public string Name + { + get + { + return "Nylon"; + } + } + } +} diff --git a/Software/Visual_Studio/Embroidery/Tango.EmbroideryUI/Materials/Pique.cs b/Software/Visual_Studio/Embroidery/Tango.EmbroideryUI/Materials/Pique.cs new file mode 100644 index 000000000..1263b23d2 --- /dev/null +++ b/Software/Visual_Studio/Embroidery/Tango.EmbroideryUI/Materials/Pique.cs @@ -0,0 +1,27 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Tango.EmbroideryUI.Materials +{ + public class Pique : IEmbroideryMaterial + { + public double Coefficient + { + get + { + return 1; + } + } + + public string Name + { + get + { + return "Pique"; + } + } + } +} diff --git a/Software/Visual_Studio/Embroidery/Tango.EmbroideryUI/Materials/PolyCotton.cs b/Software/Visual_Studio/Embroidery/Tango.EmbroideryUI/Materials/PolyCotton.cs new file mode 100644 index 000000000..7dacaa945 --- /dev/null +++ b/Software/Visual_Studio/Embroidery/Tango.EmbroideryUI/Materials/PolyCotton.cs @@ -0,0 +1,27 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Tango.EmbroideryUI.Materials +{ + public class PolyCotton : IEmbroideryMaterial + { + public double Coefficient + { + get + { + return 1; + } + } + + public string Name + { + get + { + return "Poly Cotton"; + } + } + } +} diff --git a/Software/Visual_Studio/Embroidery/Tango.EmbroideryUI/Materials/Polyester.cs b/Software/Visual_Studio/Embroidery/Tango.EmbroideryUI/Materials/Polyester.cs new file mode 100644 index 000000000..7c915f138 --- /dev/null +++ b/Software/Visual_Studio/Embroidery/Tango.EmbroideryUI/Materials/Polyester.cs @@ -0,0 +1,27 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Tango.EmbroideryUI.Materials +{ + public class Polyester : IEmbroideryMaterial + { + public double Coefficient + { + get + { + return 1; + } + } + + public string Name + { + get + { + return "Polyester"; + } + } + } +} diff --git a/Software/Visual_Studio/Embroidery/Tango.EmbroideryUI/Materials/PureCotton.cs b/Software/Visual_Studio/Embroidery/Tango.EmbroideryUI/Materials/PureCotton.cs new file mode 100644 index 000000000..270756af2 --- /dev/null +++ b/Software/Visual_Studio/Embroidery/Tango.EmbroideryUI/Materials/PureCotton.cs @@ -0,0 +1,27 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Tango.EmbroideryUI.Materials +{ + public class PureCotton : IEmbroideryMaterial + { + public double Coefficient + { + get + { + return 1; + } + } + + public string Name + { + get + { + return "Pure Cotton"; + } + } + } +} diff --git a/Software/Visual_Studio/Embroidery/Tango.EmbroideryUI/Materials/Rayon.cs b/Software/Visual_Studio/Embroidery/Tango.EmbroideryUI/Materials/Rayon.cs new file mode 100644 index 000000000..e71258aba --- /dev/null +++ b/Software/Visual_Studio/Embroidery/Tango.EmbroideryUI/Materials/Rayon.cs @@ -0,0 +1,27 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Tango.EmbroideryUI.Materials +{ + public class Rayon : IEmbroideryMaterial + { + public double Coefficient + { + get + { + return 1; + } + } + + public string Name + { + get + { + return "Rayon"; + } + } + } +} diff --git a/Software/Visual_Studio/Embroidery/Tango.EmbroideryUI/Tango.EmbroideryUI.csproj b/Software/Visual_Studio/Embroidery/Tango.EmbroideryUI/Tango.EmbroideryUI.csproj index 9ef098618..11b779275 100644 --- a/Software/Visual_Studio/Embroidery/Tango.EmbroideryUI/Tango.EmbroideryUI.csproj +++ b/Software/Visual_Studio/Embroidery/Tango.EmbroideryUI/Tango.EmbroideryUI.csproj @@ -60,7 +60,21 @@ <Compile Include="EmbroideryFileEditor.xaml.cs"> <DependentUpon>EmbroideryFileEditor.xaml</DependentUpon> </Compile> + <Compile Include="EmbroideryMaterialsHelper.cs" /> + <Compile Include="IEmbroideryMaterial.cs" /> <Compile Include="EmbroideryPath.cs" /> + <Compile Include="Materials\Jersey.cs" /> + <Compile Include="Materials\Leather.cs" /> + <Compile Include="Materials\Linen.cs" /> + <Compile Include="Materials\Lycra.cs" /> + <Compile Include="Materials\Mesh.cs" /> + <Compile Include="Materials\MicroFiber.cs" /> + <Compile Include="Materials\Nylon.cs" /> + <Compile Include="Materials\Pique.cs" /> + <Compile Include="Materials\PolyCotton.cs" /> + <Compile Include="Materials\Polyester.cs" /> + <Compile Include="Materials\PureCotton.cs" /> + <Compile Include="Materials\Rayon.cs" /> <Compile Include="Properties\AssemblyInfo.cs"> <SubType>Code</SubType> </Compile> |
