853 lines
43 KiB
C#
853 lines
43 KiB
C#
using System;
|
|
using System.Linq;
|
|
using System.Collections.Generic;
|
|
using System.ComponentModel;
|
|
using System.Drawing;
|
|
using System.Data;
|
|
using System.Text;
|
|
using System.Windows.Forms;
|
|
|
|
using INT63DC_2C.Forms;
|
|
using INT63DC_2C.DialogForms;
|
|
using INT63DC_ImageDll;
|
|
|
|
namespace INT63DC_2C.Controls
|
|
{
|
|
public partial class ControlDynamicSetting : UserControl
|
|
{
|
|
#region Field
|
|
private FormSystemSetting m_ParentForm;
|
|
#endregion
|
|
|
|
#region Constructor
|
|
public ControlDynamicSetting(FormSystemSetting parent)
|
|
{
|
|
InitializeComponent();
|
|
|
|
this.ParentForm = parent;
|
|
|
|
this.InitializeDesign();
|
|
this.DefaultSetting();
|
|
}
|
|
#endregion
|
|
|
|
#region Property
|
|
public FormSystemSetting ParentForm
|
|
{
|
|
get { return this.m_ParentForm; }
|
|
set { this.m_ParentForm = value; }
|
|
}
|
|
#endregion
|
|
|
|
#region Method
|
|
private void InitializeDesign()
|
|
{
|
|
ImageDll images = new ImageDll();
|
|
Font font = new Font("New Gulim", 8F, FontStyle.Regular);
|
|
|
|
if (this.ParentForm.ParentForm.SystemConfig.Language == DataStore.LanguageID.Korean)
|
|
{
|
|
|
|
}
|
|
else if (this.ParentForm.ParentForm.SystemConfig.Language == DataStore.LanguageID.English)
|
|
{
|
|
this.smartGroupBox1.Text = "DynamicCorrection";
|
|
this.labelStaticForcedZeroDelayTime.Text = "Forced zero delay";
|
|
this.labelStaticEntryGateDelayTime.Text = "Entry gate delay";
|
|
this.labelStaticEntryGateRunTime.Text = "Entry gate run";
|
|
this.labelStaticDischargeStopperDelayTime.Text = "Discharge stopper delay";
|
|
this.labelStaticDischargeStopperRunTime.Text = "Discharge stopper run";
|
|
}
|
|
else if (this.ParentForm.ParentForm.SystemConfig.Language == DataStore.LanguageID.Chinese)
|
|
{
|
|
this.smartGroupBox1.Text = "动态校正";
|
|
this.labelStaticForcedZeroDelayTime.Text = "零延迟时间";
|
|
|
|
this.labelStaticEntryGateDelayTime.Text = "料门延迟时间";
|
|
this.labelStaticEntryGateRunTime.Text = "料门动作时间";
|
|
this.labelStaticDischargeStopperDelayTime.Text = "出料限位器延迟时间";
|
|
this.labelStaticDischargeStopperRunTime.Text = "出料限位器动作时间";
|
|
|
|
this.label1.Text = "列 1";
|
|
this.label2.Text = "列 2";
|
|
this.label3.Text = "列 3";
|
|
this.label4.Text = "列 4";
|
|
this.label5.Text = "列 5";
|
|
this.label6.Text = "列 6";
|
|
this.label7.Text = "列 7";
|
|
this.label8.Text = "列 8";
|
|
this.label9.Text = "列 9";
|
|
this.label10.Text = "列 10";
|
|
this.label11.Text = "列 11";
|
|
this.label12.Text = "列 12";
|
|
this.label13.Text = "列 13";
|
|
this.label14.Text = "列 14";
|
|
this.label15.Text = "列 15";
|
|
this.label16.Text = "列 16";
|
|
}
|
|
else if (this.ParentForm.ParentForm.SystemConfig.Language == DataStore.LanguageID.Czech)
|
|
{
|
|
this.smartGroupBox1.Text = "Dynamická korekce";
|
|
this.labelStaticForcedZeroDelayTime.Font = font;
|
|
this.labelStaticForcedZeroDelayTime.Text = "Vynucená nulového zpoždění";
|
|
|
|
this.labelStaticEntryGateDelayTime.Text = "zpoždění vstupní brány";
|
|
this.labelStaticEntryGateRunTime.Text = "Provozní vjezdové brány";
|
|
this.labelStaticDischargeStopperDelayTime.Text = "zpoždění vybíjecí zátky";
|
|
this.labelStaticDischargeStopperRunTime.Text = "provozu vypouštěcí zátky";
|
|
|
|
this.label1.Text = "Linka 1";
|
|
this.label2.Text = "Linka 2";
|
|
this.label3.Text = "Linka 3";
|
|
this.label4.Text = "Linka 4";
|
|
this.label5.Text = "Linka 5";
|
|
this.label6.Text = "Linka 6";
|
|
this.label7.Text = "Linka 7";
|
|
this.label8.Text = "Linka 8";
|
|
this.label9.Text = "Linka 9";
|
|
this.label10.Text = "Linka 10";
|
|
this.label11.Text = "Linka 11";
|
|
this.label12.Text = "Linka 12";
|
|
this.label13.Text = "Linka 13";
|
|
this.label14.Text = "Linka 14";
|
|
this.label15.Text = "Linka 15";
|
|
this.label16.Text = "Linka 16";
|
|
}
|
|
else if (this.ParentForm.ParentForm.SystemConfig.Language == DataStore.LanguageID.German)
|
|
{
|
|
this.smartGroupBox1.Text = "Dynamische Konstante";
|
|
this.labelStaticForcedZeroDelayTime.Font = font;
|
|
this.labelStaticForcedZeroDelayTime.Text = "Erzwungene Null-Verzögerungszeit";
|
|
|
|
this.labelStaticEntryGateDelayTime.Font = font;
|
|
this.labelStaticEntryGateDelayTime.Text = "Verzögerungszeit Eingangstors";
|
|
this.labelStaticEntryGateRunTime.Font = font;
|
|
this.labelStaticEntryGateRunTime.Text = "Einfahrtstor Betriebszeit";
|
|
this.labelStaticDischargeStopperDelayTime.Font = font;
|
|
this.labelStaticDischargeStopperDelayTime.Text = "Verzögerungszeit Entladestoppers";
|
|
this.labelStaticDischargeStopperRunTime.Font = font;
|
|
this.labelStaticDischargeStopperRunTime.Text = "Betriebszeit Entladungsstoppers";
|
|
|
|
this.label1.Text = "Reihe 1";
|
|
this.label2.Text = "Reihe 2";
|
|
this.label3.Text = "Reihe 3";
|
|
this.label4.Text = "Reihe 4";
|
|
this.label5.Text = "Reihe 5";
|
|
this.label6.Text = "Reihe 6";
|
|
this.label7.Text = "Reihe 7";
|
|
this.label8.Text = "Reihe 8";
|
|
this.label9.Text = "Reihe 9";
|
|
this.label10.Text = "Reihe 10";
|
|
this.label11.Text = "Reihe 11";
|
|
this.label12.Text = "Reihe 12";
|
|
this.label13.Text = "Reihe 13";
|
|
this.label14.Text = "Reihe 14";
|
|
this.label15.Text = "Reihe 15";
|
|
this.label16.Text = "Reihe 16";
|
|
}
|
|
else if (this.ParentForm.ParentForm.SystemConfig.Language == DataStore.LanguageID.Japanese)
|
|
{
|
|
this.smartGroupBox1.Text = "動的定数";
|
|
this.labelStaticForcedZeroDelayTime.Text = "強制ゼロ遅延時間";
|
|
this.labelStaticEntryGateDelayTime.Text = "エントリーゲートの遅延時間";
|
|
this.labelStaticEntryGateRunTime.Text = "エントリーゲートの運転時間";
|
|
this.labelStaticDischargeStopperDelayTime.Text = "排出ストッパーの遅延時間";
|
|
this.labelStaticDischargeStopperRunTime.Text = "排出ストッパーの運転時間";
|
|
}
|
|
else
|
|
{
|
|
|
|
}
|
|
}
|
|
private void DefaultSetting()
|
|
{
|
|
if (this.ParentForm.ParentForm.SystemConfig.EquipmentColumns >= 2)
|
|
{
|
|
this.label1.Visible = true;
|
|
this.label2.Visible = true;
|
|
this.labelDynamicCorrection1.Visible = true;
|
|
this.labelDynamicCorrection2.Visible = true;
|
|
}
|
|
if (this.ParentForm.ParentForm.SystemConfig.EquipmentColumns >= 3)
|
|
{
|
|
this.label3.Visible = true;
|
|
this.labelDynamicCorrection3.Visible = true;
|
|
}
|
|
if (this.ParentForm.ParentForm.SystemConfig.EquipmentColumns >= 4)
|
|
{
|
|
this.label4.Visible = true;
|
|
this.labelDynamicCorrection4.Visible = true;
|
|
}
|
|
if (this.ParentForm.ParentForm.SystemConfig.EquipmentColumns >= 5)
|
|
{
|
|
this.label5.Visible = true;
|
|
this.labelDynamicCorrection5.Visible = true;
|
|
}
|
|
if (this.ParentForm.ParentForm.SystemConfig.EquipmentColumns >= 6)
|
|
{
|
|
this.label6.Visible = true;
|
|
this.labelDynamicCorrection6.Visible = true;
|
|
}
|
|
if (this.ParentForm.ParentForm.SystemConfig.EquipmentColumns >= 7)
|
|
{
|
|
this.label7.Visible = true;
|
|
this.labelDynamicCorrection7.Visible = true;
|
|
}
|
|
if (this.ParentForm.ParentForm.SystemConfig.EquipmentColumns >= 8)
|
|
{
|
|
this.label8.Visible = true;
|
|
this.labelDynamicCorrection8.Visible = true;
|
|
}
|
|
if (this.ParentForm.ParentForm.SystemConfig.EquipmentColumns >= 9)
|
|
{
|
|
this.label9.Visible = true;
|
|
this.labelDynamicCorrection9.Visible = true;
|
|
}
|
|
if (this.ParentForm.ParentForm.SystemConfig.EquipmentColumns >= 10)
|
|
{
|
|
this.label10.Visible = true;
|
|
this.labelDynamicCorrection10.Visible = true;
|
|
}
|
|
if (this.ParentForm.ParentForm.SystemConfig.EquipmentColumns >= 11)
|
|
{
|
|
this.label11.Visible = true;
|
|
this.labelDynamicCorrection11.Visible = true;
|
|
}
|
|
if (this.ParentForm.ParentForm.SystemConfig.EquipmentColumns >= 12)
|
|
{
|
|
this.label12.Visible = true;
|
|
this.labelDynamicCorrection12.Visible = true;
|
|
}
|
|
if (this.ParentForm.ParentForm.SystemConfig.EquipmentColumns >= 16)
|
|
{
|
|
this.label13.Visible = true;
|
|
this.labelDynamicCorrection13.Visible = true;
|
|
this.label14.Visible = true;
|
|
this.labelDynamicCorrection14.Visible = true;
|
|
this.label15.Visible = true;
|
|
this.labelDynamicCorrection15.Visible = true;
|
|
this.label16.Visible = true;
|
|
this.labelDynamicCorrection16.Visible = true;
|
|
}
|
|
}
|
|
|
|
private void UpdateDisplayDynamicCorrection(JudgmentSetItem item)
|
|
{
|
|
string sValue = "";
|
|
|
|
if (item == null)
|
|
return;
|
|
|
|
// 강제영점 지연시간
|
|
sValue = item.ForcedZeroDelayTime.ToString();
|
|
if (this.labelForcedZeroDelayTime.Text != sValue)
|
|
this.labelForcedZeroDelayTime.Text = sValue;
|
|
|
|
// 진입게이트 지연시간
|
|
sValue = item.EntryGateDelayTime.ToString();
|
|
if (this.labelEntryGateDelayTime.Text != sValue)
|
|
this.labelEntryGateDelayTime.Text = sValue;
|
|
|
|
// 진입게이트 동작시간
|
|
sValue = item.EntryGateRunTime.ToString();
|
|
if (this.labelEntryGateRunTime.Text != sValue)
|
|
this.labelEntryGateRunTime.Text = sValue;
|
|
|
|
// 배출스토퍼 지연시간
|
|
sValue = item.DischargeStopperDelayTime.ToString();
|
|
if (this.labelDischargeStopperDelayTime.Text != sValue)
|
|
this.labelDischargeStopperDelayTime.Text = sValue;
|
|
|
|
// 배출스토퍼 동작시간
|
|
sValue = item.DischargeStopperRunTime.ToString();
|
|
if (this.labelDischargeStopperRunTime.Text != sValue)
|
|
this.labelDischargeStopperRunTime.Text = sValue;
|
|
|
|
this.labelDynamicCorrection1.Text = string.Format(string.Format("{0:f6}", item.DynamicCorrection1));
|
|
this.labelDynamicCorrection2.Text = string.Format(string.Format("{0:f6}", item.DynamicCorrection2));
|
|
this.labelDynamicCorrection3.Text = string.Format(string.Format("{0:f6}", item.DynamicCorrection3));
|
|
this.labelDynamicCorrection4.Text = string.Format(string.Format("{0:f6}", item.DynamicCorrection4));
|
|
this.labelDynamicCorrection5.Text = string.Format(string.Format("{0:f6}", item.DynamicCorrection5));
|
|
this.labelDynamicCorrection6.Text = string.Format(string.Format("{0:f6}", item.DynamicCorrection6));
|
|
this.labelDynamicCorrection7.Text = string.Format(string.Format("{0:f6}", item.DynamicCorrection7));
|
|
this.labelDynamicCorrection8.Text = string.Format(string.Format("{0:f6}", item.DynamicCorrection8));
|
|
this.labelDynamicCorrection9.Text = string.Format(string.Format("{0:f6}", item.DynamicCorrection9));
|
|
this.labelDynamicCorrection10.Text = string.Format(string.Format("{0:f6}", item.DynamicCorrection10));
|
|
this.labelDynamicCorrection11.Text = string.Format(string.Format("{0:f6}", item.DynamicCorrection11));
|
|
this.labelDynamicCorrection12.Text = string.Format(string.Format("{0:f6}", item.DynamicCorrection12));
|
|
this.labelDynamicCorrection13.Text = string.Format(string.Format("{0:f6}", item.DynamicCorrection13));
|
|
this.labelDynamicCorrection14.Text = string.Format(string.Format("{0:f6}", item.DynamicCorrection14));
|
|
this.labelDynamicCorrection15.Text = string.Format(string.Format("{0:f6}", item.DynamicCorrection15));
|
|
this.labelDynamicCorrection16.Text = string.Format(string.Format("{0:f6}", item.DynamicCorrection16));
|
|
}
|
|
|
|
public void DisplayRefresh(JudgmentSetItem item)
|
|
{
|
|
this.UpdateDisplayDynamicCorrection(item);
|
|
}
|
|
#endregion
|
|
|
|
#region Event Handler
|
|
private void labelForcedZeroDelayTime_Click(object sender, EventArgs e)
|
|
{
|
|
string value = "";
|
|
DialogFormNumKeyPad myKeyPad = new DialogFormNumKeyPad(this.labelForcedZeroDelayTime.Text, 4, 0, false, this.ParentForm.ParentForm.SystemConfig.Language);
|
|
|
|
if (myKeyPad.ShowDialog() == DialogResult.OK)
|
|
{
|
|
if (myKeyPad.doubleValue < 0 || myKeyPad.doubleValue > 9999)
|
|
{
|
|
// 입력범위를 확인하세요
|
|
DialogFormMessage myMsg = new DialogFormMessage(1, this.ParentForm.ParentForm.SystemConfig.Language);
|
|
myMsg.ShowDialog();
|
|
}
|
|
else
|
|
{
|
|
this.labelForcedZeroDelayTime.Text = myKeyPad.StringValue;
|
|
this.ParentForm.SelectedJudgmentSetItem.ForcedZeroDelayTime = myKeyPad.IntValue;
|
|
|
|
value = Helper.StringZeroFillDigits4(this.labelForcedZeroDelayTime.Text);
|
|
this.ParentForm.ParentForm.TransferDataStream(CommunicationCommand.Write, CommunicationID.MainBoard, CommunicationAddress._4501_ForcedZeroDelayTime, value);
|
|
|
|
this.ParentForm.ParentForm.SaveJudgmentSetFile(this.ParentForm.SelectedJudgmentSetItem, this.ParentForm.SelectedProductNo - 1);
|
|
}
|
|
}
|
|
}
|
|
|
|
private void labelDynamicCorrection1_Click(object sender, EventArgs e)
|
|
{
|
|
string value = "";
|
|
DialogFormNumKeyPad myKeyPad = new DialogFormNumKeyPad(this.labelDynamicCorrection1.Text, 7, 6, false, this.ParentForm.ParentForm.SystemConfig.Language);
|
|
|
|
if (myKeyPad.ShowDialog() == DialogResult.OK)
|
|
{
|
|
if (myKeyPad.doubleValue < 0.500000 || myKeyPad.doubleValue > 2.000000)
|
|
{
|
|
// 입력범위를 확인하세요
|
|
DialogFormMessage myMsg = new DialogFormMessage(1, this.ParentForm.ParentForm.SystemConfig.Language);
|
|
myMsg.ShowDialog();
|
|
}
|
|
else
|
|
{
|
|
this.labelDynamicCorrection1.Text = myKeyPad.StringValue;
|
|
this.ParentForm.SelectedJudgmentSetItem.DynamicCorrection1 = myKeyPad.doubleValue;
|
|
|
|
value = string.Format("{0:f6}", this.labelDynamicCorrection1.Text);
|
|
value = value.Remove(1, 1);
|
|
value = Helper.StringZeroFillDigits7(value);
|
|
this.ParentForm.ParentForm.TransferDataStream(CommunicationCommand.Write, CommunicationID.SubBoard1, CommunicationAddress._5006_DynamicCorrection, value);
|
|
|
|
this.ParentForm.ParentForm.SaveDynamicCorrectionFile(this.ParentForm.SelectedJudgmentSetItem, this.ParentForm.SelectedProductNo - 1);
|
|
}
|
|
}
|
|
}
|
|
private void labelDynamicCorrection2_Click(object sender, EventArgs e)
|
|
{
|
|
string value = "";
|
|
DialogFormNumKeyPad myKeyPad = new DialogFormNumKeyPad(this.labelDynamicCorrection2.Text, 7, 6, false, this.ParentForm.ParentForm.SystemConfig.Language);
|
|
|
|
if (myKeyPad.ShowDialog() == DialogResult.OK)
|
|
{
|
|
if (myKeyPad.doubleValue < 0.500000 || myKeyPad.doubleValue > 2.000000)
|
|
{
|
|
// 입력범위를 확인하세요
|
|
DialogFormMessage myMsg = new DialogFormMessage(1, this.ParentForm.ParentForm.SystemConfig.Language);
|
|
myMsg.ShowDialog();
|
|
}
|
|
else
|
|
{
|
|
this.labelDynamicCorrection2.Text = myKeyPad.StringValue;
|
|
this.ParentForm.SelectedJudgmentSetItem.DynamicCorrection2 = myKeyPad.doubleValue;
|
|
|
|
value = string.Format("{0:f6}", this.labelDynamicCorrection2.Text);
|
|
value = value.Remove(1, 1);
|
|
value = Helper.StringZeroFillDigits7(value);
|
|
this.ParentForm.ParentForm.TransferDataStream(CommunicationCommand.Write, CommunicationID.SubBoard2, CommunicationAddress._5006_DynamicCorrection, value);
|
|
|
|
this.ParentForm.ParentForm.SaveDynamicCorrectionFile(this.ParentForm.SelectedJudgmentSetItem, this.ParentForm.SelectedProductNo - 1);
|
|
}
|
|
}
|
|
}
|
|
private void labelDynamicCorrection3_Click(object sender, EventArgs e)
|
|
{
|
|
string value = "";
|
|
DialogFormNumKeyPad myKeyPad = new DialogFormNumKeyPad(this.labelDynamicCorrection3.Text, 7, 6, false, this.ParentForm.ParentForm.SystemConfig.Language);
|
|
|
|
if (myKeyPad.ShowDialog() == DialogResult.OK)
|
|
{
|
|
if (myKeyPad.doubleValue < 0.500000 || myKeyPad.doubleValue > 2.000000)
|
|
{
|
|
// 입력범위를 확인하세요
|
|
DialogFormMessage myMsg = new DialogFormMessage(1, this.ParentForm.ParentForm.SystemConfig.Language);
|
|
myMsg.ShowDialog();
|
|
}
|
|
else
|
|
{
|
|
this.labelDynamicCorrection3.Text = myKeyPad.StringValue;
|
|
this.ParentForm.SelectedJudgmentSetItem.DynamicCorrection3 = myKeyPad.doubleValue;
|
|
|
|
value = string.Format("{0:f6}", this.labelDynamicCorrection3.Text);
|
|
value = value.Remove(1, 1);
|
|
value = Helper.StringZeroFillDigits7(value);
|
|
this.ParentForm.ParentForm.TransferDataStream(CommunicationCommand.Write, CommunicationID.SubBoard3, CommunicationAddress._5006_DynamicCorrection, value);
|
|
|
|
this.ParentForm.ParentForm.SaveDynamicCorrectionFile(this.ParentForm.SelectedJudgmentSetItem, this.ParentForm.SelectedProductNo - 1);
|
|
}
|
|
}
|
|
}
|
|
private void labelDynamicCorrection4_Click(object sender, EventArgs e)
|
|
{
|
|
string value = "";
|
|
DialogFormNumKeyPad myKeyPad = new DialogFormNumKeyPad(this.labelDynamicCorrection4.Text, 7, 6, false, this.ParentForm.ParentForm.SystemConfig.Language);
|
|
|
|
if (myKeyPad.ShowDialog() == DialogResult.OK)
|
|
{
|
|
if (myKeyPad.doubleValue < 0.500000 || myKeyPad.doubleValue > 2.000000)
|
|
{
|
|
// 입력범위를 확인하세요
|
|
DialogFormMessage myMsg = new DialogFormMessage(1, this.ParentForm.ParentForm.SystemConfig.Language);
|
|
myMsg.ShowDialog();
|
|
}
|
|
else
|
|
{
|
|
this.labelDynamicCorrection4.Text = myKeyPad.StringValue;
|
|
this.ParentForm.SelectedJudgmentSetItem.DynamicCorrection4 = myKeyPad.doubleValue;
|
|
|
|
value = string.Format("{0:f6}", this.labelDynamicCorrection4.Text);
|
|
value = value.Remove(1, 1);
|
|
value = Helper.StringZeroFillDigits7(value);
|
|
this.ParentForm.ParentForm.TransferDataStream(CommunicationCommand.Write, CommunicationID.SubBoard4, CommunicationAddress._5006_DynamicCorrection, value);
|
|
|
|
this.ParentForm.ParentForm.SaveDynamicCorrectionFile(this.ParentForm.SelectedJudgmentSetItem, this.ParentForm.SelectedProductNo - 1);
|
|
}
|
|
}
|
|
}
|
|
private void labelDynamicCorrection5_Click(object sender, EventArgs e)
|
|
{
|
|
string value = "";
|
|
DialogFormNumKeyPad myKeyPad = new DialogFormNumKeyPad(this.labelDynamicCorrection5.Text, 7, 6, false, this.ParentForm.ParentForm.SystemConfig.Language);
|
|
|
|
if (myKeyPad.ShowDialog() == DialogResult.OK)
|
|
{
|
|
if (myKeyPad.doubleValue < 0.500000 || myKeyPad.doubleValue > 2.000000)
|
|
{
|
|
// 입력범위를 확인하세요
|
|
DialogFormMessage myMsg = new DialogFormMessage(1, this.ParentForm.ParentForm.SystemConfig.Language);
|
|
myMsg.ShowDialog();
|
|
}
|
|
else
|
|
{
|
|
this.labelDynamicCorrection5.Text = myKeyPad.StringValue;
|
|
this.ParentForm.SelectedJudgmentSetItem.DynamicCorrection5 = myKeyPad.doubleValue;
|
|
|
|
value = string.Format("{0:f6}", this.labelDynamicCorrection5.Text);
|
|
value = value.Remove(1, 1);
|
|
value = Helper.StringZeroFillDigits7(value);
|
|
this.ParentForm.ParentForm.TransferDataStream(CommunicationCommand.Write, CommunicationID.SubBoard5, CommunicationAddress._5006_DynamicCorrection, value);
|
|
|
|
this.ParentForm.ParentForm.SaveDynamicCorrectionFile(this.ParentForm.SelectedJudgmentSetItem, this.ParentForm.SelectedProductNo - 1);
|
|
}
|
|
}
|
|
}
|
|
private void labelDynamicCorrection6_Click(object sender, EventArgs e)
|
|
{
|
|
string value = "";
|
|
DialogFormNumKeyPad myKeyPad = new DialogFormNumKeyPad(this.labelDynamicCorrection6.Text, 7, 6, false, this.ParentForm.ParentForm.SystemConfig.Language);
|
|
|
|
if (myKeyPad.ShowDialog() == DialogResult.OK)
|
|
{
|
|
if (myKeyPad.doubleValue < 0.500000 || myKeyPad.doubleValue > 2.000000)
|
|
{
|
|
// 입력범위를 확인하세요
|
|
DialogFormMessage myMsg = new DialogFormMessage(1, this.ParentForm.ParentForm.SystemConfig.Language);
|
|
myMsg.ShowDialog();
|
|
}
|
|
else
|
|
{
|
|
this.labelDynamicCorrection6.Text = myKeyPad.StringValue;
|
|
this.ParentForm.SelectedJudgmentSetItem.DynamicCorrection6 = myKeyPad.doubleValue;
|
|
|
|
value = string.Format("{0:f6}", this.labelDynamicCorrection6.Text);
|
|
value = value.Remove(1, 1);
|
|
value = Helper.StringZeroFillDigits7(value);
|
|
this.ParentForm.ParentForm.TransferDataStream(CommunicationCommand.Write, CommunicationID.SubBoard6, CommunicationAddress._5006_DynamicCorrection, value);
|
|
|
|
this.ParentForm.ParentForm.SaveDynamicCorrectionFile(this.ParentForm.SelectedJudgmentSetItem, this.ParentForm.SelectedProductNo - 1);
|
|
}
|
|
}
|
|
}
|
|
private void labelDynamicCorrection7_Click(object sender, EventArgs e)
|
|
{
|
|
string value = "";
|
|
DialogFormNumKeyPad myKeyPad = new DialogFormNumKeyPad(this.labelDynamicCorrection7.Text, 7, 6, false, this.ParentForm.ParentForm.SystemConfig.Language);
|
|
|
|
if (myKeyPad.ShowDialog() == DialogResult.OK)
|
|
{
|
|
if (myKeyPad.doubleValue < 0.500000 || myKeyPad.doubleValue > 2.000000)
|
|
{
|
|
// 입력범위를 확인하세요
|
|
DialogFormMessage myMsg = new DialogFormMessage(1, this.ParentForm.ParentForm.SystemConfig.Language);
|
|
myMsg.ShowDialog();
|
|
}
|
|
else
|
|
{
|
|
this.labelDynamicCorrection7.Text = myKeyPad.StringValue;
|
|
this.ParentForm.SelectedJudgmentSetItem.DynamicCorrection7 = myKeyPad.doubleValue;
|
|
|
|
value = string.Format("{0:f6}", this.labelDynamicCorrection7.Text);
|
|
value = value.Remove(1, 1);
|
|
value = Helper.StringZeroFillDigits7(value);
|
|
this.ParentForm.ParentForm.TransferDataStream(CommunicationCommand.Write, CommunicationID.SubBoard7, CommunicationAddress._5006_DynamicCorrection, value);
|
|
|
|
this.ParentForm.ParentForm.SaveDynamicCorrectionFile(this.ParentForm.SelectedJudgmentSetItem, this.ParentForm.SelectedProductNo - 1);
|
|
}
|
|
}
|
|
}
|
|
private void labelDynamicCorrection8_Click(object sender, EventArgs e)
|
|
{
|
|
string value = "";
|
|
DialogFormNumKeyPad myKeyPad = new DialogFormNumKeyPad(this.labelDynamicCorrection8.Text, 7, 6, false, this.ParentForm.ParentForm.SystemConfig.Language);
|
|
|
|
if (myKeyPad.ShowDialog() == DialogResult.OK)
|
|
{
|
|
if (myKeyPad.doubleValue < 0.500000 || myKeyPad.doubleValue > 2.000000)
|
|
{
|
|
// 입력범위를 확인하세요
|
|
DialogFormMessage myMsg = new DialogFormMessage(1, this.ParentForm.ParentForm.SystemConfig.Language);
|
|
myMsg.ShowDialog();
|
|
}
|
|
else
|
|
{
|
|
this.labelDynamicCorrection8.Text = myKeyPad.StringValue;
|
|
this.ParentForm.SelectedJudgmentSetItem.DynamicCorrection8 = myKeyPad.doubleValue;
|
|
|
|
value = string.Format("{0:f6}", this.labelDynamicCorrection8.Text);
|
|
value = value.Remove(1, 1);
|
|
value = Helper.StringZeroFillDigits7(value);
|
|
this.ParentForm.ParentForm.TransferDataStream(CommunicationCommand.Write, CommunicationID.SubBoard8, CommunicationAddress._5006_DynamicCorrection, value);
|
|
|
|
this.ParentForm.ParentForm.SaveDynamicCorrectionFile(this.ParentForm.SelectedJudgmentSetItem, this.ParentForm.SelectedProductNo - 1);
|
|
}
|
|
}
|
|
}
|
|
private void labelDynamicCorrection9_Click(object sender, EventArgs e)
|
|
{
|
|
string value = "";
|
|
DialogFormNumKeyPad myKeyPad = new DialogFormNumKeyPad(this.labelDynamicCorrection9.Text, 7, 6, false, this.ParentForm.ParentForm.SystemConfig.Language);
|
|
|
|
if (myKeyPad.ShowDialog() == DialogResult.OK)
|
|
{
|
|
if (myKeyPad.doubleValue < 0.500000 || myKeyPad.doubleValue > 2.000000)
|
|
{
|
|
// 입력범위를 확인하세요
|
|
DialogFormMessage myMsg = new DialogFormMessage(1, this.ParentForm.ParentForm.SystemConfig.Language);
|
|
myMsg.ShowDialog();
|
|
}
|
|
else
|
|
{
|
|
this.labelDynamicCorrection9.Text = myKeyPad.StringValue;
|
|
this.ParentForm.SelectedJudgmentSetItem.DynamicCorrection9 = myKeyPad.doubleValue;
|
|
|
|
value = string.Format("{0:f6}", this.labelDynamicCorrection9.Text);
|
|
value = value.Remove(1, 1);
|
|
value = Helper.StringZeroFillDigits7(value);
|
|
this.ParentForm.ParentForm.TransferDataStream(CommunicationCommand.Write, CommunicationID.SubBoard9, CommunicationAddress._5006_DynamicCorrection, value);
|
|
|
|
this.ParentForm.ParentForm.SaveDynamicCorrectionFile(this.ParentForm.SelectedJudgmentSetItem, this.ParentForm.SelectedProductNo - 1);
|
|
}
|
|
}
|
|
}
|
|
private void labelDynamicCorrection10_Click(object sender, EventArgs e)
|
|
{
|
|
string value = "";
|
|
DialogFormNumKeyPad myKeyPad = new DialogFormNumKeyPad(this.labelDynamicCorrection10.Text, 7, 6, false, this.ParentForm.ParentForm.SystemConfig.Language);
|
|
|
|
if (myKeyPad.ShowDialog() == DialogResult.OK)
|
|
{
|
|
if (myKeyPad.doubleValue < 0.500000 || myKeyPad.doubleValue > 2.000000)
|
|
{
|
|
// 입력범위를 확인하세요
|
|
DialogFormMessage myMsg = new DialogFormMessage(1, this.ParentForm.ParentForm.SystemConfig.Language);
|
|
myMsg.ShowDialog();
|
|
}
|
|
else
|
|
{
|
|
this.labelDynamicCorrection10.Text = myKeyPad.StringValue;
|
|
this.ParentForm.SelectedJudgmentSetItem.DynamicCorrection10 = myKeyPad.doubleValue;
|
|
|
|
value = string.Format("{0:f6}", this.labelDynamicCorrection10.Text);
|
|
value = value.Remove(1, 1);
|
|
value = Helper.StringZeroFillDigits7(value);
|
|
this.ParentForm.ParentForm.TransferDataStream(CommunicationCommand.Write, CommunicationID.SubBoard10, CommunicationAddress._5006_DynamicCorrection, value);
|
|
|
|
this.ParentForm.ParentForm.SaveDynamicCorrectionFile(this.ParentForm.SelectedJudgmentSetItem, this.ParentForm.SelectedProductNo - 1);
|
|
}
|
|
}
|
|
}
|
|
private void labelDynamicCorrection11_Click(object sender, EventArgs e)
|
|
{
|
|
string value = "";
|
|
DialogFormNumKeyPad myKeyPad = new DialogFormNumKeyPad(this.labelDynamicCorrection11.Text, 7, 6, false, this.ParentForm.ParentForm.SystemConfig.Language);
|
|
|
|
if (myKeyPad.ShowDialog() == DialogResult.OK)
|
|
{
|
|
if (myKeyPad.doubleValue < 0.500000 || myKeyPad.doubleValue > 2.000000)
|
|
{
|
|
// 입력범위를 확인하세요
|
|
DialogFormMessage myMsg = new DialogFormMessage(1, this.ParentForm.ParentForm.SystemConfig.Language);
|
|
myMsg.ShowDialog();
|
|
}
|
|
else
|
|
{
|
|
this.labelDynamicCorrection11.Text = myKeyPad.StringValue;
|
|
this.ParentForm.SelectedJudgmentSetItem.DynamicCorrection11 = myKeyPad.doubleValue;
|
|
|
|
value = string.Format("{0:f6}", this.labelDynamicCorrection11.Text);
|
|
value = value.Remove(1, 1);
|
|
value = Helper.StringZeroFillDigits7(value);
|
|
this.ParentForm.ParentForm.TransferDataStream(CommunicationCommand.Write, CommunicationID.SubBoard11, CommunicationAddress._5006_DynamicCorrection, value);
|
|
|
|
this.ParentForm.ParentForm.SaveDynamicCorrectionFile(this.ParentForm.SelectedJudgmentSetItem, this.ParentForm.SelectedProductNo - 1);
|
|
}
|
|
}
|
|
}
|
|
private void labelDynamicCorrection12_Click(object sender, EventArgs e)
|
|
{
|
|
string value = "";
|
|
DialogFormNumKeyPad myKeyPad = new DialogFormNumKeyPad(this.labelDynamicCorrection12.Text, 7, 6, false, this.ParentForm.ParentForm.SystemConfig.Language);
|
|
|
|
if (myKeyPad.ShowDialog() == DialogResult.OK)
|
|
{
|
|
if (myKeyPad.doubleValue < 0.500000 || myKeyPad.doubleValue > 2.000000)
|
|
{
|
|
// 입력범위를 확인하세요
|
|
DialogFormMessage myMsg = new DialogFormMessage(1, this.ParentForm.ParentForm.SystemConfig.Language);
|
|
myMsg.ShowDialog();
|
|
}
|
|
else
|
|
{
|
|
this.labelDynamicCorrection12.Text = myKeyPad.StringValue;
|
|
this.ParentForm.SelectedJudgmentSetItem.DynamicCorrection12 = myKeyPad.doubleValue;
|
|
|
|
value = string.Format("{0:f6}", this.labelDynamicCorrection12.Text);
|
|
value = value.Remove(1, 1);
|
|
value = Helper.StringZeroFillDigits7(value);
|
|
this.ParentForm.ParentForm.TransferDataStream(CommunicationCommand.Write, CommunicationID.SubBoard12, CommunicationAddress._5006_DynamicCorrection, value);
|
|
|
|
this.ParentForm.ParentForm.SaveDynamicCorrectionFile(this.ParentForm.SelectedJudgmentSetItem, this.ParentForm.SelectedProductNo - 1);
|
|
}
|
|
}
|
|
}
|
|
private void labelDynamicCorrection13_Click(object sender, EventArgs e)
|
|
{
|
|
string value = "";
|
|
DialogFormNumKeyPad myKeyPad = new DialogFormNumKeyPad(this.labelDynamicCorrection13.Text, 7, 6, false, this.ParentForm.ParentForm.SystemConfig.Language);
|
|
|
|
if (myKeyPad.ShowDialog() == DialogResult.OK)
|
|
{
|
|
if (myKeyPad.doubleValue < 0.500000 || myKeyPad.doubleValue > 2.000000)
|
|
{
|
|
// 입력범위를 확인하세요
|
|
DialogFormMessage myMsg = new DialogFormMessage(1, this.ParentForm.ParentForm.SystemConfig.Language);
|
|
myMsg.ShowDialog();
|
|
}
|
|
else
|
|
{
|
|
this.labelDynamicCorrection13.Text = myKeyPad.StringValue;
|
|
this.ParentForm.SelectedJudgmentSetItem.DynamicCorrection13 = myKeyPad.doubleValue;
|
|
|
|
value = string.Format("{0:f6}", this.labelDynamicCorrection13.Text);
|
|
value = value.Remove(1, 1);
|
|
value = Helper.StringZeroFillDigits7(value);
|
|
this.ParentForm.ParentForm.TransferDataStream(CommunicationCommand.Write, CommunicationID.SubBoard13, CommunicationAddress._5006_DynamicCorrection, value);
|
|
|
|
this.ParentForm.ParentForm.SaveDynamicCorrectionFile(this.ParentForm.SelectedJudgmentSetItem, this.ParentForm.SelectedProductNo - 1);
|
|
}
|
|
}
|
|
}
|
|
private void labelDynamicCorrection14_Click(object sender, EventArgs e)
|
|
{
|
|
string value = "";
|
|
DialogFormNumKeyPad myKeyPad = new DialogFormNumKeyPad(this.labelDynamicCorrection14.Text, 7, 6, false, this.ParentForm.ParentForm.SystemConfig.Language);
|
|
|
|
if (myKeyPad.ShowDialog() == DialogResult.OK)
|
|
{
|
|
if (myKeyPad.doubleValue < 0.500000 || myKeyPad.doubleValue > 2.000000)
|
|
{
|
|
// 입력범위를 확인하세요
|
|
DialogFormMessage myMsg = new DialogFormMessage(1, this.ParentForm.ParentForm.SystemConfig.Language);
|
|
myMsg.ShowDialog();
|
|
}
|
|
else
|
|
{
|
|
this.labelDynamicCorrection14.Text = myKeyPad.StringValue;
|
|
this.ParentForm.SelectedJudgmentSetItem.DynamicCorrection14 = myKeyPad.doubleValue;
|
|
|
|
value = string.Format("{0:f6}", this.labelDynamicCorrection14.Text);
|
|
value = value.Remove(1, 1);
|
|
value = Helper.StringZeroFillDigits7(value);
|
|
this.ParentForm.ParentForm.TransferDataStream(CommunicationCommand.Write, CommunicationID.SubBoard14, CommunicationAddress._5006_DynamicCorrection, value);
|
|
|
|
this.ParentForm.ParentForm.SaveDynamicCorrectionFile(this.ParentForm.SelectedJudgmentSetItem, this.ParentForm.SelectedProductNo - 1);
|
|
}
|
|
}
|
|
}
|
|
private void labelDynamicCorrection15_Click(object sender, EventArgs e)
|
|
{
|
|
string value = "";
|
|
DialogFormNumKeyPad myKeyPad = new DialogFormNumKeyPad(this.labelDynamicCorrection15.Text, 7, 6, false, this.ParentForm.ParentForm.SystemConfig.Language);
|
|
|
|
if (myKeyPad.ShowDialog() == DialogResult.OK)
|
|
{
|
|
if (myKeyPad.doubleValue < 0.500000 || myKeyPad.doubleValue > 2.000000)
|
|
{
|
|
// 입력범위를 확인하세요
|
|
DialogFormMessage myMsg = new DialogFormMessage(1, this.ParentForm.ParentForm.SystemConfig.Language);
|
|
myMsg.ShowDialog();
|
|
}
|
|
else
|
|
{
|
|
this.labelDynamicCorrection15.Text = myKeyPad.StringValue;
|
|
this.ParentForm.SelectedJudgmentSetItem.DynamicCorrection15 = myKeyPad.doubleValue;
|
|
|
|
value = string.Format("{0:f6}", this.labelDynamicCorrection15.Text);
|
|
value = value.Remove(1, 1);
|
|
value = Helper.StringZeroFillDigits7(value);
|
|
this.ParentForm.ParentForm.TransferDataStream(CommunicationCommand.Write, CommunicationID.SubBoard15, CommunicationAddress._5006_DynamicCorrection, value);
|
|
|
|
this.ParentForm.ParentForm.SaveDynamicCorrectionFile(this.ParentForm.SelectedJudgmentSetItem, this.ParentForm.SelectedProductNo - 1);
|
|
}
|
|
}
|
|
}
|
|
private void labelDynamicCorrection16_Click(object sender, EventArgs e)
|
|
{
|
|
string value = "";
|
|
DialogFormNumKeyPad myKeyPad = new DialogFormNumKeyPad(this.labelDynamicCorrection16.Text, 7, 6, false, this.ParentForm.ParentForm.SystemConfig.Language);
|
|
|
|
if (myKeyPad.ShowDialog() == DialogResult.OK)
|
|
{
|
|
if (myKeyPad.doubleValue < 0.500000 || myKeyPad.doubleValue > 2.000000)
|
|
{
|
|
// 입력범위를 확인하세요
|
|
DialogFormMessage myMsg = new DialogFormMessage(1, this.ParentForm.ParentForm.SystemConfig.Language);
|
|
myMsg.ShowDialog();
|
|
}
|
|
else
|
|
{
|
|
this.labelDynamicCorrection16.Text = myKeyPad.StringValue;
|
|
this.ParentForm.SelectedJudgmentSetItem.DynamicCorrection16 = myKeyPad.doubleValue;
|
|
|
|
value = string.Format("{0:f6}", this.labelDynamicCorrection16.Text);
|
|
value = value.Remove(1, 1);
|
|
value = Helper.StringZeroFillDigits7(value);
|
|
this.ParentForm.ParentForm.TransferDataStream(CommunicationCommand.Write, CommunicationID.SubBoard16, CommunicationAddress._5006_DynamicCorrection, value);
|
|
|
|
this.ParentForm.ParentForm.SaveDynamicCorrectionFile(this.ParentForm.SelectedJudgmentSetItem, this.ParentForm.SelectedProductNo - 1);
|
|
}
|
|
}
|
|
}
|
|
|
|
private void labelEntryGateDelayTime_Click(object sender, EventArgs e)
|
|
{
|
|
string value = "";
|
|
DialogFormNumKeyPad myKeyPad = new DialogFormNumKeyPad(this.labelEntryGateDelayTime.Text, 4, 0, false, this.ParentForm.ParentForm.SystemConfig.Language);
|
|
|
|
if (myKeyPad.ShowDialog() == DialogResult.OK)
|
|
{
|
|
if (myKeyPad.doubleValue < 0 || myKeyPad.doubleValue > 9999)
|
|
{
|
|
// 입력범위를 확인하세요
|
|
DialogFormMessage myMsg = new DialogFormMessage(1, this.ParentForm.ParentForm.SystemConfig.Language);
|
|
myMsg.ShowDialog();
|
|
}
|
|
else
|
|
{
|
|
this.labelEntryGateDelayTime.Text = myKeyPad.StringValue;
|
|
this.ParentForm.SelectedJudgmentSetItem.EntryGateDelayTime = myKeyPad.IntValue;
|
|
|
|
value = Helper.StringZeroFillDigits4(this.labelEntryGateDelayTime.Text);
|
|
this.ParentForm.ParentForm.TransferDataStream(CommunicationCommand.Write, CommunicationID.MainBoard, CommunicationAddress._5032_EntryGateDelayTime, value);
|
|
|
|
this.ParentForm.ParentForm.SaveDynamicCorrectionFile(this.ParentForm.SelectedJudgmentSetItem, this.ParentForm.SelectedProductNo - 1);
|
|
}
|
|
}
|
|
}
|
|
private void labelEntryGateRunTime_Click(object sender, EventArgs e)
|
|
{
|
|
string value = "";
|
|
DialogFormNumKeyPad myKeyPad = new DialogFormNumKeyPad(this.labelEntryGateRunTime.Text, 4, 0, false, this.ParentForm.ParentForm.SystemConfig.Language);
|
|
|
|
if (myKeyPad.ShowDialog() == DialogResult.OK)
|
|
{
|
|
if (myKeyPad.doubleValue < 0 || myKeyPad.doubleValue > 9999)
|
|
{
|
|
// 입력범위를 확인하세요
|
|
DialogFormMessage myMsg = new DialogFormMessage(1, this.ParentForm.ParentForm.SystemConfig.Language);
|
|
myMsg.ShowDialog();
|
|
}
|
|
else
|
|
{
|
|
this.labelEntryGateRunTime.Text = myKeyPad.StringValue;
|
|
this.ParentForm.SelectedJudgmentSetItem.EntryGateRunTime = myKeyPad.IntValue;
|
|
|
|
value = Helper.StringZeroFillDigits4(this.labelEntryGateRunTime.Text);
|
|
this.ParentForm.ParentForm.TransferDataStream(CommunicationCommand.Write, CommunicationID.MainBoard, CommunicationAddress._5033_EntryGateRunTime, value);
|
|
|
|
this.ParentForm.ParentForm.SaveDynamicCorrectionFile(this.ParentForm.SelectedJudgmentSetItem, this.ParentForm.SelectedProductNo - 1);
|
|
}
|
|
}
|
|
}
|
|
private void labelDischargeStopperDelayTime_Click(object sender, EventArgs e)
|
|
{
|
|
string value = "";
|
|
DialogFormNumKeyPad myKeyPad = new DialogFormNumKeyPad(this.labelDischargeStopperDelayTime.Text, 4, 0, false, this.ParentForm.ParentForm.SystemConfig.Language);
|
|
|
|
if (myKeyPad.ShowDialog() == DialogResult.OK)
|
|
{
|
|
if (myKeyPad.doubleValue < 0 || myKeyPad.doubleValue > 9999)
|
|
{
|
|
// 입력범위를 확인하세요
|
|
DialogFormMessage myMsg = new DialogFormMessage(1, this.ParentForm.ParentForm.SystemConfig.Language);
|
|
myMsg.ShowDialog();
|
|
}
|
|
else
|
|
{
|
|
this.labelDischargeStopperDelayTime.Text = myKeyPad.StringValue;
|
|
this.ParentForm.SelectedJudgmentSetItem.DischargeStopperDelayTime = myKeyPad.IntValue;
|
|
|
|
value = Helper.StringZeroFillDigits4(this.labelDischargeStopperDelayTime.Text);
|
|
this.ParentForm.ParentForm.TransferDataStream(CommunicationCommand.Write, CommunicationID.MainBoard, CommunicationAddress._5034_DischargeStopperDelayTime, value);
|
|
|
|
this.ParentForm.ParentForm.SaveDynamicCorrectionFile(this.ParentForm.SelectedJudgmentSetItem, this.ParentForm.SelectedProductNo - 1);
|
|
}
|
|
}
|
|
}
|
|
private void labelDischargeStopperRunTime_Click(object sender, EventArgs e)
|
|
{
|
|
string value = "";
|
|
DialogFormNumKeyPad myKeyPad = new DialogFormNumKeyPad(this.labelDischargeStopperRunTime.Text, 4, 0, false, this.ParentForm.ParentForm.SystemConfig.Language);
|
|
|
|
if (myKeyPad.ShowDialog() == DialogResult.OK)
|
|
{
|
|
if (myKeyPad.doubleValue < 0 || myKeyPad.doubleValue > 9999)
|
|
{
|
|
// 입력범위를 확인하세요
|
|
DialogFormMessage myMsg = new DialogFormMessage(1, this.ParentForm.ParentForm.SystemConfig.Language);
|
|
myMsg.ShowDialog();
|
|
}
|
|
else
|
|
{
|
|
this.labelDischargeStopperRunTime.Text = myKeyPad.StringValue;
|
|
this.ParentForm.SelectedJudgmentSetItem.DischargeStopperRunTime = myKeyPad.IntValue;
|
|
|
|
value = Helper.StringZeroFillDigits4(this.labelDischargeStopperRunTime.Text);
|
|
this.ParentForm.ParentForm.TransferDataStream(CommunicationCommand.Write, CommunicationID.MainBoard, CommunicationAddress._5034_DischargeStopperRunTime, value);
|
|
|
|
this.ParentForm.ParentForm.SaveDynamicCorrectionFile(this.ParentForm.SelectedJudgmentSetItem, this.ParentForm.SelectedProductNo - 1);
|
|
}
|
|
}
|
|
}
|
|
#endregion
|
|
}
|
|
}
|