bool WaterMeter.PrintLabel (initially set), DataEntry.Uni : 1. "Auto s/n" function, 2. common check box, 3. Ct.PrintLabel (yes/no)
This commit is contained in:
parent
0181294872
commit
a625e2dfdb
@ -100,6 +100,7 @@ namespace Results.Entities
|
|||||||
#endif
|
#endif
|
||||||
public virtual int ProcessId { get; set; } /// Not mapped to DB !!! Tracing DB Process ID
|
public virtual int ProcessId { get; set; } /// Not mapped to DB !!! Tracing DB Process ID
|
||||||
public virtual bool LastRecordIsNok { get; set; } /// Not mapped to DB !!! Previous record verification result
|
public virtual bool LastRecordIsNok { get; set; } /// Not mapped to DB !!! Previous record verification result
|
||||||
|
public virtual bool PrintLabel { get; set; } /// Not mapped to DB !!!
|
||||||
|
|
||||||
public virtual WaterMeterData WaterMeterData { get; set; }
|
public virtual WaterMeterData WaterMeterData { get; set; }
|
||||||
public virtual Batch Batch { get; set; }
|
public virtual Batch Batch { get; set; }
|
||||||
@ -458,6 +459,7 @@ namespace Results.Entities
|
|||||||
#endif
|
#endif
|
||||||
ProcessId = 0;
|
ProcessId = 0;
|
||||||
LastRecordIsNok = false;
|
LastRecordIsNok = false;
|
||||||
|
PrintLabel = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -519,6 +521,7 @@ namespace Results.Entities
|
|||||||
#endif
|
#endif
|
||||||
ProcessId = src.ProcessId; /// Not mapped to DB
|
ProcessId = src.ProcessId; /// Not mapped to DB
|
||||||
LastRecordIsNok = src.LastRecordIsNok; /// Not mapped to DB
|
LastRecordIsNok = src.LastRecordIsNok; /// Not mapped to DB
|
||||||
|
PrintLabel = src.PrintLabel; /// Not mapped to DB
|
||||||
|
|
||||||
foreach (var mtr in MeterTestRslts)
|
foreach (var mtr in MeterTestRslts)
|
||||||
{
|
{
|
||||||
@ -698,6 +701,7 @@ namespace Results.Entities
|
|||||||
#endif
|
#endif
|
||||||
writer.Write(ProcessId);
|
writer.Write(ProcessId);
|
||||||
writer.Write(LastRecordIsNok);
|
writer.Write(LastRecordIsNok);
|
||||||
|
writer.Write(PrintLabel);
|
||||||
|
|
||||||
/// Save WaterMeterData or WaterMeterData.Id
|
/// Save WaterMeterData or WaterMeterData.Id
|
||||||
if (WaterMeterData != null && savedWMDatas != null && !savedWMDatas.Contains(WaterMeterData))
|
if (WaterMeterData != null && savedWMDatas != null && !savedWMDatas.Contains(WaterMeterData))
|
||||||
@ -777,6 +781,7 @@ namespace Results.Entities
|
|||||||
#endif
|
#endif
|
||||||
ProcessId = reader.ReadInt32();
|
ProcessId = reader.ReadInt32();
|
||||||
LastRecordIsNok = reader.ReadBoolean();
|
LastRecordIsNok = reader.ReadBoolean();
|
||||||
|
PrintLabel = reader.ReadBoolean();
|
||||||
|
|
||||||
/// Retrieve TestData
|
/// Retrieve TestData
|
||||||
if (reader.ReadBoolean())
|
if (reader.ReadBoolean())
|
||||||
|
|||||||
@ -15,6 +15,7 @@ namespace TBF.Rig.DataEntry
|
|||||||
[Description("Last from history")] HistoryLast,
|
[Description("Last from history")] HistoryLast,
|
||||||
[Description("Load")] Load, /// Load from water meters when the form is open, save on OK
|
[Description("Load")] Load, /// Load from water meters when the form is open, save on OK
|
||||||
[Description("Load (readonly)")] LoadReadOnly, /// Load from water meters when the form is open, prevent changes, do not save
|
[Description("Load (readonly)")] LoadReadOnly, /// Load from water meters when the form is open, prevent changes, do not save
|
||||||
|
[Description("Set")] Set, /// Set to 'yes' when the form is open
|
||||||
Count,
|
Count,
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -29,7 +30,9 @@ namespace TBF.Rig.DataEntry
|
|||||||
[Description("Radio address")] RadioAddress,
|
[Description("Radio address")] RadioAddress,
|
||||||
[Description("Year of calibration")] YearOfCalibration,
|
[Description("Year of calibration")] YearOfCalibration,
|
||||||
[Description("Start state")] StartState,
|
[Description("Start state")] StartState,
|
||||||
|
[Description("Start state aux")] StartStateAux,
|
||||||
[Description("End state")] EndState,
|
[Description("End state")] EndState,
|
||||||
|
[Description("End state aux")] EndStateAux,
|
||||||
[Description("Archive path")] ArchivePath,
|
[Description("Archive path")] ArchivePath,
|
||||||
[Description("WM Order")] WmOrder,
|
[Description("WM Order")] WmOrder,
|
||||||
[Description("Batch order")] BatchOrder,
|
[Description("Batch order")] BatchOrder,
|
||||||
@ -37,6 +40,7 @@ namespace TBF.Rig.DataEntry
|
|||||||
[Description("WM Remark")] WmRemark,
|
[Description("WM Remark")] WmRemark,
|
||||||
[Description("Batch remark")] BatchRemark,
|
[Description("Batch remark")] BatchRemark,
|
||||||
[Description("Batch and WM remark")] BatchAndWmRemark,
|
[Description("Batch and WM remark")] BatchAndWmRemark,
|
||||||
|
[Description("Print label")] PrintLabel,
|
||||||
#if ORACLE_DB
|
#if ORACLE_DB
|
||||||
[Description("Prefix")] Prefix,
|
[Description("Prefix")] Prefix,
|
||||||
[Description("Suffix")] Suffix,
|
[Description("Suffix")] Suffix,
|
||||||
@ -44,6 +48,28 @@ namespace TBF.Rig.DataEntry
|
|||||||
Count
|
Count
|
||||||
}
|
}
|
||||||
|
|
||||||
|
///
|
||||||
|
/// Identifies image instance
|
||||||
|
///
|
||||||
|
public enum Tst
|
||||||
|
{
|
||||||
|
Start,
|
||||||
|
End,
|
||||||
|
Both,
|
||||||
|
}
|
||||||
|
|
||||||
|
///
|
||||||
|
/// Image rotation
|
||||||
|
///
|
||||||
|
public enum Rotation
|
||||||
|
{
|
||||||
|
R0,
|
||||||
|
R90,
|
||||||
|
R180,
|
||||||
|
R270,
|
||||||
|
Count
|
||||||
|
}
|
||||||
|
|
||||||
public class DEItem
|
public class DEItem
|
||||||
{
|
{
|
||||||
public readonly Ct Content;
|
public readonly Ct Content;
|
||||||
|
|||||||
@ -3,6 +3,7 @@
|
|||||||
///
|
///
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
using Results.Entities;
|
using Results.Entities;
|
||||||
|
using TBF.Resources;
|
||||||
|
|
||||||
namespace TBF.Rig.DataEntry
|
namespace TBF.Rig.DataEntry
|
||||||
{
|
{
|
||||||
@ -21,7 +22,9 @@ namespace TBF.Rig.DataEntry
|
|||||||
case Ct.RadioAddress: return (!wm.Disabled && wm.RadioAddress != null) ? wm.RadioAddress : string.Empty;
|
case Ct.RadioAddress: return (!wm.Disabled && wm.RadioAddress != null) ? wm.RadioAddress : string.Empty;
|
||||||
case Ct.YearOfCalibration: return (!wm.Disabled) ? wm.YearOfProduction.ToString() : string.Empty;
|
case Ct.YearOfCalibration: return (!wm.Disabled) ? wm.YearOfProduction.ToString() : string.Empty;
|
||||||
case Ct.StartState: return (!wm.Disabled && wm.GetStartState() != null) ? wm.GetStartState() : string.Empty;
|
case Ct.StartState: return (!wm.Disabled && wm.GetStartState() != null) ? wm.GetStartState() : string.Empty;
|
||||||
|
case Ct.StartStateAux: return string.Empty;
|
||||||
case Ct.EndState: return (!wm.Disabled && wm.EndState != null) ? wm.EndState : string.Empty;
|
case Ct.EndState: return (!wm.Disabled && wm.EndState != null) ? wm.EndState : string.Empty;
|
||||||
|
case Ct.EndStateAux: return (!wm.Disabled && wm.GetEndStateAux() != null) ? wm.GetEndStateAux() : string.Empty;
|
||||||
case Ct.ArchivePath: return (!wm.Disabled && wm.ArchivePath != null) ? wm.ArchivePath : string.Empty;
|
case Ct.ArchivePath: return (!wm.Disabled && wm.ArchivePath != null) ? wm.ArchivePath : string.Empty;
|
||||||
|
|
||||||
case Ct.WmOrder: return (!wm.Disabled && wm.PurchaseOrder != null) ? wm.PurchaseOrder : string.Empty;
|
case Ct.WmOrder: return (!wm.Disabled && wm.PurchaseOrder != null) ? wm.PurchaseOrder : string.Empty;
|
||||||
@ -31,6 +34,7 @@ namespace TBF.Rig.DataEntry
|
|||||||
case Ct.WmRemark: return (!wm.Disabled && wm.Remark != null) ? wm.Remark : string.Empty;
|
case Ct.WmRemark: return (!wm.Disabled && wm.Remark != null) ? wm.Remark : string.Empty;
|
||||||
case Ct.BatchRemark: return (wm.Batch != null && wm.Batch.Remark != null) ? wm.Batch.Remark : string.Empty;
|
case Ct.BatchRemark: return (wm.Batch != null && wm.Batch.Remark != null) ? wm.Batch.Remark : string.Empty;
|
||||||
case Ct.BatchAndWmRemark: return (wm.Batch != null && wm.Batch.Remark != null) ? wm.Batch.Remark : string.Empty;
|
case Ct.BatchAndWmRemark: return (wm.Batch != null && wm.Batch.Remark != null) ? wm.Batch.Remark : string.Empty;
|
||||||
|
case Ct.PrintLabel: return wm.PrintLabel ? Strings.yes : Strings.no;
|
||||||
#if ORACLE_DB
|
#if ORACLE_DB
|
||||||
case Ct.Prefix: return (!wm.Disabled && wm.Prefix != null) ? wm.Prefix : string.Empty;
|
case Ct.Prefix: return (!wm.Disabled && wm.Prefix != null) ? wm.Prefix : string.Empty;
|
||||||
case Ct.Suffix: return (!wm.Disabled && wm.Suffix != null) ? wm.Suffix : string.Empty;
|
case Ct.Suffix: return (!wm.Disabled && wm.Suffix != null) ? wm.Suffix : string.Empty;
|
||||||
@ -53,7 +57,9 @@ namespace TBF.Rig.DataEntry
|
|||||||
case Ct.RadioAddress: wm.RadioAddress = value; return;
|
case Ct.RadioAddress: wm.RadioAddress = value; return;
|
||||||
case Ct.YearOfCalibration: if (int.TryParse(value, out year)) wm.YearOfProduction = year; return;
|
case Ct.YearOfCalibration: if (int.TryParse(value, out year)) wm.YearOfProduction = year; return;
|
||||||
case Ct.StartState: wm.SetStartState(value); return;
|
case Ct.StartState: wm.SetStartState(value); return;
|
||||||
|
case Ct.StartStateAux: return;
|
||||||
case Ct.EndState: wm.EndState = value; return;
|
case Ct.EndState: wm.EndState = value; return;
|
||||||
|
case Ct.EndStateAux: wm.SetEndStateAux(value); return;
|
||||||
case Ct.ArchivePath: wm.ArchivePath = value; return;
|
case Ct.ArchivePath: wm.ArchivePath = value; return;
|
||||||
|
|
||||||
case Ct.WmOrder:
|
case Ct.WmOrder:
|
||||||
@ -73,6 +79,10 @@ namespace TBF.Rig.DataEntry
|
|||||||
case Ct.BatchAndWmRemark:
|
case Ct.BatchAndWmRemark:
|
||||||
if (wm.Batch != null) wm.Batch.Remark = value;
|
if (wm.Batch != null) wm.Batch.Remark = value;
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
case Ct.PrintLabel:
|
||||||
|
wm.PrintLabel = (value == Strings.yes);
|
||||||
|
return;
|
||||||
#if ORACLE_DB
|
#if ORACLE_DB
|
||||||
case Ct.Prefix: wm.Prefix = value; return;
|
case Ct.Prefix: wm.Prefix = value; return;
|
||||||
case Ct.Suffix: wm.Suffix = value; return;
|
case Ct.Suffix: wm.Suffix = value; return;
|
||||||
|
|||||||
@ -124,6 +124,18 @@ namespace TBF.Rig.DataEntry.Uni
|
|||||||
comboBoxes = new ComboBox[colItems.Count, wmsCount];
|
comboBoxes = new ComboBox[colItems.Count, wmsCount];
|
||||||
checkBoxes = new CheckBox[wmsCount];
|
checkBoxes = new CheckBox[wmsCount];
|
||||||
|
|
||||||
|
/// Make Auto s/n button visible if there is either Ct.SerialNr or Ct.SerialNrAux column
|
||||||
|
int buttonsWidth = 350;
|
||||||
|
for (int k = 0; k < colItems.Count; k++)
|
||||||
|
{
|
||||||
|
if ((colItems[k].Content == Ct.SerialNr || colItems[k].Content == Ct.SerialNrAux) && colItems[k].Action != Ac.LoadReadOnly)
|
||||||
|
{
|
||||||
|
autoSNButton.Visible = true;
|
||||||
|
buttonsWidth += 147;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// Layout related readonly variables derived from argument 'sz'
|
/// Layout related readonly variables derived from argument 'sz'
|
||||||
switch (sz)
|
switch (sz)
|
||||||
{
|
{
|
||||||
@ -132,7 +144,7 @@ namespace TBF.Rig.DataEntry.Uni
|
|||||||
meterHeight = 26; /// Height of a ComboBox control
|
meterHeight = 26; /// Height of a ComboBox control
|
||||||
margin = 20;
|
margin = 20;
|
||||||
spacing = 8;
|
spacing = 8;
|
||||||
buttonsWidth = 350;
|
this.buttonsWidth = buttonsWidth;
|
||||||
hdrHeight = 120;
|
hdrHeight = 120;
|
||||||
labelWid = 31;
|
labelWid = 31;
|
||||||
checkBoxWid = 23;
|
checkBoxWid = 23;
|
||||||
@ -144,7 +156,7 @@ namespace TBF.Rig.DataEntry.Uni
|
|||||||
meterHeight = 31; /// Height of a ComboBox control
|
meterHeight = 31; /// Height of a ComboBox control
|
||||||
margin = 25;
|
margin = 25;
|
||||||
spacing = 10;
|
spacing = 10;
|
||||||
buttonsWidth = 350;
|
this.buttonsWidth = buttonsWidth;
|
||||||
hdrHeight = 140;
|
hdrHeight = 140;
|
||||||
labelWid = 34;
|
labelWid = 34;
|
||||||
checkBoxWid = 23;
|
checkBoxWid = 23;
|
||||||
@ -155,7 +167,7 @@ namespace TBF.Rig.DataEntry.Uni
|
|||||||
meterHeight = 37; /// Height of a ComboBox control
|
meterHeight = 37; /// Height of a ComboBox control
|
||||||
margin = 30;
|
margin = 30;
|
||||||
spacing = 12;
|
spacing = 12;
|
||||||
buttonsWidth = 350;
|
this.buttonsWidth = buttonsWidth;
|
||||||
hdrHeight = 160;
|
hdrHeight = 160;
|
||||||
labelWid = 40;
|
labelWid = 40;
|
||||||
checkBoxWid = 23;
|
checkBoxWid = 23;
|
||||||
@ -236,6 +248,8 @@ namespace TBF.Rig.DataEntry.Uni
|
|||||||
///
|
///
|
||||||
/// Table
|
/// Table
|
||||||
///
|
///
|
||||||
|
int commonCheckBoxLeft = 0;
|
||||||
|
int commonCheckBoxTop = 0;
|
||||||
int columnsTop = Math.Max(hdrHeight, groupBoxHeight + 2 * margin + spacing);
|
int columnsTop = Math.Max(hdrHeight, groupBoxHeight + 2 * margin + spacing);
|
||||||
for (int j = 0; j < linesCount; j++)
|
for (int j = 0; j < linesCount; j++)
|
||||||
{
|
{
|
||||||
@ -299,8 +313,16 @@ namespace TBF.Rig.DataEntry.Uni
|
|||||||
comboBox.TextChanged += new System.EventHandler(this.comboBox_TextChanged);
|
comboBox.TextChanged += new System.EventHandler(this.comboBox_TextChanged);
|
||||||
comboBox.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.comboBox_KeyPress);
|
comboBox.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.comboBox_KeyPress);
|
||||||
|
|
||||||
|
if (ci.Content == Ct.PrintLabel)
|
||||||
|
{
|
||||||
|
comboBox.Items.Add(Strings.yes);
|
||||||
|
comboBox.Items.Add(Strings.no);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
var lastVals = GetHistoryFromLS(isEnd, k);
|
var lastVals = GetHistoryFromLS(isEnd, k);
|
||||||
comboBox.Items.Add(lastVals.Length > wmPos0 ? lastVals[wmPos0] : string.Empty); /// History in drop-down menu
|
comboBox.Items.Add(lastVals.Length > wmPos0 ? lastVals[wmPos0] : string.Empty); /// History in drop-down menu
|
||||||
|
}
|
||||||
|
|
||||||
left += ci.Width + spacing;
|
left += ci.Width + spacing;
|
||||||
comboBoxes[k, wmPos0] = comboBox;
|
comboBoxes[k, wmPos0] = comboBox;
|
||||||
@ -316,9 +338,28 @@ namespace TBF.Rig.DataEntry.Uni
|
|||||||
};
|
};
|
||||||
checkBoxes[wmPos0] = checkBox;
|
checkBoxes[wmPos0] = checkBox;
|
||||||
this.Controls.Add(checkBox);
|
this.Controls.Add(checkBox);
|
||||||
|
|
||||||
|
if (commonCheckBoxLeft == 0)
|
||||||
|
{
|
||||||
|
commonCheckBoxLeft = left;
|
||||||
|
commonCheckBoxTop = columnsTop - meterHeight;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
okButton.TabIndex = tabIndex++;
|
||||||
|
clearButton.TabIndex = tabIndex++;
|
||||||
|
|
||||||
|
var commonCheckBox = new CheckBox
|
||||||
|
{
|
||||||
|
Location = new Point(commonCheckBoxLeft, commonCheckBoxTop + 6),
|
||||||
|
Size = new Size(checkBoxWid, 23),
|
||||||
|
TabIndex = tabIndex++,
|
||||||
|
Parent = this,
|
||||||
|
};
|
||||||
|
commonCheckBox.CheckedChanged += new System.EventHandler(commonCheckBox_CheckedChanged);
|
||||||
|
this.Controls.Add(commonCheckBox);
|
||||||
|
}
|
||||||
|
|
||||||
///
|
///
|
||||||
/// Adjust window size
|
/// Adjust window size
|
||||||
///
|
///
|
||||||
@ -442,6 +483,10 @@ namespace TBF.Rig.DataEntry.Uni
|
|||||||
case Ac.LoadReadOnly:
|
case Ac.LoadReadOnly:
|
||||||
commonComboBoxes[ix].Text = DEUtils.GetContent(commonItems[ix].Content, firstValidWM);
|
commonComboBoxes[ix].Text = DEUtils.GetContent(commonItems[ix].Content, firstValidWM);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case Ac.Set:
|
||||||
|
commonComboBoxes[ix].Text = Strings.yes;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -469,6 +514,13 @@ namespace TBF.Rig.DataEntry.Uni
|
|||||||
comboBoxes[k, i].Text = DEUtils.GetContent(colItems[k].Content, WaterMeters[i]);
|
comboBoxes[k, i].Text = DEUtils.GetContent(colItems[k].Content, WaterMeters[i]);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case Ac.Set:
|
||||||
|
for (int i = 0; i < wmsCount; i++)
|
||||||
|
{
|
||||||
|
comboBoxes[k, i].Text = Strings.yes;
|
||||||
|
}
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -574,9 +626,13 @@ namespace TBF.Rig.DataEntry.Uni
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void clearButton_Click(object sender, EventArgs e)
|
private void commonCheckBox_CheckedChanged(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
InitializeBoxes();
|
bool state = (sender as CheckBox).Checked;
|
||||||
|
for (int i = 0; i < wmsCount; i++)
|
||||||
|
{
|
||||||
|
checkBoxes[i].Checked = state;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void okButton_Click(object sender, EventArgs e)
|
private void okButton_Click(object sender, EventArgs e)
|
||||||
@ -586,6 +642,78 @@ namespace TBF.Rig.DataEntry.Uni
|
|||||||
completed = true;
|
completed = true;
|
||||||
Close();
|
Close();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void clearButton_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
InitializeBoxes();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void autoSNButton_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
///
|
||||||
|
/// Find the 1st enabled water meter
|
||||||
|
///
|
||||||
|
int firstIx;
|
||||||
|
for (firstIx = 0; firstIx < wmsCount; firstIx++)
|
||||||
|
{
|
||||||
|
if (checkBoxes[firstIx].Checked) break;
|
||||||
|
}
|
||||||
|
if (firstIx == wmsCount)
|
||||||
|
{
|
||||||
|
return; /// There is not any enabled water meter
|
||||||
|
}
|
||||||
|
|
||||||
|
char[] digits = new char[] { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9' };
|
||||||
|
|
||||||
|
///
|
||||||
|
/// Find a column with serial numbers
|
||||||
|
///
|
||||||
|
for (int k = 0; k < colItems.Count; k++)
|
||||||
|
{
|
||||||
|
if ((colItems[k].Content == Ct.SerialNr || colItems[k].Content == Ct.SerialNrAux) && colItems[k].Action != Ac.LoadReadOnly)
|
||||||
|
{
|
||||||
|
///
|
||||||
|
/// Column with serial numbers found => perform an auto s/n assignment
|
||||||
|
///
|
||||||
|
string firstSN = comboBoxes[k, firstIx].Text;
|
||||||
|
|
||||||
|
int firstSnNr;
|
||||||
|
int startIx = firstSN.IndexOfAny(digits);
|
||||||
|
if (startIx >= 0)
|
||||||
|
{
|
||||||
|
int lastDigitPosPlus1 = startIx + 1;
|
||||||
|
var listOfDigits = new List<char>(digits);
|
||||||
|
while (lastDigitPosPlus1 < firstSN.Length && listOfDigits.Contains(firstSN[lastDigitPosPlus1]))
|
||||||
|
{
|
||||||
|
lastDigitPosPlus1++;
|
||||||
|
}
|
||||||
|
int digitsCount = lastDigitPosPlus1 - startIx;
|
||||||
|
|
||||||
|
if (int.TryParse(firstSN.Substring(startIx, digitsCount), out firstSnNr) && firstSnNr >= 0)
|
||||||
|
{
|
||||||
|
for (int ix = firstIx + 1; ix < wmsCount; ix++)
|
||||||
|
{
|
||||||
|
if (checkBoxes[ix].Checked)
|
||||||
|
{
|
||||||
|
firstSnNr++;
|
||||||
|
string newSN = firstSnNr.ToString();
|
||||||
|
int len = newSN.Length;
|
||||||
|
if (len <= digitsCount)
|
||||||
|
{
|
||||||
|
comboBoxes[k, ix].Text = firstSN.Substring(0, startIx + digitsCount - len) + newSN + firstSN.Substring(startIx + digitsCount);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
comboBoxes[k, ix].Text = firstSN.Substring(0, startIx) + newSN + firstSN.Substring(startIx + digitsCount); ;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private void comboBox_SelectedIndexChanged(object sndr, EventArgs e)
|
private void comboBox_SelectedIndexChanged(object sndr, EventArgs e)
|
||||||
{
|
{
|
||||||
if (!isHandlersEnabled) return;
|
if (!isHandlersEnabled) return;
|
||||||
@ -596,7 +724,7 @@ namespace TBF.Rig.DataEntry.Uni
|
|||||||
|
|
||||||
isHandlersEnabled = false;
|
isHandlersEnabled = false;
|
||||||
|
|
||||||
if (k >= 0 && comboBoxes[k, j].Text == comboBoxes[k, j].Items[0].ToString())
|
if (k >= 0 && colItems[k].Content != Ct.PrintLabel && comboBoxes[k, j].Text == comboBoxes[k, j].Items[0].ToString())
|
||||||
{
|
{
|
||||||
for (int i = 0; i < wmsCount; i++)
|
for (int i = 0; i < wmsCount; i++)
|
||||||
{
|
{
|
||||||
|
|||||||
11
TBF/Rig/DataEntry/Uni/CycleBgEnForm.designer.cs
generated
11
TBF/Rig/DataEntry/Uni/CycleBgEnForm.designer.cs
generated
@ -34,6 +34,7 @@ namespace TBF.Rig.DataEntry.Uni
|
|||||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(CycleBgEnForm));
|
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(CycleBgEnForm));
|
||||||
this.okButton = new System.Windows.Forms.Button();
|
this.okButton = new System.Windows.Forms.Button();
|
||||||
this.clearButton = new System.Windows.Forms.Button();
|
this.clearButton = new System.Windows.Forms.Button();
|
||||||
|
this.autoSNButton = new System.Windows.Forms.Button();
|
||||||
this.SuspendLayout();
|
this.SuspendLayout();
|
||||||
//
|
//
|
||||||
// okButton
|
// okButton
|
||||||
@ -52,11 +53,20 @@ namespace TBF.Rig.DataEntry.Uni
|
|||||||
this.clearButton.UseVisualStyleBackColor = true;
|
this.clearButton.UseVisualStyleBackColor = true;
|
||||||
this.clearButton.Click += new System.EventHandler(this.clearButton_Click);
|
this.clearButton.Click += new System.EventHandler(this.clearButton_Click);
|
||||||
//
|
//
|
||||||
|
// autoSNButton
|
||||||
|
//
|
||||||
|
resources.ApplyResources(this.autoSNButton, "autoSNButton");
|
||||||
|
this.autoSNButton.ForeColor = System.Drawing.Color.Black;
|
||||||
|
this.autoSNButton.Name = "autoSNButton";
|
||||||
|
this.autoSNButton.UseVisualStyleBackColor = true;
|
||||||
|
this.autoSNButton.Click += new System.EventHandler(this.autoSNButton_Click);
|
||||||
|
//
|
||||||
// CycleBgEnForm
|
// CycleBgEnForm
|
||||||
//
|
//
|
||||||
resources.ApplyResources(this, "$this");
|
resources.ApplyResources(this, "$this");
|
||||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||||
this.BackColor = System.Drawing.Color.DarkGray;
|
this.BackColor = System.Drawing.Color.DarkGray;
|
||||||
|
this.Controls.Add(this.autoSNButton);
|
||||||
this.Controls.Add(this.clearButton);
|
this.Controls.Add(this.clearButton);
|
||||||
this.Controls.Add(this.okButton);
|
this.Controls.Add(this.okButton);
|
||||||
this.ForeColor = System.Drawing.Color.Black;
|
this.ForeColor = System.Drawing.Color.Black;
|
||||||
@ -71,5 +81,6 @@ namespace TBF.Rig.DataEntry.Uni
|
|||||||
|
|
||||||
private System.Windows.Forms.Button okButton;
|
private System.Windows.Forms.Button okButton;
|
||||||
private System.Windows.Forms.Button clearButton;
|
private System.Windows.Forms.Button clearButton;
|
||||||
|
private System.Windows.Forms.Button autoSNButton;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -148,7 +148,7 @@
|
|||||||
<value>$this</value>
|
<value>$this</value>
|
||||||
</data>
|
</data>
|
||||||
<data name=">>okButton.ZOrder" xml:space="preserve">
|
<data name=">>okButton.ZOrder" xml:space="preserve">
|
||||||
<value>1</value>
|
<value>2</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="clearButton.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
|
<data name="clearButton.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
|
||||||
<value>Top, Right</value>
|
<value>Top, Right</value>
|
||||||
@ -181,6 +181,42 @@
|
|||||||
<value>$this</value>
|
<value>$this</value>
|
||||||
</data>
|
</data>
|
||||||
<data name=">>clearButton.ZOrder" xml:space="preserve">
|
<data name=">>clearButton.ZOrder" xml:space="preserve">
|
||||||
|
<value>1</value>
|
||||||
|
</data>
|
||||||
|
<data name="autoSNButton.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
|
||||||
|
<value>Top, Right</value>
|
||||||
|
</data>
|
||||||
|
<data name="autoSNButton.Font" type="System.Drawing.Font, System.Drawing">
|
||||||
|
<value>Verdana, 14.25pt</value>
|
||||||
|
</data>
|
||||||
|
<data name="autoSNButton.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
|
||||||
|
<value>NoControl</value>
|
||||||
|
</data>
|
||||||
|
<data name="autoSNButton.Location" type="System.Drawing.Point, System.Drawing">
|
||||||
|
<value>648, 26</value>
|
||||||
|
</data>
|
||||||
|
<data name="autoSNButton.Size" type="System.Drawing.Size, System.Drawing">
|
||||||
|
<value>112, 63</value>
|
||||||
|
</data>
|
||||||
|
<data name="autoSNButton.TabIndex" type="System.Int32, mscorlib">
|
||||||
|
<value>9</value>
|
||||||
|
</data>
|
||||||
|
<data name="autoSNButton.Text" xml:space="preserve">
|
||||||
|
<value>Auto s/n</value>
|
||||||
|
</data>
|
||||||
|
<data name="autoSNButton.Visible" type="System.Boolean, mscorlib">
|
||||||
|
<value>False</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>autoSNButton.Name" xml:space="preserve">
|
||||||
|
<value>autoSNButton</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>autoSNButton.Type" xml:space="preserve">
|
||||||
|
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>autoSNButton.Parent" xml:space="preserve">
|
||||||
|
<value>$this</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>autoSNButton.ZOrder" xml:space="preserve">
|
||||||
<value>0</value>
|
<value>0</value>
|
||||||
</data>
|
</data>
|
||||||
<metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
<metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
|
|||||||
@ -539,10 +539,13 @@ namespace TBF.Rig.DataEntry.Uni
|
|||||||
Ct.RadioAddress.ToDescription(),
|
Ct.RadioAddress.ToDescription(),
|
||||||
Ct.YearOfCalibration.ToDescription(),
|
Ct.YearOfCalibration.ToDescription(),
|
||||||
Ct.StartState.ToDescription(),
|
Ct.StartState.ToDescription(),
|
||||||
|
Ct.StartStateAux.ToDescription(),
|
||||||
Ct.EndState.ToDescription(),
|
Ct.EndState.ToDescription(),
|
||||||
|
Ct.EndStateAux.ToDescription(),
|
||||||
Ct.ArchivePath.ToDescription(),
|
Ct.ArchivePath.ToDescription(),
|
||||||
Ct.WmOrder.ToDescription(),
|
Ct.WmOrder.ToDescription(),
|
||||||
Ct.WmRemark.ToDescription(),
|
Ct.WmRemark.ToDescription(),
|
||||||
|
Ct.PrintLabel.ToDescription(),
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
case 2:
|
case 2:
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user