aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/Tango.PMR/Embroidery
diff options
context:
space:
mode:
authorRoy <roy.mail.net@gmail.com>2018-03-03 00:52:22 +0200
committerRoy <roy.mail.net@gmail.com>2018-03-03 00:52:22 +0200
commit79ffa1774217400bd750f6a85df9f969429580c3 (patch)
tree1d093fcaa82c2f1940a330a6a5852d879ffe5409 /Software/Visual_Studio/Tango.PMR/Embroidery
parent65d7f918b273a572d2d9a1d08a2797ea76b10850 (diff)
downloadTango-79ffa1774217400bd750f6a85df9f969429580c3.tar.gz
Tango-79ffa1774217400bd750f6a85df9f969429580c3.zip
Added Delta Resolution for Hive Color Picker.
Implemented Embroidery PMR. Implemented Embroidery Native Adapter.
Diffstat (limited to 'Software/Visual_Studio/Tango.PMR/Embroidery')
-rw-r--r--Software/Visual_Studio/Tango.PMR/Embroidery/AnalyzeInput.cs159
-rw-r--r--Software/Visual_Studio/Tango.PMR/Embroidery/AnalyzeOutput.cs167
-rw-r--r--Software/Visual_Studio/Tango.PMR/Embroidery/EmbroideryFile.cs323
-rw-r--r--Software/Visual_Studio/Tango.PMR/Embroidery/Extents.cs244
-rw-r--r--Software/Visual_Studio/Tango.PMR/Embroidery/Stitch.cs386
-rw-r--r--Software/Visual_Studio/Tango.PMR/Embroidery/StitchColor.cs216
-rw-r--r--Software/Visual_Studio/Tango.PMR/Embroidery/StitchFlag.cs50
7 files changed, 1545 insertions, 0 deletions
diff --git a/Software/Visual_Studio/Tango.PMR/Embroidery/AnalyzeInput.cs b/Software/Visual_Studio/Tango.PMR/Embroidery/AnalyzeInput.cs
new file mode 100644
index 000000000..d77df3e6b
--- /dev/null
+++ b/Software/Visual_Studio/Tango.PMR/Embroidery/AnalyzeInput.cs
@@ -0,0 +1,159 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: AnalyzeInput.proto
+#pragma warning disable 1591, 0612, 3021
+#region Designer generated code
+
+using pb = global::Google.Protobuf;
+using pbc = global::Google.Protobuf.Collections;
+using pbr = global::Google.Protobuf.Reflection;
+using scg = global::System.Collections.Generic;
+namespace Tango.PMR.Embroidery {
+
+ /// <summary>Holder for reflection information generated from AnalyzeInput.proto</summary>
+ public static partial class AnalyzeInputReflection {
+
+ #region Descriptor
+ /// <summary>File descriptor for AnalyzeInput.proto</summary>
+ public static pbr::FileDescriptor Descriptor {
+ get { return descriptor; }
+ }
+ private static pbr::FileDescriptor descriptor;
+
+ static AnalyzeInputReflection() {
+ byte[] descriptorData = global::System.Convert.FromBase64String(
+ string.Concat(
+ "ChJBbmFseXplSW5wdXQucHJvdG8SFFRhbmdvLlBNUi5FbWJyb2lkZXJ5IiAK",
+ "DEFuYWx5emVJbnB1dBIQCghGaWxlUGF0aBgBIAEoCUIgCh5jb20udHdpbmUu",
+ "dGFuZ28ucG1yLmVtYnJvaWRlcnliBnByb3RvMw=="));
+ descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
+ new pbr::FileDescriptor[] { },
+ new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] {
+ new pbr::GeneratedClrTypeInfo(typeof(global::Tango.PMR.Embroidery.AnalyzeInput), global::Tango.PMR.Embroidery.AnalyzeInput.Parser, new[]{ "FilePath" }, null, null, null)
+ }));
+ }
+ #endregion
+
+ }
+ #region Messages
+ public sealed partial class AnalyzeInput : pb::IMessage<AnalyzeInput> {
+ private static readonly pb::MessageParser<AnalyzeInput> _parser = new pb::MessageParser<AnalyzeInput>(() => new AnalyzeInput());
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pb::MessageParser<AnalyzeInput> Parser { get { return _parser; } }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pbr::MessageDescriptor Descriptor {
+ get { return global::Tango.PMR.Embroidery.AnalyzeInputReflection.Descriptor.MessageTypes[0]; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ pbr::MessageDescriptor pb::IMessage.Descriptor {
+ get { return Descriptor; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public AnalyzeInput() {
+ OnConstruction();
+ }
+
+ partial void OnConstruction();
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public AnalyzeInput(AnalyzeInput other) : this() {
+ filePath_ = other.filePath_;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public AnalyzeInput Clone() {
+ return new AnalyzeInput(this);
+ }
+
+ /// <summary>Field number for the "FilePath" field.</summary>
+ public const int FilePathFieldNumber = 1;
+ private string filePath_ = "";
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public string FilePath {
+ get { return filePath_; }
+ set {
+ filePath_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override bool Equals(object other) {
+ return Equals(other as AnalyzeInput);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool Equals(AnalyzeInput other) {
+ if (ReferenceEquals(other, null)) {
+ return false;
+ }
+ if (ReferenceEquals(other, this)) {
+ return true;
+ }
+ if (FilePath != other.FilePath) return false;
+ return true;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override int GetHashCode() {
+ int hash = 1;
+ if (FilePath.Length != 0) hash ^= FilePath.GetHashCode();
+ return hash;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override string ToString() {
+ return pb::JsonFormatter.ToDiagnosticString(this);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void WriteTo(pb::CodedOutputStream output) {
+ if (FilePath.Length != 0) {
+ output.WriteRawTag(10);
+ output.WriteString(FilePath);
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int CalculateSize() {
+ int size = 0;
+ if (FilePath.Length != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeStringSize(FilePath);
+ }
+ return size;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(AnalyzeInput other) {
+ if (other == null) {
+ return;
+ }
+ if (other.FilePath.Length != 0) {
+ FilePath = other.FilePath;
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(pb::CodedInputStream input) {
+ uint tag;
+ while ((tag = input.ReadTag()) != 0) {
+ switch(tag) {
+ default:
+ input.SkipLastField();
+ break;
+ case 10: {
+ FilePath = input.ReadString();
+ break;
+ }
+ }
+ }
+ }
+
+ }
+
+ #endregion
+
+}
+
+#endregion Designer generated code
diff --git a/Software/Visual_Studio/Tango.PMR/Embroidery/AnalyzeOutput.cs b/Software/Visual_Studio/Tango.PMR/Embroidery/AnalyzeOutput.cs
new file mode 100644
index 000000000..3628489e3
--- /dev/null
+++ b/Software/Visual_Studio/Tango.PMR/Embroidery/AnalyzeOutput.cs
@@ -0,0 +1,167 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: AnalyzeOutput.proto
+#pragma warning disable 1591, 0612, 3021
+#region Designer generated code
+
+using pb = global::Google.Protobuf;
+using pbc = global::Google.Protobuf.Collections;
+using pbr = global::Google.Protobuf.Reflection;
+using scg = global::System.Collections.Generic;
+namespace Tango.PMR.Embroidery {
+
+ /// <summary>Holder for reflection information generated from AnalyzeOutput.proto</summary>
+ public static partial class AnalyzeOutputReflection {
+
+ #region Descriptor
+ /// <summary>File descriptor for AnalyzeOutput.proto</summary>
+ public static pbr::FileDescriptor Descriptor {
+ get { return descriptor; }
+ }
+ private static pbr::FileDescriptor descriptor;
+
+ static AnalyzeOutputReflection() {
+ byte[] descriptorData = global::System.Convert.FromBase64String(
+ string.Concat(
+ "ChNBbmFseXplT3V0cHV0LnByb3RvEhRUYW5nby5QTVIuRW1icm9pZGVyeRoU",
+ "RW1icm9pZGVyeUZpbGUucHJvdG8iTQoNQW5hbHl6ZU91dHB1dBI8Cg5FbWJy",
+ "b2lkZXJ5RmlsZRgBIAEoCzIkLlRhbmdvLlBNUi5FbWJyb2lkZXJ5LkVtYnJv",
+ "aWRlcnlGaWxlQiAKHmNvbS50d2luZS50YW5nby5wbXIuZW1icm9pZGVyeWIG",
+ "cHJvdG8z"));
+ descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
+ new pbr::FileDescriptor[] { global::Tango.PMR.Embroidery.EmbroideryFileReflection.Descriptor, },
+ new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] {
+ new pbr::GeneratedClrTypeInfo(typeof(global::Tango.PMR.Embroidery.AnalyzeOutput), global::Tango.PMR.Embroidery.AnalyzeOutput.Parser, new[]{ "EmbroideryFile" }, null, null, null)
+ }));
+ }
+ #endregion
+
+ }
+ #region Messages
+ public sealed partial class AnalyzeOutput : pb::IMessage<AnalyzeOutput> {
+ private static readonly pb::MessageParser<AnalyzeOutput> _parser = new pb::MessageParser<AnalyzeOutput>(() => new AnalyzeOutput());
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pb::MessageParser<AnalyzeOutput> Parser { get { return _parser; } }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pbr::MessageDescriptor Descriptor {
+ get { return global::Tango.PMR.Embroidery.AnalyzeOutputReflection.Descriptor.MessageTypes[0]; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ pbr::MessageDescriptor pb::IMessage.Descriptor {
+ get { return Descriptor; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public AnalyzeOutput() {
+ OnConstruction();
+ }
+
+ partial void OnConstruction();
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public AnalyzeOutput(AnalyzeOutput other) : this() {
+ EmbroideryFile = other.embroideryFile_ != null ? other.EmbroideryFile.Clone() : null;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public AnalyzeOutput Clone() {
+ return new AnalyzeOutput(this);
+ }
+
+ /// <summary>Field number for the "EmbroideryFile" field.</summary>
+ public const int EmbroideryFileFieldNumber = 1;
+ private global::Tango.PMR.Embroidery.EmbroideryFile embroideryFile_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public global::Tango.PMR.Embroidery.EmbroideryFile EmbroideryFile {
+ get { return embroideryFile_; }
+ set {
+ embroideryFile_ = value;
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override bool Equals(object other) {
+ return Equals(other as AnalyzeOutput);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool Equals(AnalyzeOutput other) {
+ if (ReferenceEquals(other, null)) {
+ return false;
+ }
+ if (ReferenceEquals(other, this)) {
+ return true;
+ }
+ if (!object.Equals(EmbroideryFile, other.EmbroideryFile)) return false;
+ return true;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override int GetHashCode() {
+ int hash = 1;
+ if (embroideryFile_ != null) hash ^= EmbroideryFile.GetHashCode();
+ return hash;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override string ToString() {
+ return pb::JsonFormatter.ToDiagnosticString(this);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void WriteTo(pb::CodedOutputStream output) {
+ if (embroideryFile_ != null) {
+ output.WriteRawTag(10);
+ output.WriteMessage(EmbroideryFile);
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int CalculateSize() {
+ int size = 0;
+ if (embroideryFile_ != null) {
+ size += 1 + pb::CodedOutputStream.ComputeMessageSize(EmbroideryFile);
+ }
+ return size;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(AnalyzeOutput other) {
+ if (other == null) {
+ return;
+ }
+ if (other.embroideryFile_ != null) {
+ if (embroideryFile_ == null) {
+ embroideryFile_ = new global::Tango.PMR.Embroidery.EmbroideryFile();
+ }
+ EmbroideryFile.MergeFrom(other.EmbroideryFile);
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(pb::CodedInputStream input) {
+ uint tag;
+ while ((tag = input.ReadTag()) != 0) {
+ switch(tag) {
+ default:
+ input.SkipLastField();
+ break;
+ case 10: {
+ if (embroideryFile_ == null) {
+ embroideryFile_ = new global::Tango.PMR.Embroidery.EmbroideryFile();
+ }
+ input.ReadMessage(embroideryFile_);
+ break;
+ }
+ }
+ }
+ }
+
+ }
+
+ #endregion
+
+}
+
+#endregion Designer generated code
diff --git a/Software/Visual_Studio/Tango.PMR/Embroidery/EmbroideryFile.cs b/Software/Visual_Studio/Tango.PMR/Embroidery/EmbroideryFile.cs
new file mode 100644
index 000000000..21b6e8824
--- /dev/null
+++ b/Software/Visual_Studio/Tango.PMR/Embroidery/EmbroideryFile.cs
@@ -0,0 +1,323 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: EmbroideryFile.proto
+#pragma warning disable 1591, 0612, 3021
+#region Designer generated code
+
+using pb = global::Google.Protobuf;
+using pbc = global::Google.Protobuf.Collections;
+using pbr = global::Google.Protobuf.Reflection;
+using scg = global::System.Collections.Generic;
+namespace Tango.PMR.Embroidery {
+
+ /// <summary>Holder for reflection information generated from EmbroideryFile.proto</summary>
+ public static partial class EmbroideryFileReflection {
+
+ #region Descriptor
+ /// <summary>File descriptor for EmbroideryFile.proto</summary>
+ public static pbr::FileDescriptor Descriptor {
+ get { return descriptor; }
+ }
+ private static pbr::FileDescriptor descriptor;
+
+ static EmbroideryFileReflection() {
+ byte[] descriptorData = global::System.Convert.FromBase64String(
+ string.Concat(
+ "ChRFbWJyb2lkZXJ5RmlsZS5wcm90bxIUVGFuZ28uUE1SLkVtYnJvaWRlcnka",
+ "DUV4dGVudHMucHJvdG8aDFN0aXRjaC5wcm90bxoRU3RpdGNoQ29sb3IucHJv",
+ "dG8i8gEKDkVtYnJvaWRlcnlGaWxlEhIKCkRlc2lnbk5hbWUYASABKAkSEAoI",
+ "RmlsZU5hbWUYAiABKAkSEwoLU3RpdGNoQ291bnQYAyABKAUSEgoKQ29sb3JD",
+ "b3VudBgEIAEoBRIuCgdFeHRlbnRzGAUgASgLMh0uVGFuZ28uUE1SLkVtYnJv",
+ "aWRlcnkuRXh0ZW50cxIxCgZDb2xvcnMYBiADKAsyIS5UYW5nby5QTVIuRW1i",
+ "cm9pZGVyeS5TdGl0Y2hDb2xvchIuCghTdGl0Y2hlcxgHIAMoCzIcLlRhbmdv",
+ "LlBNUi5FbWJyb2lkZXJ5LlN0aXRjaEIgCh5jb20udHdpbmUudGFuZ28ucG1y",
+ "LmVtYnJvaWRlcnliBnByb3RvMw=="));
+ descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
+ new pbr::FileDescriptor[] { global::Tango.PMR.Embroidery.ExtentsReflection.Descriptor, global::Tango.PMR.Embroidery.StitchReflection.Descriptor, global::Tango.PMR.Embroidery.StitchColorReflection.Descriptor, },
+ new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] {
+ new pbr::GeneratedClrTypeInfo(typeof(global::Tango.PMR.Embroidery.EmbroideryFile), global::Tango.PMR.Embroidery.EmbroideryFile.Parser, new[]{ "DesignName", "FileName", "StitchCount", "ColorCount", "Extents", "Colors", "Stitches" }, null, null, null)
+ }));
+ }
+ #endregion
+
+ }
+ #region Messages
+ public sealed partial class EmbroideryFile : pb::IMessage<EmbroideryFile> {
+ private static readonly pb::MessageParser<EmbroideryFile> _parser = new pb::MessageParser<EmbroideryFile>(() => new EmbroideryFile());
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pb::MessageParser<EmbroideryFile> Parser { get { return _parser; } }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pbr::MessageDescriptor Descriptor {
+ get { return global::Tango.PMR.Embroidery.EmbroideryFileReflection.Descriptor.MessageTypes[0]; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ pbr::MessageDescriptor pb::IMessage.Descriptor {
+ get { return Descriptor; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public EmbroideryFile() {
+ OnConstruction();
+ }
+
+ partial void OnConstruction();
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public EmbroideryFile(EmbroideryFile other) : this() {
+ designName_ = other.designName_;
+ fileName_ = other.fileName_;
+ stitchCount_ = other.stitchCount_;
+ colorCount_ = other.colorCount_;
+ Extents = other.extents_ != null ? other.Extents.Clone() : null;
+ colors_ = other.colors_.Clone();
+ stitches_ = other.stitches_.Clone();
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public EmbroideryFile Clone() {
+ return new EmbroideryFile(this);
+ }
+
+ /// <summary>Field number for the "DesignName" field.</summary>
+ public const int DesignNameFieldNumber = 1;
+ private string designName_ = "";
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public string DesignName {
+ get { return designName_; }
+ set {
+ designName_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
+ }
+ }
+
+ /// <summary>Field number for the "FileName" field.</summary>
+ public const int FileNameFieldNumber = 2;
+ private string fileName_ = "";
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public string FileName {
+ get { return fileName_; }
+ set {
+ fileName_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
+ }
+ }
+
+ /// <summary>Field number for the "StitchCount" field.</summary>
+ public const int StitchCountFieldNumber = 3;
+ private int stitchCount_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int StitchCount {
+ get { return stitchCount_; }
+ set {
+ stitchCount_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "ColorCount" field.</summary>
+ public const int ColorCountFieldNumber = 4;
+ private int colorCount_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int ColorCount {
+ get { return colorCount_; }
+ set {
+ colorCount_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "Extents" field.</summary>
+ public const int ExtentsFieldNumber = 5;
+ private global::Tango.PMR.Embroidery.Extents extents_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public global::Tango.PMR.Embroidery.Extents Extents {
+ get { return extents_; }
+ set {
+ extents_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "Colors" field.</summary>
+ public const int ColorsFieldNumber = 6;
+ private static readonly pb::FieldCodec<global::Tango.PMR.Embroidery.StitchColor> _repeated_colors_codec
+ = pb::FieldCodec.ForMessage(50, global::Tango.PMR.Embroidery.StitchColor.Parser);
+ private readonly pbc::RepeatedField<global::Tango.PMR.Embroidery.StitchColor> colors_ = new pbc::RepeatedField<global::Tango.PMR.Embroidery.StitchColor>();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public pbc::RepeatedField<global::Tango.PMR.Embroidery.StitchColor> Colors {
+ get { return colors_; }
+ }
+
+ /// <summary>Field number for the "Stitches" field.</summary>
+ public const int StitchesFieldNumber = 7;
+ private static readonly pb::FieldCodec<global::Tango.PMR.Embroidery.Stitch> _repeated_stitches_codec
+ = pb::FieldCodec.ForMessage(58, global::Tango.PMR.Embroidery.Stitch.Parser);
+ private readonly pbc::RepeatedField<global::Tango.PMR.Embroidery.Stitch> stitches_ = new pbc::RepeatedField<global::Tango.PMR.Embroidery.Stitch>();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public pbc::RepeatedField<global::Tango.PMR.Embroidery.Stitch> Stitches {
+ get { return stitches_; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override bool Equals(object other) {
+ return Equals(other as EmbroideryFile);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool Equals(EmbroideryFile other) {
+ if (ReferenceEquals(other, null)) {
+ return false;
+ }
+ if (ReferenceEquals(other, this)) {
+ return true;
+ }
+ if (DesignName != other.DesignName) return false;
+ if (FileName != other.FileName) return false;
+ if (StitchCount != other.StitchCount) return false;
+ if (ColorCount != other.ColorCount) return false;
+ if (!object.Equals(Extents, other.Extents)) return false;
+ if(!colors_.Equals(other.colors_)) return false;
+ if(!stitches_.Equals(other.stitches_)) return false;
+ return true;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override int GetHashCode() {
+ int hash = 1;
+ if (DesignName.Length != 0) hash ^= DesignName.GetHashCode();
+ if (FileName.Length != 0) hash ^= FileName.GetHashCode();
+ if (StitchCount != 0) hash ^= StitchCount.GetHashCode();
+ if (ColorCount != 0) hash ^= ColorCount.GetHashCode();
+ if (extents_ != null) hash ^= Extents.GetHashCode();
+ hash ^= colors_.GetHashCode();
+ hash ^= stitches_.GetHashCode();
+ return hash;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override string ToString() {
+ return pb::JsonFormatter.ToDiagnosticString(this);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void WriteTo(pb::CodedOutputStream output) {
+ if (DesignName.Length != 0) {
+ output.WriteRawTag(10);
+ output.WriteString(DesignName);
+ }
+ if (FileName.Length != 0) {
+ output.WriteRawTag(18);
+ output.WriteString(FileName);
+ }
+ if (StitchCount != 0) {
+ output.WriteRawTag(24);
+ output.WriteInt32(StitchCount);
+ }
+ if (ColorCount != 0) {
+ output.WriteRawTag(32);
+ output.WriteInt32(ColorCount);
+ }
+ if (extents_ != null) {
+ output.WriteRawTag(42);
+ output.WriteMessage(Extents);
+ }
+ colors_.WriteTo(output, _repeated_colors_codec);
+ stitches_.WriteTo(output, _repeated_stitches_codec);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int CalculateSize() {
+ int size = 0;
+ if (DesignName.Length != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeStringSize(DesignName);
+ }
+ if (FileName.Length != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeStringSize(FileName);
+ }
+ if (StitchCount != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeInt32Size(StitchCount);
+ }
+ if (ColorCount != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeInt32Size(ColorCount);
+ }
+ if (extents_ != null) {
+ size += 1 + pb::CodedOutputStream.ComputeMessageSize(Extents);
+ }
+ size += colors_.CalculateSize(_repeated_colors_codec);
+ size += stitches_.CalculateSize(_repeated_stitches_codec);
+ return size;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(EmbroideryFile other) {
+ if (other == null) {
+ return;
+ }
+ if (other.DesignName.Length != 0) {
+ DesignName = other.DesignName;
+ }
+ if (other.FileName.Length != 0) {
+ FileName = other.FileName;
+ }
+ if (other.StitchCount != 0) {
+ StitchCount = other.StitchCount;
+ }
+ if (other.ColorCount != 0) {
+ ColorCount = other.ColorCount;
+ }
+ if (other.extents_ != null) {
+ if (extents_ == null) {
+ extents_ = new global::Tango.PMR.Embroidery.Extents();
+ }
+ Extents.MergeFrom(other.Extents);
+ }
+ colors_.Add(other.colors_);
+ stitches_.Add(other.stitches_);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(pb::CodedInputStream input) {
+ uint tag;
+ while ((tag = input.ReadTag()) != 0) {
+ switch(tag) {
+ default:
+ input.SkipLastField();
+ break;
+ case 10: {
+ DesignName = input.ReadString();
+ break;
+ }
+ case 18: {
+ FileName = input.ReadString();
+ break;
+ }
+ case 24: {
+ StitchCount = input.ReadInt32();
+ break;
+ }
+ case 32: {
+ ColorCount = input.ReadInt32();
+ break;
+ }
+ case 42: {
+ if (extents_ == null) {
+ extents_ = new global::Tango.PMR.Embroidery.Extents();
+ }
+ input.ReadMessage(extents_);
+ break;
+ }
+ case 50: {
+ colors_.AddEntriesFrom(input, _repeated_colors_codec);
+ break;
+ }
+ case 58: {
+ stitches_.AddEntriesFrom(input, _repeated_stitches_codec);
+ break;
+ }
+ }
+ }
+ }
+
+ }
+
+ #endregion
+
+}
+
+#endregion Designer generated code
diff --git a/Software/Visual_Studio/Tango.PMR/Embroidery/Extents.cs b/Software/Visual_Studio/Tango.PMR/Embroidery/Extents.cs
new file mode 100644
index 000000000..18f219e43
--- /dev/null
+++ b/Software/Visual_Studio/Tango.PMR/Embroidery/Extents.cs
@@ -0,0 +1,244 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: Extents.proto
+#pragma warning disable 1591, 0612, 3021
+#region Designer generated code
+
+using pb = global::Google.Protobuf;
+using pbc = global::Google.Protobuf.Collections;
+using pbr = global::Google.Protobuf.Reflection;
+using scg = global::System.Collections.Generic;
+namespace Tango.PMR.Embroidery {
+
+ /// <summary>Holder for reflection information generated from Extents.proto</summary>
+ public static partial class ExtentsReflection {
+
+ #region Descriptor
+ /// <summary>File descriptor for Extents.proto</summary>
+ public static pbr::FileDescriptor Descriptor {
+ get { return descriptor; }
+ }
+ private static pbr::FileDescriptor descriptor;
+
+ static ExtentsReflection() {
+ byte[] descriptorData = global::System.Convert.FromBase64String(
+ string.Concat(
+ "Cg1FeHRlbnRzLnByb3RvEhRUYW5nby5QTVIuRW1icm9pZGVyeSI5CgdFeHRl",
+ "bnRzEgoKAlgxGAEgASgFEgoKAlkxGAIgASgFEgoKAlgyGAMgASgFEgoKAlky",
+ "GAQgASgFQiAKHmNvbS50d2luZS50YW5nby5wbXIuZW1icm9pZGVyeWIGcHJv",
+ "dG8z"));
+ descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
+ new pbr::FileDescriptor[] { },
+ new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] {
+ new pbr::GeneratedClrTypeInfo(typeof(global::Tango.PMR.Embroidery.Extents), global::Tango.PMR.Embroidery.Extents.Parser, new[]{ "X1", "Y1", "X2", "Y2" }, null, null, null)
+ }));
+ }
+ #endregion
+
+ }
+ #region Messages
+ public sealed partial class Extents : pb::IMessage<Extents> {
+ private static readonly pb::MessageParser<Extents> _parser = new pb::MessageParser<Extents>(() => new Extents());
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pb::MessageParser<Extents> Parser { get { return _parser; } }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pbr::MessageDescriptor Descriptor {
+ get { return global::Tango.PMR.Embroidery.ExtentsReflection.Descriptor.MessageTypes[0]; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ pbr::MessageDescriptor pb::IMessage.Descriptor {
+ get { return Descriptor; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public Extents() {
+ OnConstruction();
+ }
+
+ partial void OnConstruction();
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public Extents(Extents other) : this() {
+ x1_ = other.x1_;
+ y1_ = other.y1_;
+ x2_ = other.x2_;
+ y2_ = other.y2_;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public Extents Clone() {
+ return new Extents(this);
+ }
+
+ /// <summary>Field number for the "X1" field.</summary>
+ public const int X1FieldNumber = 1;
+ private int x1_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int X1 {
+ get { return x1_; }
+ set {
+ x1_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "Y1" field.</summary>
+ public const int Y1FieldNumber = 2;
+ private int y1_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int Y1 {
+ get { return y1_; }
+ set {
+ y1_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "X2" field.</summary>
+ public const int X2FieldNumber = 3;
+ private int x2_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int X2 {
+ get { return x2_; }
+ set {
+ x2_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "Y2" field.</summary>
+ public const int Y2FieldNumber = 4;
+ private int y2_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int Y2 {
+ get { return y2_; }
+ set {
+ y2_ = value;
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override bool Equals(object other) {
+ return Equals(other as Extents);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool Equals(Extents other) {
+ if (ReferenceEquals(other, null)) {
+ return false;
+ }
+ if (ReferenceEquals(other, this)) {
+ return true;
+ }
+ if (X1 != other.X1) return false;
+ if (Y1 != other.Y1) return false;
+ if (X2 != other.X2) return false;
+ if (Y2 != other.Y2) return false;
+ return true;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override int GetHashCode() {
+ int hash = 1;
+ if (X1 != 0) hash ^= X1.GetHashCode();
+ if (Y1 != 0) hash ^= Y1.GetHashCode();
+ if (X2 != 0) hash ^= X2.GetHashCode();
+ if (Y2 != 0) hash ^= Y2.GetHashCode();
+ return hash;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override string ToString() {
+ return pb::JsonFormatter.ToDiagnosticString(this);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void WriteTo(pb::CodedOutputStream output) {
+ if (X1 != 0) {
+ output.WriteRawTag(8);
+ output.WriteInt32(X1);
+ }
+ if (Y1 != 0) {
+ output.WriteRawTag(16);
+ output.WriteInt32(Y1);
+ }
+ if (X2 != 0) {
+ output.WriteRawTag(24);
+ output.WriteInt32(X2);
+ }
+ if (Y2 != 0) {
+ output.WriteRawTag(32);
+ output.WriteInt32(Y2);
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int CalculateSize() {
+ int size = 0;
+ if (X1 != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeInt32Size(X1);
+ }
+ if (Y1 != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeInt32Size(Y1);
+ }
+ if (X2 != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeInt32Size(X2);
+ }
+ if (Y2 != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeInt32Size(Y2);
+ }
+ return size;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(Extents other) {
+ if (other == null) {
+ return;
+ }
+ if (other.X1 != 0) {
+ X1 = other.X1;
+ }
+ if (other.Y1 != 0) {
+ Y1 = other.Y1;
+ }
+ if (other.X2 != 0) {
+ X2 = other.X2;
+ }
+ if (other.Y2 != 0) {
+ Y2 = other.Y2;
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(pb::CodedInputStream input) {
+ uint tag;
+ while ((tag = input.ReadTag()) != 0) {
+ switch(tag) {
+ default:
+ input.SkipLastField();
+ break;
+ case 8: {
+ X1 = input.ReadInt32();
+ break;
+ }
+ case 16: {
+ Y1 = input.ReadInt32();
+ break;
+ }
+ case 24: {
+ X2 = input.ReadInt32();
+ break;
+ }
+ case 32: {
+ Y2 = input.ReadInt32();
+ break;
+ }
+ }
+ }
+ }
+
+ }
+
+ #endregion
+
+}
+
+#endregion Designer generated code
diff --git a/Software/Visual_Studio/Tango.PMR/Embroidery/Stitch.cs b/Software/Visual_Studio/Tango.PMR/Embroidery/Stitch.cs
new file mode 100644
index 000000000..3c69da5cd
--- /dev/null
+++ b/Software/Visual_Studio/Tango.PMR/Embroidery/Stitch.cs
@@ -0,0 +1,386 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: Stitch.proto
+#pragma warning disable 1591, 0612, 3021
+#region Designer generated code
+
+using pb = global::Google.Protobuf;
+using pbc = global::Google.Protobuf.Collections;
+using pbr = global::Google.Protobuf.Reflection;
+using scg = global::System.Collections.Generic;
+namespace Tango.PMR.Embroidery {
+
+ /// <summary>Holder for reflection information generated from Stitch.proto</summary>
+ public static partial class StitchReflection {
+
+ #region Descriptor
+ /// <summary>File descriptor for Stitch.proto</summary>
+ public static pbr::FileDescriptor Descriptor {
+ get { return descriptor; }
+ }
+ private static pbr::FileDescriptor descriptor;
+
+ static StitchReflection() {
+ byte[] descriptorData = global::System.Convert.FromBase64String(
+ string.Concat(
+ "CgxTdGl0Y2gucHJvdG8SFFRhbmdvLlBNUi5FbWJyb2lkZXJ5GhBTdGl0Y2hG",
+ "bGFnLnByb3RvIqsBCgZTdGl0Y2gSLgoERmxhZxgBIAEoDjIgLlRhbmdvLlBN",
+ "Ui5FbWJyb2lkZXJ5LlN0aXRjaEZsYWcSCgoCWFgYAiABKAESCgoCWVkYAyAB",
+ "KAESCgoCRFgYBCABKAESCgoCRFkYBSABKAESDgoGTGVuZ3RoGAYgASgBEg0K",
+ "BUFuZ2xlGAcgASgBEg4KBkRBbmdsZRgIIAEoARISCgpDb2xvckluZGV4GAkg",
+ "ASgFQiAKHmNvbS50d2luZS50YW5nby5wbXIuZW1icm9pZGVyeWIGcHJvdG8z"));
+ descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
+ new pbr::FileDescriptor[] { global::Tango.PMR.Embroidery.StitchFlagReflection.Descriptor, },
+ new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] {
+ new pbr::GeneratedClrTypeInfo(typeof(global::Tango.PMR.Embroidery.Stitch), global::Tango.PMR.Embroidery.Stitch.Parser, new[]{ "Flag", "XX", "YY", "DX", "DY", "Length", "Angle", "DAngle", "ColorIndex" }, null, null, null)
+ }));
+ }
+ #endregion
+
+ }
+ #region Messages
+ public sealed partial class Stitch : pb::IMessage<Stitch> {
+ private static readonly pb::MessageParser<Stitch> _parser = new pb::MessageParser<Stitch>(() => new Stitch());
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pb::MessageParser<Stitch> Parser { get { return _parser; } }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pbr::MessageDescriptor Descriptor {
+ get { return global::Tango.PMR.Embroidery.StitchReflection.Descriptor.MessageTypes[0]; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ pbr::MessageDescriptor pb::IMessage.Descriptor {
+ get { return Descriptor; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public Stitch() {
+ OnConstruction();
+ }
+
+ partial void OnConstruction();
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public Stitch(Stitch other) : this() {
+ flag_ = other.flag_;
+ xX_ = other.xX_;
+ yY_ = other.yY_;
+ dX_ = other.dX_;
+ dY_ = other.dY_;
+ length_ = other.length_;
+ angle_ = other.angle_;
+ dAngle_ = other.dAngle_;
+ colorIndex_ = other.colorIndex_;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public Stitch Clone() {
+ return new Stitch(this);
+ }
+
+ /// <summary>Field number for the "Flag" field.</summary>
+ public const int FlagFieldNumber = 1;
+ private global::Tango.PMR.Embroidery.StitchFlag flag_ = 0;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public global::Tango.PMR.Embroidery.StitchFlag Flag {
+ get { return flag_; }
+ set {
+ flag_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "XX" field.</summary>
+ public const int XXFieldNumber = 2;
+ private double xX_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public double XX {
+ get { return xX_; }
+ set {
+ xX_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "YY" field.</summary>
+ public const int YYFieldNumber = 3;
+ private double yY_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public double YY {
+ get { return yY_; }
+ set {
+ yY_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "DX" field.</summary>
+ public const int DXFieldNumber = 4;
+ private double dX_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public double DX {
+ get { return dX_; }
+ set {
+ dX_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "DY" field.</summary>
+ public const int DYFieldNumber = 5;
+ private double dY_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public double DY {
+ get { return dY_; }
+ set {
+ dY_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "Length" field.</summary>
+ public const int LengthFieldNumber = 6;
+ private double length_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public double Length {
+ get { return length_; }
+ set {
+ length_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "Angle" field.</summary>
+ public const int AngleFieldNumber = 7;
+ private double angle_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public double Angle {
+ get { return angle_; }
+ set {
+ angle_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "DAngle" field.</summary>
+ public const int DAngleFieldNumber = 8;
+ private double dAngle_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public double DAngle {
+ get { return dAngle_; }
+ set {
+ dAngle_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "ColorIndex" field.</summary>
+ public const int ColorIndexFieldNumber = 9;
+ private int colorIndex_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int ColorIndex {
+ get { return colorIndex_; }
+ set {
+ colorIndex_ = value;
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override bool Equals(object other) {
+ return Equals(other as Stitch);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool Equals(Stitch other) {
+ if (ReferenceEquals(other, null)) {
+ return false;
+ }
+ if (ReferenceEquals(other, this)) {
+ return true;
+ }
+ if (Flag != other.Flag) return false;
+ if (XX != other.XX) return false;
+ if (YY != other.YY) return false;
+ if (DX != other.DX) return false;
+ if (DY != other.DY) return false;
+ if (Length != other.Length) return false;
+ if (Angle != other.Angle) return false;
+ if (DAngle != other.DAngle) return false;
+ if (ColorIndex != other.ColorIndex) return false;
+ return true;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override int GetHashCode() {
+ int hash = 1;
+ if (Flag != 0) hash ^= Flag.GetHashCode();
+ if (XX != 0D) hash ^= XX.GetHashCode();
+ if (YY != 0D) hash ^= YY.GetHashCode();
+ if (DX != 0D) hash ^= DX.GetHashCode();
+ if (DY != 0D) hash ^= DY.GetHashCode();
+ if (Length != 0D) hash ^= Length.GetHashCode();
+ if (Angle != 0D) hash ^= Angle.GetHashCode();
+ if (DAngle != 0D) hash ^= DAngle.GetHashCode();
+ if (ColorIndex != 0) hash ^= ColorIndex.GetHashCode();
+ return hash;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override string ToString() {
+ return pb::JsonFormatter.ToDiagnosticString(this);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void WriteTo(pb::CodedOutputStream output) {
+ if (Flag != 0) {
+ output.WriteRawTag(8);
+ output.WriteEnum((int) Flag);
+ }
+ if (XX != 0D) {
+ output.WriteRawTag(17);
+ output.WriteDouble(XX);
+ }
+ if (YY != 0D) {
+ output.WriteRawTag(25);
+ output.WriteDouble(YY);
+ }
+ if (DX != 0D) {
+ output.WriteRawTag(33);
+ output.WriteDouble(DX);
+ }
+ if (DY != 0D) {
+ output.WriteRawTag(41);
+ output.WriteDouble(DY);
+ }
+ if (Length != 0D) {
+ output.WriteRawTag(49);
+ output.WriteDouble(Length);
+ }
+ if (Angle != 0D) {
+ output.WriteRawTag(57);
+ output.WriteDouble(Angle);
+ }
+ if (DAngle != 0D) {
+ output.WriteRawTag(65);
+ output.WriteDouble(DAngle);
+ }
+ if (ColorIndex != 0) {
+ output.WriteRawTag(72);
+ output.WriteInt32(ColorIndex);
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int CalculateSize() {
+ int size = 0;
+ if (Flag != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Flag);
+ }
+ if (XX != 0D) {
+ size += 1 + 8;
+ }
+ if (YY != 0D) {
+ size += 1 + 8;
+ }
+ if (DX != 0D) {
+ size += 1 + 8;
+ }
+ if (DY != 0D) {
+ size += 1 + 8;
+ }
+ if (Length != 0D) {
+ size += 1 + 8;
+ }
+ if (Angle != 0D) {
+ size += 1 + 8;
+ }
+ if (DAngle != 0D) {
+ size += 1 + 8;
+ }
+ if (ColorIndex != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeInt32Size(ColorIndex);
+ }
+ return size;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(Stitch other) {
+ if (other == null) {
+ return;
+ }
+ if (other.Flag != 0) {
+ Flag = other.Flag;
+ }
+ if (other.XX != 0D) {
+ XX = other.XX;
+ }
+ if (other.YY != 0D) {
+ YY = other.YY;
+ }
+ if (other.DX != 0D) {
+ DX = other.DX;
+ }
+ if (other.DY != 0D) {
+ DY = other.DY;
+ }
+ if (other.Length != 0D) {
+ Length = other.Length;
+ }
+ if (other.Angle != 0D) {
+ Angle = other.Angle;
+ }
+ if (other.DAngle != 0D) {
+ DAngle = other.DAngle;
+ }
+ if (other.ColorIndex != 0) {
+ ColorIndex = other.ColorIndex;
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(pb::CodedInputStream input) {
+ uint tag;
+ while ((tag = input.ReadTag()) != 0) {
+ switch(tag) {
+ default:
+ input.SkipLastField();
+ break;
+ case 8: {
+ flag_ = (global::Tango.PMR.Embroidery.StitchFlag) input.ReadEnum();
+ break;
+ }
+ case 17: {
+ XX = input.ReadDouble();
+ break;
+ }
+ case 25: {
+ YY = input.ReadDouble();
+ break;
+ }
+ case 33: {
+ DX = input.ReadDouble();
+ break;
+ }
+ case 41: {
+ DY = input.ReadDouble();
+ break;
+ }
+ case 49: {
+ Length = input.ReadDouble();
+ break;
+ }
+ case 57: {
+ Angle = input.ReadDouble();
+ break;
+ }
+ case 65: {
+ DAngle = input.ReadDouble();
+ break;
+ }
+ case 72: {
+ ColorIndex = input.ReadInt32();
+ break;
+ }
+ }
+ }
+ }
+
+ }
+
+ #endregion
+
+}
+
+#endregion Designer generated code
diff --git a/Software/Visual_Studio/Tango.PMR/Embroidery/StitchColor.cs b/Software/Visual_Studio/Tango.PMR/Embroidery/StitchColor.cs
new file mode 100644
index 000000000..7bcfe8256
--- /dev/null
+++ b/Software/Visual_Studio/Tango.PMR/Embroidery/StitchColor.cs
@@ -0,0 +1,216 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: StitchColor.proto
+#pragma warning disable 1591, 0612, 3021
+#region Designer generated code
+
+using pb = global::Google.Protobuf;
+using pbc = global::Google.Protobuf.Collections;
+using pbr = global::Google.Protobuf.Reflection;
+using scg = global::System.Collections.Generic;
+namespace Tango.PMR.Embroidery {
+
+ /// <summary>Holder for reflection information generated from StitchColor.proto</summary>
+ public static partial class StitchColorReflection {
+
+ #region Descriptor
+ /// <summary>File descriptor for StitchColor.proto</summary>
+ public static pbr::FileDescriptor Descriptor {
+ get { return descriptor; }
+ }
+ private static pbr::FileDescriptor descriptor;
+
+ static StitchColorReflection() {
+ byte[] descriptorData = global::System.Convert.FromBase64String(
+ string.Concat(
+ "ChFTdGl0Y2hDb2xvci5wcm90bxIUVGFuZ28uUE1SLkVtYnJvaWRlcnkiNwoL",
+ "U3RpdGNoQ29sb3ISCwoDUmVkGAEgASgFEg0KBUdyZWVuGAIgASgFEgwKBEJs",
+ "dWUYAyABKAVCIAoeY29tLnR3aW5lLnRhbmdvLnBtci5lbWJyb2lkZXJ5YgZw",
+ "cm90bzM="));
+ descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
+ new pbr::FileDescriptor[] { },
+ new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] {
+ new pbr::GeneratedClrTypeInfo(typeof(global::Tango.PMR.Embroidery.StitchColor), global::Tango.PMR.Embroidery.StitchColor.Parser, new[]{ "Red", "Green", "Blue" }, null, null, null)
+ }));
+ }
+ #endregion
+
+ }
+ #region Messages
+ public sealed partial class StitchColor : pb::IMessage<StitchColor> {
+ private static readonly pb::MessageParser<StitchColor> _parser = new pb::MessageParser<StitchColor>(() => new StitchColor());
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pb::MessageParser<StitchColor> Parser { get { return _parser; } }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pbr::MessageDescriptor Descriptor {
+ get { return global::Tango.PMR.Embroidery.StitchColorReflection.Descriptor.MessageTypes[0]; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ pbr::MessageDescriptor pb::IMessage.Descriptor {
+ get { return Descriptor; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public StitchColor() {
+ OnConstruction();
+ }
+
+ partial void OnConstruction();
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public StitchColor(StitchColor other) : this() {
+ red_ = other.red_;
+ green_ = other.green_;
+ blue_ = other.blue_;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public StitchColor Clone() {
+ return new StitchColor(this);
+ }
+
+ /// <summary>Field number for the "Red" field.</summary>
+ public const int RedFieldNumber = 1;
+ private int red_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int Red {
+ get { return red_; }
+ set {
+ red_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "Green" field.</summary>
+ public const int GreenFieldNumber = 2;
+ private int green_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int Green {
+ get { return green_; }
+ set {
+ green_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "Blue" field.</summary>
+ public const int BlueFieldNumber = 3;
+ private int blue_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int Blue {
+ get { return blue_; }
+ set {
+ blue_ = value;
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override bool Equals(object other) {
+ return Equals(other as StitchColor);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool Equals(StitchColor other) {
+ if (ReferenceEquals(other, null)) {
+ return false;
+ }
+ if (ReferenceEquals(other, this)) {
+ return true;
+ }
+ if (Red != other.Red) return false;
+ if (Green != other.Green) return false;
+ if (Blue != other.Blue) return false;
+ return true;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override int GetHashCode() {
+ int hash = 1;
+ if (Red != 0) hash ^= Red.GetHashCode();
+ if (Green != 0) hash ^= Green.GetHashCode();
+ if (Blue != 0) hash ^= Blue.GetHashCode();
+ return hash;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override string ToString() {
+ return pb::JsonFormatter.ToDiagnosticString(this);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void WriteTo(pb::CodedOutputStream output) {
+ if (Red != 0) {
+ output.WriteRawTag(8);
+ output.WriteInt32(Red);
+ }
+ if (Green != 0) {
+ output.WriteRawTag(16);
+ output.WriteInt32(Green);
+ }
+ if (Blue != 0) {
+ output.WriteRawTag(24);
+ output.WriteInt32(Blue);
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int CalculateSize() {
+ int size = 0;
+ if (Red != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeInt32Size(Red);
+ }
+ if (Green != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeInt32Size(Green);
+ }
+ if (Blue != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeInt32Size(Blue);
+ }
+ return size;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(StitchColor other) {
+ if (other == null) {
+ return;
+ }
+ if (other.Red != 0) {
+ Red = other.Red;
+ }
+ if (other.Green != 0) {
+ Green = other.Green;
+ }
+ if (other.Blue != 0) {
+ Blue = other.Blue;
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(pb::CodedInputStream input) {
+ uint tag;
+ while ((tag = input.ReadTag()) != 0) {
+ switch(tag) {
+ default:
+ input.SkipLastField();
+ break;
+ case 8: {
+ Red = input.ReadInt32();
+ break;
+ }
+ case 16: {
+ Green = input.ReadInt32();
+ break;
+ }
+ case 24: {
+ Blue = input.ReadInt32();
+ break;
+ }
+ }
+ }
+ }
+
+ }
+
+ #endregion
+
+}
+
+#endregion Designer generated code
diff --git a/Software/Visual_Studio/Tango.PMR/Embroidery/StitchFlag.cs b/Software/Visual_Studio/Tango.PMR/Embroidery/StitchFlag.cs
new file mode 100644
index 000000000..b044b6fc9
--- /dev/null
+++ b/Software/Visual_Studio/Tango.PMR/Embroidery/StitchFlag.cs
@@ -0,0 +1,50 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: StitchFlag.proto
+#pragma warning disable 1591, 0612, 3021
+#region Designer generated code
+
+using pb = global::Google.Protobuf;
+using pbc = global::Google.Protobuf.Collections;
+using pbr = global::Google.Protobuf.Reflection;
+using scg = global::System.Collections.Generic;
+namespace Tango.PMR.Embroidery {
+
+ /// <summary>Holder for reflection information generated from StitchFlag.proto</summary>
+ public static partial class StitchFlagReflection {
+
+ #region Descriptor
+ /// <summary>File descriptor for StitchFlag.proto</summary>
+ public static pbr::FileDescriptor Descriptor {
+ get { return descriptor; }
+ }
+ private static pbr::FileDescriptor descriptor;
+
+ static StitchFlagReflection() {
+ byte[] descriptorData = global::System.Convert.FromBase64String(
+ string.Concat(
+ "ChBTdGl0Y2hGbGFnLnByb3RvEhRUYW5nby5QTVIuRW1icm9pZGVyeSpLCgpT",
+ "dGl0Y2hGbGFnEgoKBk5PUk1BTBAAEggKBEpVTVAQARIICgRUUklNEAISCAoE",
+ "U1RPUBAEEgoKBlNFUVVJThAIEgcKA0VORBAQQiAKHmNvbS50d2luZS50YW5n",
+ "by5wbXIuZW1icm9pZGVyeWIGcHJvdG8z"));
+ descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
+ new pbr::FileDescriptor[] { },
+ new pbr::GeneratedClrTypeInfo(new[] {typeof(global::Tango.PMR.Embroidery.StitchFlag), }, null));
+ }
+ #endregion
+
+ }
+ #region Enums
+ public enum StitchFlag {
+ [pbr::OriginalName("NORMAL")] Normal = 0,
+ [pbr::OriginalName("JUMP")] Jump = 1,
+ [pbr::OriginalName("TRIM")] Trim = 2,
+ [pbr::OriginalName("STOP")] Stop = 4,
+ [pbr::OriginalName("SEQUIN")] Sequin = 8,
+ [pbr::OriginalName("END")] End = 16,
+ }
+
+ #endregion
+
+}
+
+#endregion Designer generated code