diff options
| author | Victoria Plitt <Victoria.Plitt@twine-s.com> | 2023-10-22 17:34:14 +0300 |
|---|---|---|
| committer | Victoria Plitt <Victoria.Plitt@twine-s.com> | 2023-10-22 17:34:50 +0300 |
| commit | 7f2ff77f2fe695c13e9c36a9706ed6e63d0ece24 (patch) | |
| tree | c9d7a2082ae98f6bf42bf20fdbaaed3883d052a7 /Software/Visual_Studio | |
| parent | 4cebc14d3183ee4dc4ade0f85d9bf72cec44533c (diff) | |
| download | Tango-7f2ff77f2fe695c13e9c36a9706ed6e63d0ece24.tar.gz Tango-7f2ff77f2fe695c13e9c36a9706ed6e63d0ece24.zip | |
Added Number of spools to PMR.
Diffstat (limited to 'Software/Visual_Studio')
5 files changed, 45 insertions, 8 deletions
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Models/JobModel.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Models/JobModel.cs index 983719e57..35569d74f 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Models/JobModel.cs +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Models/JobModel.cs @@ -362,7 +362,6 @@ namespace Tango.PPC.Jobs.Models _numberSpools = value; RaisePropertyChangedAuto(); OnNumberOfSpoolsChanged(); - RaisePropertyChanged(nameof(Copies)); OnUpdateLengthhWeight(); } } @@ -897,7 +896,13 @@ namespace Tango.PPC.Jobs.Models private void OnEnableInterSegmentChanged() { + if(EnableInterSegment == false && InterSegmentLength > 0) + { + _intersegmentlength = 0; + RaisePropertyChanged(nameof(InterSegmentLength)); + } _groupingSegments.ToList().ForEach(x => x.EnableInterSegment = EnableInterSegment); + OnLengthChanged(); UpdateEffectiveSegments(); } @@ -1141,10 +1146,11 @@ namespace Tango.PPC.Jobs.Models private void OnNumberOfSpoolsChanged() { - if(NumberSpools > 0) + if(NumberSpools >= 4) { int coeff = (int)(Copies + NumberSpools -1) / NumberSpools; - Copies = coeff * NumberSpools; + _copies = coeff * NumberSpools; + RaisePropertyChanged(nameof(Copies)); } } diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/ViewModels/JobViewVM.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/ViewModels/JobViewVM.cs index 8a01e07cc..2ffa84992 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/ViewModels/JobViewVM.cs +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/ViewModels/JobViewVM.cs @@ -258,6 +258,7 @@ namespace Tango.PPC.Jobs.ViewModels SetOrDiscardAll(); return; } + JobModel.EnableInterSegment = false; } _isBasicMode = value; RaisePropertyChangedAuto(); diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/MachineStatusView.xaml b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/MachineStatusView.xaml index f9338b813..f3d3e021a 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/MachineStatusView.xaml +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/MachineStatusView.xaml @@ -1177,7 +1177,7 @@ </ItemsControl.ItemsPanel> </ItemsControl> </Border> - <TextBlock HorizontalAlignment="Center" Margin="0 4 0 0" FontWeight="Thin">Winder</TextBlock> + <TextBlock HorizontalAlignment="Center" Margin="0 4 0 0" FontWeight="Thin">Winder BTSR</TextBlock> </StackPanel> <StackPanel Orientation="Vertical"> <Border Height="171" Width="95" VerticalAlignment="Center" CornerRadius="0" BorderThickness="0" BorderBrush="{StaticResource TangoBlackInkBrush}"> diff --git a/Software/Visual_Studio/Tango.BL/Entities/Job.cs b/Software/Visual_Studio/Tango.BL/Entities/Job.cs index 328d74f0c..3139a5a5b 100644 --- a/Software/Visual_Studio/Tango.BL/Entities/Job.cs +++ b/Software/Visual_Studio/Tango.BL/Entities/Job.cs @@ -937,6 +937,7 @@ namespace Tango.BL.Entities jobFile.Type = job.Type; jobFile.WindingMethodGuid = job.WindingMethodGuid; jobFile.ColorCatalogGuid = job.ColorCatalogGuid.ToStringOrEmpty(); + jobFile.NumberOfSpools = job.NumberOfSpools; jobFile.Version = job.Version; foreach (var segm in job.OrderedSegmentsWithGroups) @@ -1055,6 +1056,7 @@ namespace Tango.BL.Entities job.LengthPercentageFactor = jobFile.LengthPercentageFactor; job.Name = jobFile.Name.ToNullIfEmpty(); job.NumberOfUnits = jobFile.NumberOfUnits; + job.NumberOfSpools = jobFile.NumberOfSpools; job.Version = jobFile.Version; var job_rml = db.Rmls.SingleOrDefault(x => x.Guid == jobFile.RmlGuid); diff --git a/Software/Visual_Studio/Tango.PMR/Exports/JobFile.cs b/Software/Visual_Studio/Tango.PMR/Exports/JobFile.cs index dda4e2441..3087bd921 100644 --- a/Software/Visual_Studio/Tango.PMR/Exports/JobFile.cs +++ b/Software/Visual_Studio/Tango.PMR/Exports/JobFile.cs @@ -23,7 +23,7 @@ namespace Tango.PMR.Exports { byte[] descriptorData = global::System.Convert.FromBase64String( string.Concat( "Cg1Kb2JGaWxlLnByb3RvEhFUYW5nby5QTVIuRXhwb3J0cxoUSm9iRmlsZVNl", - "Z21lbnQucHJvdG8izAQKB0pvYkZpbGUSDAoETmFtZRgBIAEoCRITCgtEZXNj", + "Z21lbnQucHJvdG8i5AQKB0pvYkZpbGUSDAoETmFtZRgBIAEoCRITCgtEZXNj", "cmlwdGlvbhgCIAEoCRIaChJFbmFibGVJbnRlclNlZ21lbnQYAyABKAgSGgoS", "SW50ZXJTZWdtZW50TGVuZ3RoGAQgASgBEg8KB1JtbEd1aWQYBSABKAkSGQoR", "V2luZGluZ01ldGhvZEd1aWQYBiABKAkSFQoNU3Bvb2xUeXBlR3VpZBgHIAEo", @@ -36,12 +36,12 @@ namespace Tango.PMR.Exports { "YW1wbGVVbml0c09yTWV0ZXJzGBMgASgFEh4KFkxlbmd0aFBlcmNlbnRhZ2VG", "YWN0b3IYFCABKAESMwoIU2VnbWVudHMYFSADKAsyIS5UYW5nby5QTVIuRXhw", "b3J0cy5Kb2JGaWxlU2VnbWVudBIYChBDb2xvckNhdGFsb2dHdWlkGBYgASgJ", - "Eg8KB1ZlcnNpb24YFyABKAVCHQobY29tLnR3aW5lLnRhbmdvLnBtci5leHBv", - "cnRzYgZwcm90bzM=")); + "Eg8KB1ZlcnNpb24YFyABKAUSFgoOTnVtYmVyT2ZTcG9vbHMYGCABKAVCHQob", + "Y29tLnR3aW5lLnRhbmdvLnBtci5leHBvcnRzYgZwcm90bzM=")); descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, new pbr::FileDescriptor[] { global::Tango.PMR.Exports.JobFileSegmentReflection.Descriptor, }, new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] { - new pbr::GeneratedClrTypeInfo(typeof(global::Tango.PMR.Exports.JobFile), global::Tango.PMR.Exports.JobFile.Parser, new[]{ "Name", "Description", "EnableInterSegment", "InterSegmentLength", "RmlGuid", "WindingMethodGuid", "SpoolTypeGuid", "EnableLubrication", "HasEmbroideryFile", "EmbroideryFileData", "EmbroideryFileName", "EmbroideryJpeg", "ColorSpaceGuid", "NumberOfUnits", "Type", "Customer", "SpoolsDistribution", "NumberOfHeads", "SampleUnitsOrMeters", "LengthPercentageFactor", "Segments", "ColorCatalogGuid", "Version" }, null, null, null) + new pbr::GeneratedClrTypeInfo(typeof(global::Tango.PMR.Exports.JobFile), global::Tango.PMR.Exports.JobFile.Parser, new[]{ "Name", "Description", "EnableInterSegment", "InterSegmentLength", "RmlGuid", "WindingMethodGuid", "SpoolTypeGuid", "EnableLubrication", "HasEmbroideryFile", "EmbroideryFileData", "EmbroideryFileName", "EmbroideryJpeg", "ColorSpaceGuid", "NumberOfUnits", "Type", "Customer", "SpoolsDistribution", "NumberOfHeads", "SampleUnitsOrMeters", "LengthPercentageFactor", "Segments", "ColorCatalogGuid", "Version", "NumberOfSpools" }, null, null, null) })); } #endregion @@ -95,6 +95,7 @@ namespace Tango.PMR.Exports { segments_ = other.segments_.Clone(); colorCatalogGuid_ = other.colorCatalogGuid_; version_ = other.version_; + numberOfSpools_ = other.numberOfSpools_; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -354,6 +355,17 @@ namespace Tango.PMR.Exports { } } + /// <summary>Field number for the "NumberOfSpools" field.</summary> + public const int NumberOfSpoolsFieldNumber = 24; + private int numberOfSpools_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int NumberOfSpools { + get { return numberOfSpools_; } + set { + numberOfSpools_ = value; + } + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public override bool Equals(object other) { return Equals(other as JobFile); @@ -390,6 +402,7 @@ namespace Tango.PMR.Exports { if(!segments_.Equals(other.segments_)) return false; if (ColorCatalogGuid != other.ColorCatalogGuid) return false; if (Version != other.Version) return false; + if (NumberOfSpools != other.NumberOfSpools) return false; return true; } @@ -419,6 +432,7 @@ namespace Tango.PMR.Exports { hash ^= segments_.GetHashCode(); if (ColorCatalogGuid.Length != 0) hash ^= ColorCatalogGuid.GetHashCode(); if (Version != 0) hash ^= Version.GetHashCode(); + if (NumberOfSpools != 0) hash ^= NumberOfSpools.GetHashCode(); return hash; } @@ -518,6 +532,10 @@ namespace Tango.PMR.Exports { output.WriteRawTag(184, 1); output.WriteInt32(Version); } + if (NumberOfSpools != 0) { + output.WriteRawTag(192, 1); + output.WriteInt32(NumberOfSpools); + } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -590,6 +608,9 @@ namespace Tango.PMR.Exports { if (Version != 0) { size += 2 + pb::CodedOutputStream.ComputeInt32Size(Version); } + if (NumberOfSpools != 0) { + size += 2 + pb::CodedOutputStream.ComputeInt32Size(NumberOfSpools); + } return size; } @@ -665,6 +686,9 @@ namespace Tango.PMR.Exports { if (other.Version != 0) { Version = other.Version; } + if (other.NumberOfSpools != 0) { + NumberOfSpools = other.NumberOfSpools; + } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -767,6 +791,10 @@ namespace Tango.PMR.Exports { Version = input.ReadInt32(); break; } + case 192: { + NumberOfSpools = input.ReadInt32(); + break; + } } } } |
