aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/JobProgressViewVM.cs
blob: b5f122a5f3fece0ec3a66b7aa98d51d0beee6e8c (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
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Tango.BL.Entities;
using Tango.Core.Commands;
using Tango.Integration.Operation;
using Tango.Logging;
using Tango.PMR.Printing;
using Tango.PPC.Common;
using Tango.PPC.Common.Navigation;
using Tango.PPC.Common.Notifications;
using Tango.PPC.Jobs.AppBarItems;
using Tango.PPC.Jobs.AppButtons;
using Tango.PPC.Jobs.Dialogs;
using Tango.PPC.Jobs.NavigationObjects;
using Tango.PPC.Jobs.Views;

namespace Tango.PPC.Jobs.ViewModels
{
    /// <summary>
    /// Represents the job progress view model.
    /// </summary>
    /// <seealso cref="Tango.PPC.Common.PPCViewModel" />
    public class JobProgressViewVM : PPCViewModel
    {
        private StopPrintingButton _stop_job_btn;
        private JobHandler _handler;

        #region Properties

        private Job _job;
        /// <summary>
        /// Gets or sets the job.
        /// </summary>
        public Job Job
        {
            get { return _job; }
            set { _job = value; RaisePropertyChangedAuto(); }
        }

        private RunningJobStatus _runningJobStatus;
        /// <summary>
        /// Gets or sets the running job status.
        /// </summary>
        public RunningJobStatus RunningJobStatus
        {
            get { return _runningJobStatus; }
            set { _runningJobStatus = value; RaisePropertyChangedAuto(); }
        }

        private bool _isDisplayJobOutline;
        /// <summary>
        /// Gets or sets a value indicating whether to display the job outline.
        /// </summary>
        public bool IsDisplayJobOutline
        {
            get { return _isDisplayJobOutline; }
            set { _isDisplayJobOutline = value; RaisePropertyChangedAuto(); }
        }

        private JobTicket _jobOutlineTicket;
        /// <summary>
        /// Gets or sets the job outline ticket.
        /// </summary>
        public JobTicket JobOutlineTicket
        {
            get { return _jobOutlineTicket; }
            set { _jobOutlineTicket = value; RaisePropertyChangedAuto(); }
        }

        #endregion

        #region Commands

        /// <summary>
        /// Gets or sets the go to job command.
        /// </summary>
        /// <value>
        /// The go to job command.
        /// </value>
        public RelayCommand GoToJobCommand { get; set; }

        /// <summary>
        /// Gets or sets the display job outline command.
        /// </summary>
        public RelayCommand DisplayJobOutlineCommand { get; set; }

        /// <summary>
        /// Gets or sets the hide job outline command.
        /// </summary>
        public RelayCommand HideJobOutlineCommand { get; set; }

        #endregion

        public JobProgressViewVM()
        {
            _stop_job_btn = new StopPrintingButton();
            _stop_job_btn.Pressed += _stop_job_btn_Pressed;

            GoToJobCommand = new RelayCommand(GoToJob);
            DisplayJobOutlineCommand = new RelayCommand(DisplayJobOutline);
            HideJobOutlineCommand = new RelayCommand(HideJobOutline);
        }

        #region Private Methods

        private void HideJobOutline()
        {
            IsDisplayJobOutline = false;
        }

        private void DisplayJobOutline()
        {
            JobOutlineTicket = _handler.JobTicket;
            IsDisplayJobOutline = true;
        }

        private void GoToJob()
        {
            NavigationManager.NavigateWithObject<JobsModule, JobView, JobNavigationObject>(new JobNavigationObject() { Job = _handler.Job });
            NavigationManager.ClearHistoryExcept<JobsView>();
        }

        #endregion

        #region Override Methods

        /// <summary>
        /// Called when the application has been started.
        /// </summary>
        public override void OnApplicationStarted()
        {
            MachineProvider.MachineOperator.PrintingStarted += MachineOperator_PrintingStarted;
            MachineProvider.MachineOperator.PrintingEnded += MachineOperator_PrintingEnded;
        }

        /// <summary>
        /// Called when the navigation system has navigated to this VM view.
        /// </summary>
        public override void OnNavigatedTo()
        {
            base.OnNavigatedTo();

            IsDisplayJobOutline = false;

            if (_handler != null && !_handler.Status.IsFailed)
            {
                _stop_job_btn.Push();
            }
        }

        #endregion

        #region Event Handlers

        private void _stop_job_btn_Pressed()
        {
            if (_handler != null)
            {
                _handler.Cancel();
            }
        }

        /// <summary>
        /// Handles the PrintingStarted event of the MachineOperator.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="PrintingEventArgs"/> instance containing the event data.</param>
        private void MachineOperator_PrintingStarted(object sender, PrintingEventArgs e)
        {
            _handler = e.JobHandler;
            Job = e.Job;
            e.JobHandler.StatusChanged += JobHandler_StatusChanged;
            e.JobHandler.SpoolChangeRequired += JobHandler_SpoolChangeRequired;
            e.JobHandler.Stopped += JobHandler_Stopped;
            e.JobHandler.CanCancelChanged += JobHandler_CanCancelChanged;

            _stop_job_btn.Push();
            _stop_job_btn.IsEnabled = true;
        }

        private void MachineOperator_PrintingEnded(object sender, PrintingEventArgs e)
        {
            LogManager.Log("Printing ended, popping job stop button...");

            if (_stop_job_btn != null)
            {
                _stop_job_btn.Pop();
            }
            else
            {
                LogManager.Log("Job stop button instance was null!", LogCategory.Warning);
            }
        }

        /// <summary>
        /// Handles the SpoolChangeRequired event of the JobHandler.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="SpoolChangeRequiredEventArgs"/> instance containing the event data.</param>
        private void JobHandler_SpoolChangeRequired(object sender, SpoolChangeRequiredEventArgs e)
        {
            InvokeUI(async () =>
            {
                if ((await NotificationProvider.ShowDialog(new SpoolChangeViewVM(e))).DialogResult)
                {
                    e.Confirm();
                }
                else
                {
                    e.Abort();
                }
            });
        }

        /// <summary>
        /// Handles the Stopped event of the JobHandler.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="EventArgs"/> instance containing the event data.</param>
        private void JobHandler_Stopped(object sender, EventArgs e)
        {
            if (_handler != null)
            {
                _handler.StatusChanged -= JobHandler_StatusChanged;
                _handler.SpoolChangeRequired -= JobHandler_SpoolChangeRequired;
                _handler.Stopped -= JobHandler_Stopped;
                _handler.CanCancelChanged -= JobHandler_CanCancelChanged;
            }
        }

        /// <summary>
        /// Handles the JobHandler StatusChanged event.
        /// </summary>
        /// <param name="sender">The sender.</param>
        /// <param name="e">The e.</param>
        private void JobHandler_StatusChanged(object sender, RunningJobStatus e)
        {
            InvokeUI(() =>
            {
                RunningJobStatus = e;
            });
        }

        /// <summary>
        /// Handles the CanCancelChanged event of the JobHandler control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="EventArgs"/> instance containing the event data.</param>
        private void JobHandler_CanCancelChanged(object sender, EventArgs e)
        {
            _stop_job_btn.IsEnabled = _handler.CanCancel;
        }

        #endregion
    }
}
1Temp_; dryerZone2Temp_ = other.dryerZone2Temp_; dryerZone3Temp_ = other.dryerZone3Temp_; dryerBufferLength_ = other.dryerBufferLength_; headAirFlow_ = other.headAirFlow_; tableIndex_ = other.tableIndex_; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public ProcessParameters Clone() { return new ProcessParameters(this); } /// <summary>Field number for the "DyeingSpeed" field.</summary> public const int DyeingSpeedFieldNumber = 1; private double dyeingSpeed_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public double DyeingSpeed { get { return dyeingSpeed_; } set { dyeingSpeed_ = value; } } /// <summary>Field number for the "MinInkUptake" field.</summary> public const int MinInkUptakeFieldNumber = 2; private double minInkUptake_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public double MinInkUptake { get { return minInkUptake_; } set { minInkUptake_ = value; } } /// <summary>Field number for the "MaxInkUptake" field.</summary> public const int MaxInkUptakeFieldNumber = 3; private double maxInkUptake_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public double MaxInkUptake { get { return maxInkUptake_; } set { maxInkUptake_ = value; } } /// <summary>Field number for the "FeederTension" field.</summary> public const int FeederTensionFieldNumber = 4; private double feederTension_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public double FeederTension { get { return feederTension_; } set { feederTension_ = value; } } /// <summary>Field number for the "PullerTension" field.</summary> public const int PullerTensionFieldNumber = 5; private double pullerTension_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public double PullerTension { get { return pullerTension_; } set { pullerTension_ = value; } } /// <summary>Field number for the "WinderTension" field.</summary> public const int WinderTensionFieldNumber = 6; private double winderTension_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public double WinderTension { get { return winderTension_; } set { winderTension_ = value; } } /// <summary>Field number for the "MixerTemp" field.</summary> public const int MixerTempFieldNumber = 7; private double mixerTemp_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public double MixerTemp { get { return mixerTemp_; } set { mixerTemp_ = value; } } /// <summary>Field number for the "HeadZone1Temp" field.</summary> public const int HeadZone1TempFieldNumber = 8; private double headZone1Temp_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public double HeadZone1Temp { get { return headZone1Temp_; } set { headZone1Temp_ = value; } } /// <summary>Field number for the "HeadZone2Temp" field.</summary> public const int HeadZone2TempFieldNumber = 9; private double headZone2Temp_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public double HeadZone2Temp { get { return headZone2Temp_; } set { headZone2Temp_ = value; } } /// <summary>Field number for the "HeadZone3Temp" field.</summary> public const int HeadZone3TempFieldNumber = 10; private double headZone3Temp_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public double HeadZone3Temp { get { return headZone3Temp_; } set { headZone3Temp_ = value; } } /// <summary>Field number for the "HeadZone4Temp" field.</summary> public const int HeadZone4TempFieldNumber = 11; private double headZone4Temp_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public double HeadZone4Temp { get { return headZone4Temp_; } set { headZone4Temp_ = value; } } /// <summary>Field number for the "HeadZone5Temp" field.</summary> public const int HeadZone5TempFieldNumber = 12; private double headZone5Temp_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public double HeadZone5Temp { get { return headZone5Temp_; } set { headZone5Temp_ = value; } } /// <summary>Field number for the "HeadZone6Temp" field.</summary> public const int HeadZone6TempFieldNumber = 13; private double headZone6Temp_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public double HeadZone6Temp { get { return headZone6Temp_; } set { headZone6Temp_ = value; } } /// <summary>Field number for the "DryerAirFlow" field.</summary> public const int DryerAirFlowFieldNumber = 14; private double dryerAirFlow_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public double DryerAirFlow { get { return dryerAirFlow_; } set { dryerAirFlow_ = value; } } /// <summary>Field number for the "DryerZone1Temp" field.</summary> public const int DryerZone1TempFieldNumber = 15; private double dryerZone1Temp_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public double DryerZone1Temp { get { return dryerZone1Temp_; } set { dryerZone1Temp_ = value; } } /// <summary>Field number for the "DryerZone2Temp" field.</summary> public const int DryerZone2TempFieldNumber = 16; private double dryerZone2Temp_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public double DryerZone2Temp { get { return dryerZone2Temp_; } set { dryerZone2Temp_ = value; } } /// <summary>Field number for the "DryerZone3Temp" field.</summary> public const int DryerZone3TempFieldNumber = 17; private double dryerZone3Temp_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public double DryerZone3Temp { get { return dryerZone3Temp_; } set { dryerZone3Temp_ = value; } } /// <summary>Field number for the "DryerBufferLength" field.</summary> public const int DryerBufferLengthFieldNumber = 18; private double dryerBufferLength_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public double DryerBufferLength { get { return dryerBufferLength_; } set { dryerBufferLength_ = value; } } /// <summary>Field number for the "HeadAirFlow" field.</summary> public const int HeadAirFlowFieldNumber = 19; private double headAirFlow_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public double HeadAirFlow { get { return headAirFlow_; } set { headAirFlow_ = value; } } /// <summary>Field number for the "TableIndex" field.</summary> public const int TableIndexFieldNumber = 20; private int tableIndex_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public int TableIndex { get { return tableIndex_; } set { tableIndex_ = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public override bool Equals(object other) { return Equals(other as ProcessParameters); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public bool Equals(ProcessParameters other) { if (ReferenceEquals(other, null)) { return false; } if (ReferenceEquals(other, this)) { return true; } if (DyeingSpeed != other.DyeingSpeed) return false; if (MinInkUptake != other.MinInkUptake) return false; if (MaxInkUptake != other.MaxInkUptake) return false; if (FeederTension != other.FeederTension) return false; if (PullerTension != other.PullerTension) return false; if (WinderTension != other.WinderTension) return false; if (MixerTemp != other.MixerTemp) return false; if (HeadZone1Temp != other.HeadZone1Temp) return false; if (HeadZone2Temp != other.HeadZone2Temp) return false; if (HeadZone3Temp != other.HeadZone3Temp) return false; if (HeadZone4Temp != other.HeadZone4Temp) return false; if (HeadZone5Temp != other.HeadZone5Temp) return false; if (HeadZone6Temp != other.HeadZone6Temp) return false; if (DryerAirFlow != other.DryerAirFlow) return false; if (DryerZone1Temp != other.DryerZone1Temp) return false; if (DryerZone2Temp != other.DryerZone2Temp) return false; if (DryerZone3Temp != other.DryerZone3Temp) return false; if (DryerBufferLength != other.DryerBufferLength) return false; if (HeadAirFlow != other.HeadAirFlow) return false; if (TableIndex != other.TableIndex) return false; return true; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public override int GetHashCode() { int hash = 1; if (DyeingSpeed != 0D) hash ^= DyeingSpeed.GetHashCode(); if (MinInkUptake != 0D) hash ^= MinInkUptake.GetHashCode(); if (MaxInkUptake != 0D) hash ^= MaxInkUptake.GetHashCode(); if (FeederTension != 0D) hash ^= FeederTension.GetHashCode(); if (PullerTension != 0D) hash ^= PullerTension.GetHashCode(); if (WinderTension != 0D) hash ^= WinderTension.GetHashCode(); if (MixerTemp != 0D) hash ^= MixerTemp.GetHashCode(); if (HeadZone1Temp != 0D) hash ^= HeadZone1Temp.GetHashCode(); if (HeadZone2Temp != 0D) hash ^= HeadZone2Temp.GetHashCode(); if (HeadZone3Temp != 0D) hash ^= HeadZone3Temp.GetHashCode(); if (HeadZone4Temp != 0D) hash ^= HeadZone4Temp.GetHashCode(); if (HeadZone5Temp != 0D) hash ^= HeadZone5Temp.GetHashCode(); if (HeadZone6Temp != 0D) hash ^= HeadZone6Temp.GetHashCode(); if (DryerAirFlow != 0D) hash ^= DryerAirFlow.GetHashCode(); if (DryerZone1Temp != 0D) hash ^= DryerZone1Temp.GetHashCode(); if (DryerZone2Temp != 0D) hash ^= DryerZone2Temp.GetHashCode(); if (DryerZone3Temp != 0D) hash ^= DryerZone3Temp.GetHashCode(); if (DryerBufferLength != 0D) hash ^= DryerBufferLength.GetHashCode(); if (HeadAirFlow != 0D) hash ^= HeadAirFlow.GetHashCode(); if (TableIndex != 0) hash ^= TableIndex.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 (DyeingSpeed != 0D) { output.WriteRawTag(9); output.WriteDouble(DyeingSpeed); } if (MinInkUptake != 0D) { output.WriteRawTag(17); output.WriteDouble(MinInkUptake); } if (MaxInkUptake != 0D) { output.WriteRawTag(25); output.WriteDouble(MaxInkUptake); } if (FeederTension != 0D) { output.WriteRawTag(33); output.WriteDouble(FeederTension); } if (PullerTension != 0D) { output.WriteRawTag(41); output.WriteDouble(PullerTension); } if (WinderTension != 0D) { output.WriteRawTag(49); output.WriteDouble(WinderTension); } if (MixerTemp != 0D) { output.WriteRawTag(57); output.WriteDouble(MixerTemp); } if (HeadZone1Temp != 0D) { output.WriteRawTag(65); output.WriteDouble(HeadZone1Temp); } if (HeadZone2Temp != 0D) { output.WriteRawTag(73); output.WriteDouble(HeadZone2Temp); } if (HeadZone3Temp != 0D) { output.WriteRawTag(81); output.WriteDouble(HeadZone3Temp); } if (HeadZone4Temp != 0D) { output.WriteRawTag(89); output.WriteDouble(HeadZone4Temp); } if (HeadZone5Temp != 0D) { output.WriteRawTag(97); output.WriteDouble(HeadZone5Temp); } if (HeadZone6Temp != 0D) { output.WriteRawTag(105); output.WriteDouble(HeadZone6Temp); } if (DryerAirFlow != 0D) { output.WriteRawTag(113); output.WriteDouble(DryerAirFlow); } if (DryerZone1Temp != 0D) { output.WriteRawTag(121); output.WriteDouble(DryerZone1Temp); } if (DryerZone2Temp != 0D) { output.WriteRawTag(129, 1); output.WriteDouble(DryerZone2Temp); } if (DryerZone3Temp != 0D) { output.WriteRawTag(137, 1); output.WriteDouble(DryerZone3Temp); } if (DryerBufferLength != 0D) { output.WriteRawTag(145, 1); output.WriteDouble(DryerBufferLength); } if (HeadAirFlow != 0D) { output.WriteRawTag(153, 1); output.WriteDouble(HeadAirFlow); } if (TableIndex != 0) { output.WriteRawTag(160, 1); output.WriteInt32(TableIndex); } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public int CalculateSize() { int size = 0; if (DyeingSpeed != 0D) { size += 1 + 8; } if (MinInkUptake != 0D) { size += 1 + 8; } if (MaxInkUptake != 0D) { size += 1 + 8; } if (FeederTension != 0D) { size += 1 + 8; } if (PullerTension != 0D) { size += 1 + 8; } if (WinderTension != 0D) { size += 1 + 8; } if (MixerTemp != 0D) { size += 1 + 8; } if (HeadZone1Temp != 0D) { size += 1 + 8; } if (HeadZone2Temp != 0D) { size += 1 + 8; } if (HeadZone3Temp != 0D) { size += 1 + 8; } if (HeadZone4Temp != 0D) { size += 1 + 8; } if (HeadZone5Temp != 0D) { size += 1 + 8; } if (HeadZone6Temp != 0D) { size += 1 + 8; } if (DryerAirFlow != 0D) { size += 1 + 8; } if (DryerZone1Temp != 0D) { size += 1 + 8; } if (DryerZone2Temp != 0D) { size += 2 + 8; } if (DryerZone3Temp != 0D) { size += 2 + 8; } if (DryerBufferLength != 0D) { size += 2 + 8; } if (HeadAirFlow != 0D) { size += 2 + 8; } if (TableIndex != 0) { size += 2 + pb::CodedOutputStream.ComputeInt32Size(TableIndex); } return size; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public void MergeFrom(ProcessParameters other) { if (other == null) { return; } if (other.DyeingSpeed != 0D) { DyeingSpeed = other.DyeingSpeed; } if (other.MinInkUptake != 0D) { MinInkUptake = other.MinInkUptake; } if (other.MaxInkUptake != 0D) { MaxInkUptake = other.MaxInkUptake; } if (other.FeederTension != 0D) { FeederTension = other.FeederTension; } if (other.PullerTension != 0D) { PullerTension = other.PullerTension; } if (other.WinderTension != 0D) { WinderTension = other.WinderTension; } if (other.MixerTemp != 0D) { MixerTemp = other.MixerTemp; } if (other.HeadZone1Temp != 0D) { HeadZone1Temp = other.HeadZone1Temp; } if (other.HeadZone2Temp != 0D) { HeadZone2Temp = other.HeadZone2Temp; } if (other.HeadZone3Temp != 0D) { HeadZone3Temp = other.HeadZone3Temp; } if (other.HeadZone4Temp != 0D) { HeadZone4Temp = other.HeadZone4Temp; } if (other.HeadZone5Temp != 0D) { HeadZone5Temp = other.HeadZone5Temp; } if (other.HeadZone6Temp != 0D) { HeadZone6Temp = other.HeadZone6Temp; } if (other.DryerAirFlow != 0D) { DryerAirFlow = other.DryerAirFlow; } if (other.DryerZone1Temp != 0D) { DryerZone1Temp = other.DryerZone1Temp; } if (other.DryerZone2Temp != 0D) { DryerZone2Temp = other.DryerZone2Temp; } if (other.DryerZone3Temp != 0D) { DryerZone3Temp = other.DryerZone3Temp; } if (other.DryerBufferLength != 0D) { DryerBufferLength = other.DryerBufferLength; } if (other.HeadAirFlow != 0D) { HeadAirFlow = other.HeadAirFlow; } if (other.TableIndex != 0) { TableIndex = other.TableIndex; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public void MergeFrom(pb::CodedInputStream input) { uint tag; while ((tag = input.ReadTag()) != 0) { switch(tag) { default: input.SkipLastField(); break; case 9: { DyeingSpeed = input.ReadDouble(); break; } case 17: { MinInkUptake = input.ReadDouble(); break; } case 25: { MaxInkUptake = input.ReadDouble(); break; } case 33: { FeederTension = input.ReadDouble(); break; } case 41: { PullerTension = input.ReadDouble(); break; } case 49: { WinderTension = input.ReadDouble(); break; } case 57: { MixerTemp = input.ReadDouble(); break; } case 65: { HeadZone1Temp = input.ReadDouble(); break; } case 73: { HeadZone2Temp = input.ReadDouble(); break; } case 81: { HeadZone3Temp = input.ReadDouble(); break; } case 89: { HeadZone4Temp = input.ReadDouble(); break; } case 97: { HeadZone5Temp = input.ReadDouble(); break; } case 105: { HeadZone6Temp = input.ReadDouble(); break; } case 113: { DryerAirFlow = input.ReadDouble(); break; } case 121: { DryerZone1Temp = input.ReadDouble(); break; } case 129: { DryerZone2Temp = input.ReadDouble(); break; } case 137: { DryerZone3Temp = input.ReadDouble(); break; } case 145: { DryerBufferLength = input.ReadDouble(); break; } case 153: { HeadAirFlow = input.ReadDouble(); break; } case 160: { TableIndex = input.ReadInt32(); break; } } } } } #endregion } #endregion Designer generated code