aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/ProcessParametersItem.cs
blob: 4aedf8bc7ff529abb686889d23ade2dacbb0a818 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Media;
using System.Xml.Serialization;
using Tango.BL;
using Tango.BL.Entities;
using Tango.Core.Commands;
using Tango.SharedUI.Helpers;

namespace Tango.MachineStudio.Technician.TechItems
{
    /// <summary>
    /// Represents a process parameters table item.
    /// </summary>
    /// <seealso cref="Tango.MachineStudio.Technician.TechItems.TechItem" />
    [TechItem(20)]
    public class ProcessParametersItem : TechItem
    {
        public static ObservableCollection<ProcessParametersTable> ProcessParametersTables { get; set; }

        static ProcessParametersItem()
        {
            ProcessParametersTables = new ObservableCollection<ProcessParametersTable>();
        }

        public class ParameterIndex
        {
            public String Name { get; set; }
            public int Index { get; set; }
        }

        private static int _counter = 0;

        public event EventHandler<ProcessParametersTable> PushParametersPressed;

        private ProcessParametersTable _processParameters;
        /// <summary>
        /// Gets or sets the process parameters.
        /// </summary>
        public ProcessParametersTable ProcessParameters
        {
            get { return _processParameters; }
            set { _processParameters = value; RaisePropertyChangedAuto(); }
        }

        /// <summary>
        /// Gets or sets the parameters indices.
        /// </summary>
        public List<ParameterIndex> ParametersIndices { get; set; }

        /// <summary>
        /// Gets or sets the push parameters command.
        /// </summary>
        [XmlIgnore]
        public RelayCommand PushParametersCommand { get; set; }

        private Rml _selectedResetRml;
        /// <summary>
        /// Gets or sets the selected reset RML.
        /// </summary>
        [XmlIgnore]
        public Rml SelectedResetRML
        {
            get { return _selectedResetRml; }
            set { _selectedResetRml = value; RaisePropertyChangedAuto(); ResetToRMLCommand.RaiseCanExecuteChanged(); }
        }


        /// <summary>
        /// Gets or sets the push parameters command.
        /// </summary>
        [XmlIgnore]
        public RelayCommand ResetToRMLCommand { get; set; }

        /// <summary>
        /// Initializes a new instance of the <see cref="ProcessParametersItem"/> class.
        /// </summary>
        public ProcessParametersItem() : base()
        {
            ParametersIndices = new List<ParameterIndex>();
            Name = "Process Parameters";
            Description = "Process parameters table";
            Image = ResourceHelper.GetImageFromResources("Images/process-params.png");
            ProcessParameters = new ProcessParametersTable();
            ProcessParameters.Name = "Process parameters " + _counter++;
            Color = Colors.DodgerBlue;
            PushParametersCommand = new RelayCommand(() => PushParametersPressed?.Invoke(this, ProcessParameters));

            ResetToRMLCommand = new RelayCommand(ResetToRml, () => SelectedResetRML != null);

            if (_counter > 1)
            {
                String name = ProcessParameters.Name;
                ProcessParametersTables.Add(ProcessParameters);
                ProcessParameters.Name = name;
            }
        }

        private void ResetToRml()
        {
            if (SelectedResetRML != null)
            {
                using (ObservablesContext db = ObservablesContext.CreateDefault())
                {
                    var group = db.Adapter.GetRmlActiveProcessParametersTablesGroup(SelectedResetRML.Guid);

                    if (group != null)
                    {
                        var table = group.ProcessParametersTables.OrderBy(x => x.TableIndex).FirstOrDefault();

                        if (table != null)
                        {
                            table.MapPrimitivesTo(ProcessParameters);
                        }
                    }
                }
            }
        }

        /// <summary>
        /// Initializes a new instance of the <see cref="ProcessParametersItem"/> class.
        /// </summary>
        /// <param name="processParameters">The process parameters.</param>
        public ProcessParametersItem(ProcessParametersTable processParameters) : this()
        {

        }

        public override TechItem Clone()
        {
            ProcessParametersItem cloned = base.Clone() as ProcessParametersItem;
            cloned.ProcessParameters = ProcessParameters.Clone();
            cloned.ParametersIndices = ParametersIndices.Select(x => new ParameterIndex() { Index = x.Index, Name = x.Name }).ToList();
            return cloned;
        }

    }
}
lass="p">, "Sm9iRmlsZUxpcXVpZFZvbHVtZS5wcm90byK6AwoQSm9iRmlsZUJydXNoU3Rv", "cBIWCg5Db2xvclNwYWNlR3VpZBgBIAEoCRIVCg1PZmZzZXRQZXJjZW50GAIg", "ASgBEgwKBEN5YW4YAyABKAESDwoHTWFnZW50YRgEIAEoARIOCgZZZWxsb3cY", "BSABKAESDQoFQmxhY2sYBiABKAESCwoDUmVkGAcgASgFEg0KBUdyZWVuGAgg", "ASgFEgwKBEJsdWUYCSABKAUSCQoBTBgKIAEoARIJCgFBGAsgASgBEgkKAUIY", "DCABKAESPQoNTGlxdWlkVm9sdW1lcxgYIAMoCzImLlRhbmdvLlBNUi5FeHBv", "cnRzLkpvYkZpbGVMaXF1aWRWb2x1bWUSEQoJQ29ycmVjdGVkGBUgASgIEhgK", "EENvbG9yQ2F0YWxvZ0d1aWQYFiABKAkSHAoUQ29sb3JDYXRhbG9nSXRlbUd1", "aWQYFyABKAkSFQoNSXNUcmFuc3BhcmVudBgZIAEoCBIRCglTdG9wSW5kZXgY", "GiABKAUSEgoKQmVzdE1hdGNoUhgbIAEoBRISCgpCZXN0TWF0Y2hHGBwgASgF", "EhIKCkJlc3RNYXRjaEIYHSABKAVCHQobY29tLnR3aW5lLnRhbmdvLnBtci5l", "eHBvcnRzYgZwcm90bzM=")); descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, new pbr::FileDescriptor[] { global::Tango.PMR.Exports.JobFileLiquidVolumeReflection.Descriptor, }, new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Tango.PMR.Exports.JobFileBrushStop), global::Tango.PMR.Exports.JobFileBrushStop.Parser, new[]{ "ColorSpaceGuid", "OffsetPercent", "Cyan", "Magenta", "Yellow", "Black", "Red", "Green", "Blue", "L", "A", "B", "LiquidVolumes", "Corrected", "ColorCatalogGuid", "ColorCatalogItemGuid", "IsTransparent", "StopIndex", "BestMatchR", "BestMatchG", "BestMatchB" }, null, null, null) })); } #endregion } #region Messages public sealed partial class JobFileBrushStop : pb::IMessage<JobFileBrushStop> { private static readonly pb::MessageParser<JobFileBrushStop> _parser = new pb::MessageParser<JobFileBrushStop>(() => new JobFileBrushStop()); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public static pb::MessageParser<JobFileBrushStop> Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public static pbr::MessageDescriptor Descriptor { get { return global::Tango.PMR.Exports.JobFileBrushStopReflection.Descriptor.MessageTypes[0]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public JobFileBrushStop() { OnConstruction(); } partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public JobFileBrushStop(JobFileBrushStop other) : this() { colorSpaceGuid_ = other.colorSpaceGuid_; offsetPercent_ = other.offsetPercent_; cyan_ = other.cyan_; magenta_ = other.magenta_; yellow_ = other.yellow_; black_ = other.black_; red_ = other.red_; green_ = other.green_; blue_ = other.blue_; l_ = other.l_; a_ = other.a_; b_ = other.b_; liquidVolumes_ = other.liquidVolumes_.Clone(); corrected_ = other.corrected_; colorCatalogGuid_ = other.colorCatalogGuid_; colorCatalogItemGuid_ = other.colorCatalogItemGuid_; isTransparent_ = other.isTransparent_; stopIndex_ = other.stopIndex_; bestMatchR_ = other.bestMatchR_; bestMatchG_ = other.bestMatchG_; bestMatchB_ = other.bestMatchB_; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public JobFileBrushStop Clone() { return new JobFileBrushStop(this); } /// <summary>Field number for the "ColorSpaceGuid" field.</summary> public const int ColorSpaceGuidFieldNumber = 1; private string colorSpaceGuid_ = ""; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public string ColorSpaceGuid { get { return colorSpaceGuid_; } set { colorSpaceGuid_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); } } /// <summary>Field number for the "OffsetPercent" field.</summary> public const int OffsetPercentFieldNumber = 2; private double offsetPercent_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public double OffsetPercent { get { return offsetPercent_; } set { offsetPercent_ = value; } } /// <summary>Field number for the "Cyan" field.</summary> public const int CyanFieldNumber = 3; private double cyan_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public double Cyan { get { return cyan_; } set { cyan_ = value; } } /// <summary>Field number for the "Magenta" field.</summary> public const int MagentaFieldNumber = 4; private double magenta_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public double Magenta { get { return magenta_; } set { magenta_ = value; } } /// <summary>Field number for the "Yellow" field.</summary> public const int YellowFieldNumber = 5; private double yellow_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public double Yellow { get { return yellow_; } set { yellow_ = value; } } /// <summary>Field number for the "Black" field.</summary> public const int BlackFieldNumber = 6; private double black_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public double Black { get { return black_; } set { black_ = value; } } /// <summary>Field number for the "Red" field.</summary> public const int RedFieldNumber = 7; 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 = 8; 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 = 9; private int blue_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public int Blue { get { return blue_; } set { blue_ = value; } } /// <summary>Field number for the "L" field.</summary> public const int LFieldNumber = 10; private double l_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public double L { get { return l_; } set { l_ = value; } } /// <summary>Field number for the "A" field.</summary> public const int AFieldNumber = 11; private double a_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public double A { get { return a_; } set { a_ = value; } } /// <summary>Field number for the "B" field.</summary> public const int BFieldNumber = 12; private double b_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public double B { get { return b_; } set { b_ = value; } } /// <summary>Field number for the "LiquidVolumes" field.</summary> public const int LiquidVolumesFieldNumber = 24; private static readonly pb::FieldCodec<global::Tango.PMR.Exports.JobFileLiquidVolume> _repeated_liquidVolumes_codec = pb::FieldCodec.ForMessage(194, global::Tango.PMR.Exports.JobFileLiquidVolume.Parser); private readonly pbc::RepeatedField<global::Tango.PMR.Exports.JobFileLiquidVolume> liquidVolumes_ = new pbc::RepeatedField<global::Tango.PMR.Exports.JobFileLiquidVolume>(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public pbc::RepeatedField<global::Tango.PMR.Exports.JobFileLiquidVolume> LiquidVolumes { get { return liquidVolumes_; } } /// <summary>Field number for the "Corrected" field.</summary> public const int CorrectedFieldNumber = 21; private bool corrected_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public bool Corrected { get { return corrected_; } set { corrected_ = value; } } /// <summary>Field number for the "ColorCatalogGuid" field.</summary> public const int ColorCatalogGuidFieldNumber = 22; private string colorCatalogGuid_ = ""; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public string ColorCatalogGuid { get { return colorCatalogGuid_; } set { colorCatalogGuid_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); } } /// <summary>Field number for the "ColorCatalogItemGuid" field.</summary> public const int ColorCatalogItemGuidFieldNumber = 23; private string colorCatalogItemGuid_ = ""; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public string ColorCatalogItemGuid { get { return colorCatalogItemGuid_; } set { colorCatalogItemGuid_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); } } /// <summary>Field number for the "IsTransparent" field.</summary> public const int IsTransparentFieldNumber = 25; private bool isTransparent_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public bool IsTransparent { get { return isTransparent_; } set { isTransparent_ = value; } } /// <summary>Field number for the "StopIndex" field.</summary> public const int StopIndexFieldNumber = 26; private int stopIndex_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public int StopIndex { get { return stopIndex_; } set { stopIndex_ = value; } } /// <summary>Field number for the "BestMatchR" field.</summary> public const int BestMatchRFieldNumber = 27; private int bestMatchR_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public int BestMatchR { get { return bestMatchR_; } set { bestMatchR_ = value; } } /// <summary>Field number for the "BestMatchG" field.</summary> public const int BestMatchGFieldNumber = 28; private int bestMatchG_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public int BestMatchG { get { return bestMatchG_; } set { bestMatchG_ = value; } } /// <summary>Field number for the "BestMatchB" field.</summary> public const int BestMatchBFieldNumber = 29; private int bestMatchB_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public int BestMatchB { get { return bestMatchB_; } set { bestMatchB_ = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public override bool Equals(object other) { return Equals(other as JobFileBrushStop); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public bool Equals(JobFileBrushStop other) { if (ReferenceEquals(other, null)) { return false; } if (ReferenceEquals(other, this)) { return true; } if (ColorSpaceGuid != other.ColorSpaceGuid) return false; if (OffsetPercent != other.OffsetPercent) return false; if (Cyan != other.Cyan) return false; if (Magenta != other.Magenta) return false; if (Yellow != other.Yellow) return false; if (Black != other.Black) return false; if (Red != other.Red) return false; if (Green != other.Green) return false; if (Blue != other.Blue) return false; if (L != other.L) return false; if (A != other.A) return false; if (B != other.B) return false; if(!liquidVolumes_.Equals(other.liquidVolumes_)) return false; if (Corrected != other.Corrected) return false; if (ColorCatalogGuid != other.ColorCatalogGuid) return false; if (ColorCatalogItemGuid != other.ColorCatalogItemGuid) return false; if (IsTransparent != other.IsTransparent) return false; if (StopIndex != other.StopIndex) return false; if (BestMatchR != other.BestMatchR) return false; if (BestMatchG != other.BestMatchG) return false; if (BestMatchB != other.BestMatchB) return false; return true; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public override int GetHashCode() { int hash = 1; if (ColorSpaceGuid.Length != 0) hash ^= ColorSpaceGuid.GetHashCode(); if (OffsetPercent != 0D) hash ^= OffsetPercent.GetHashCode(); if (Cyan != 0D) hash ^= Cyan.GetHashCode(); if (Magenta != 0D) hash ^= Magenta.GetHashCode(); if (Yellow != 0D) hash ^= Yellow.GetHashCode(); if (Black != 0D) hash ^= Black.GetHashCode(); if (Red != 0) hash ^= Red.GetHashCode(); if (Green != 0) hash ^= Green.GetHashCode(); if (Blue != 0) hash ^= Blue.GetHashCode(); if (L != 0D) hash ^= L.GetHashCode(); if (A != 0D) hash ^= A.GetHashCode(); if (B != 0D) hash ^= B.GetHashCode(); hash ^= liquidVolumes_.GetHashCode(); if (Corrected != false) hash ^= Corrected.GetHashCode(); if (ColorCatalogGuid.Length != 0) hash ^= ColorCatalogGuid.GetHashCode(); if (ColorCatalogItemGuid.Length != 0) hash ^= ColorCatalogItemGuid.GetHashCode(); if (IsTransparent != false) hash ^= IsTransparent.GetHashCode(); if (StopIndex != 0) hash ^= StopIndex.GetHashCode(); if (BestMatchR != 0) hash ^= BestMatchR.GetHashCode(); if (BestMatchG != 0) hash ^= BestMatchG.GetHashCode(); if (BestMatchB != 0) hash ^= BestMatchB.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 (ColorSpaceGuid.Length != 0) { output.WriteRawTag(10); output.WriteString(ColorSpaceGuid); } if (OffsetPercent != 0D) { output.WriteRawTag(17); output.WriteDouble(OffsetPercent); } if (Cyan != 0D) { output.WriteRawTag(25); output.WriteDouble(Cyan); } if (Magenta != 0D) { output.WriteRawTag(33); output.WriteDouble(Magenta); } if (Yellow != 0D) { output.WriteRawTag(41); output.WriteDouble(Yellow); } if (Black != 0D) { output.WriteRawTag(49); output.WriteDouble(Black); } if (Red != 0) { output.WriteRawTag(56); output.WriteInt32(Red); } if (Green != 0) { output.WriteRawTag(64); output.WriteInt32(Green); } if (Blue != 0) { output.WriteRawTag(72); output.WriteInt32(Blue); } if (L != 0D) { output.WriteRawTag(81); output.WriteDouble(L); } if (A != 0D) { output.WriteRawTag(89); output.WriteDouble(A); } if (B != 0D) { output.WriteRawTag(97); output.WriteDouble(B); } if (Corrected != false) { output.WriteRawTag(168, 1); output.WriteBool(Corrected); } if (ColorCatalogGuid.Length != 0) { output.WriteRawTag(178, 1); output.WriteString(ColorCatalogGuid); } if (ColorCatalogItemGuid.Length != 0) { output.WriteRawTag(186, 1); output.WriteString(ColorCatalogItemGuid); } liquidVolumes_.WriteTo(output, _repeated_liquidVolumes_codec); if (IsTransparent != false) { output.WriteRawTag(200, 1); output.WriteBool(IsTransparent); } if (StopIndex != 0) { output.WriteRawTag(208, 1); output.WriteInt32(StopIndex); } if (BestMatchR != 0) { output.WriteRawTag(216, 1); output.WriteInt32(BestMatchR); } if (BestMatchG != 0) { output.WriteRawTag(224, 1); output.WriteInt32(BestMatchG); } if (BestMatchB != 0) { output.WriteRawTag(232, 1); output.WriteInt32(BestMatchB); } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public int CalculateSize() { int size = 0; if (ColorSpaceGuid.Length != 0) { size += 1 + pb::CodedOutputStream.ComputeStringSize(ColorSpaceGuid); } if (OffsetPercent != 0D) { size += 1 + 8; } if (Cyan != 0D) { size += 1 + 8; } if (Magenta != 0D) { size += 1 + 8; } if (Yellow != 0D) { size += 1 + 8; } if (Black != 0D) { size += 1 + 8; } 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); } if (L != 0D) { size += 1 + 8; } if (A != 0D) { size += 1 + 8; } if (B != 0D) { size += 1 + 8; } size += liquidVolumes_.CalculateSize(_repeated_liquidVolumes_codec); if (Corrected != false) { size += 2 + 1; } if (ColorCatalogGuid.Length != 0) { size += 2 + pb::CodedOutputStream.ComputeStringSize(ColorCatalogGuid); } if (ColorCatalogItemGuid.Length != 0) { size += 2 + pb::CodedOutputStream.ComputeStringSize(ColorCatalogItemGuid); } if (IsTransparent != false) { size += 2 + 1; } if (StopIndex != 0) { size += 2 + pb::CodedOutputStream.ComputeInt32Size(StopIndex); } if (BestMatchR != 0) { size += 2 + pb::CodedOutputStream.ComputeInt32Size(BestMatchR); } if (BestMatchG != 0) { size += 2 + pb::CodedOutputStream.ComputeInt32Size(BestMatchG); } if (BestMatchB != 0) { size += 2 + pb::CodedOutputStream.ComputeInt32Size(BestMatchB); } return size; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public void MergeFrom(JobFileBrushStop other) { if (other == null) { return; } if (other.ColorSpaceGuid.Length != 0) { ColorSpaceGuid = other.ColorSpaceGuid; } if (other.OffsetPercent != 0D) { OffsetPercent = other.OffsetPercent; } if (other.Cyan != 0D) { Cyan = other.Cyan; } if (other.Magenta != 0D) { Magenta = other.Magenta; } if (other.Yellow != 0D) { Yellow = other.Yellow; } if (other.Black != 0D) { Black = other.Black; } if (other.Red != 0) { Red = other.Red; } if (other.Green != 0) { Green = other.Green; } if (other.Blue != 0) { Blue = other.Blue; } if (other.L != 0D) { L = other.L; } if (other.A != 0D) { A = other.A; } if (other.B != 0D) { B = other.B; } liquidVolumes_.Add(other.liquidVolumes_); if (other.Corrected != false) { Corrected = other.Corrected; } if (other.ColorCatalogGuid.Length != 0) { ColorCatalogGuid = other.ColorCatalogGuid; } if (other.ColorCatalogItemGuid.Length != 0) { ColorCatalogItemGuid = other.ColorCatalogItemGuid; } if (other.IsTransparent != false) { IsTransparent = other.IsTransparent; } if (other.StopIndex != 0) { StopIndex = other.StopIndex; } if (other.BestMatchR != 0) { BestMatchR = other.BestMatchR; } if (other.BestMatchG != 0) { BestMatchG = other.BestMatchG; } if (other.BestMatchB != 0) { BestMatchB = other.BestMatchB; } } [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: { ColorSpaceGuid = input.ReadString(); break; } case 17: { OffsetPercent = input.ReadDouble(); break; } case 25: { Cyan = input.ReadDouble(); break; } case 33: { Magenta = input.ReadDouble(); break; } case 41: { Yellow = input.ReadDouble(); break; } case 49: { Black = input.ReadDouble(); break; } case 56: { Red = input.ReadInt32(); break; } case 64: { Green = input.ReadInt32(); break; } case 72: { Blue = input.ReadInt32(); break; } case 81: { L = input.ReadDouble(); break; } case 89: { A = input.ReadDouble(); break; } case 97: { B = input.ReadDouble(); break; } case 168: { Corrected = input.ReadBool(); break; } case 178: { ColorCatalogGuid = input.ReadString(); break; } case 186: { ColorCatalogItemGuid = input.ReadString(); break; } case 194: { liquidVolumes_.AddEntriesFrom(input, _repeated_liquidVolumes_codec); break; } case 200: { IsTransparent = input.ReadBool(); break; } case 208: { StopIndex = input.ReadInt32(); break; } case 216: { BestMatchR = input.ReadInt32(); break; } case 224: { BestMatchG = input.ReadInt32(); break; } case 232: { BestMatchB = input.ReadInt32(); break; } } } } } #endregion } #endregion Designer generated code