데이터 관리 수정

히스토리 로그 기록 추가중
main
Seonjae 2023-04-05 17:32:15 +09:00
parent bf0ba88531
commit ad7b3f4676
12 changed files with 1737 additions and 1601 deletions

View File

@ -129,6 +129,7 @@
this.smartLabel3 = new SmartX.SmartLabel();
this.labelInput3 = new SmartX.SmartLabel();
this.labelInput1 = new SmartX.SmartLabel();
this.smartTimer = new SmartX.SmartTimer();
this.smartGroupBox1.SuspendLayout();
this.smartGroupBox5.SuspendLayout();
this.smartGroupBox4.SuspendLayout();
@ -2667,6 +2668,15 @@
this.labelInput1.TextVAlign = SmartX.SmartLabel.TextVerAlign.Top;
this.labelInput1.Wordwrap = false;
//
// smartTimer
//
this.smartTimer.CounterMode = SmartX.SmartTimer.CounterModes.Up_Counter;
this.smartTimer.Interval = 1000;
this.smartTimer.IntervalSeries = null;
this.smartTimer.TimeCount = ((long)(1000000));
this.smartTimer.TimeFormStringSeparator = ":";
this.smartTimer.Tick += new System.EventHandler(this.smartTimer_Tick);
//
// ControlMenuManualIoTest
//
this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
@ -2786,5 +2796,6 @@
public SmartX.SmartLabel labelSbAlarm3;
public SmartX.SmartLabel labelSbAlarm2;
public SmartX.SmartLabel labelSbAlarm1;
private SmartX.SmartTimer smartTimer;
}
}

View File

@ -201,7 +201,8 @@ namespace INT_PT002.Controls
this.ParentForm.ParentForm.CurrentSystemStatus.CurrentDisplayMode = Define.E_DisplayModeStore.IOTest;
this.ParentForm.ParentForm.SetDisplayMode(Define.E_EquipmentMode.IOTest);
this.ServoParameterAllRead();
// Servo Parameter Read
this.smartTimer.Start();
}
#endregion
@ -417,7 +418,9 @@ namespace INT_PT002.Controls
}
private void labelMotor1Origin_Click(object sender, EventArgs e)
{
string caption = "Motor1 Origin";
string caption = "Motor1 Origin", before = "", after = "";
before = this.labelMotor1Origin.Text;
DialogFormNumKeyPad myKeyPad = new DialogFormNumKeyPad(caption, this.labelMotor1Origin.Text, 7, 0, false);
if (myKeyPad.ShowDialog() == DialogResult.OK)
@ -432,12 +435,17 @@ namespace INT_PT002.Controls
{
this.ParentForm.ParentForm.ServoMotorWrite2(1, ServoMotorAddress.CMD21, myKeyPad.IntValue, this.labelMotor1Origin);
this.ParentForm.ParentForm.ServoMotorWrite2(1, ServoMotorAddress.CMD2, myKeyPad.IntValue);
before = myKeyPad.StringValue;
this.ParentForm.ParentForm.SetTrackingHistoryData(Define.E_TrackingParameter.M1_Origin, "", before, after);
}
}
}
private void labelMotor1Front1_Click(object sender, EventArgs e)
{
string caption = "Motor1 Front1";
string caption = "Motor1 Front1", before = "", after = "";
before = this.labelMotor1Front1.Text;
DialogFormNumKeyPad myKeyPad = new DialogFormNumKeyPad(caption, this.labelMotor1Front1.Text, 7, 0, false);
if (myKeyPad.ShowDialog() == DialogResult.OK)
@ -451,12 +459,17 @@ namespace INT_PT002.Controls
else
{
this.ParentForm.ParentForm.ServoMotorWrite2(1, ServoMotorAddress.CMD16, myKeyPad.IntValue, this.labelMotor1Front1);
after = myKeyPad.StringValue;
this.ParentForm.ParentForm.SetTrackingHistoryData(Define.E_TrackingParameter.M1_Front1, "", before, after);
}
}
}
private void labelMotor1Front2_Click(object sender, EventArgs e)
{
string caption = "Motor1 Front2";
string caption = "Motor1 Front2", before = "", after = "";
before = this.labelMotor1Front2.Text;
DialogFormNumKeyPad myKeyPad = new DialogFormNumKeyPad(caption, this.labelMotor1Front2.Text, 7, 0, false);
if (myKeyPad.ShowDialog() == DialogResult.OK)
@ -470,6 +483,9 @@ namespace INT_PT002.Controls
else
{
this.ParentForm.ParentForm.ServoMotorWrite2(1, ServoMotorAddress.CMD17, myKeyPad.IntValue, this.labelMotor1Front2);
after = myKeyPad.StringValue;
this.ParentForm.ParentForm.SetTrackingHistoryData(Define.E_TrackingParameter.M1_Front2, "", before, after);
}
}
}
@ -489,7 +505,9 @@ namespace INT_PT002.Controls
}
private void labelMotor2Origin_Click(object sender, EventArgs e)
{
string caption = "Motor2 Origin";
string caption = "Motor2 Origin", before = "", after = "";
before = this.labelMotor2Origin.Text;
DialogFormNumKeyPad myKeyPad = new DialogFormNumKeyPad(caption, this.labelMotor2Origin.Text, 7, 0, false);
if (myKeyPad.ShowDialog() == DialogResult.OK)
@ -505,12 +523,17 @@ namespace INT_PT002.Controls
this.ParentForm.ParentForm.ServoMotorWrite2(2, ServoMotorAddress.CMD21, myKeyPad.IntValue, this.labelMotor2Origin);
this.ParentForm.ParentForm.ServoMotorWrite2(2, ServoMotorAddress.CMD16, myKeyPad.IntValue);
this.ParentForm.ParentForm.ServoMotorWrite2(2, ServoMotorAddress.CMD27, myKeyPad.IntValue);
after = myKeyPad.StringValue;
this.ParentForm.ParentForm.SetTrackingHistoryData(Define.E_TrackingParameter.M2_Origin, "", before, after);
}
}
}
private void labelMotor2Turn_Click(object sender, EventArgs e)
{
string caption = "Motor2 Turn";
string caption = "Motor2 Turn", before = "", after = "";
before = this.labelMotor2Turn.Text;
DialogFormNumKeyPad myKeyPad = new DialogFormNumKeyPad(caption, this.labelMotor2Turn.Text, 7, 0, false);
if (myKeyPad.ShowDialog() == DialogResult.OK)
@ -524,9 +547,19 @@ namespace INT_PT002.Controls
else
{
this.ParentForm.ParentForm.ServoMotorWrite2(1, ServoMotorAddress.CMD25, myKeyPad.IntValue, this.labelMotor2Turn);
after = myKeyPad.StringValue;
this.ParentForm.ParentForm.SetTrackingHistoryData(Define.E_TrackingParameter.M2_Turn, "", before, after);
}
}
}
private void smartTimer_Tick(object sender, EventArgs e)
{
this.smartTimer.Stop();
this.ServoParameterAllRead();
}
#endregion
}
}

View File

@ -117,6 +117,9 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="smartTimer.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<metadata name="$this.FormFactorShadowProperty" xml:space="preserve">
<value>WEBPAD</value>
</metadata>

View File

@ -234,13 +234,16 @@ namespace INT_PT002.Controls
this.labelNumber.Text = "**";
this.ParentForm.ParentForm.TransferRecipeParameter9043(myKeypad.IntValue);
after = myKeypad.StringValue;
this.ParentForm.ParentForm.SetTrackingHistoryData(Define.E_TrackingParameter.RecipeNumber, "", before, after);
}
}
private void labelPressureLevel_Click(object sender, EventArgs e)
{
string value = "", afterValue = "";
string value = "", before = "", after = "";
afterValue = this.labelPressureLevel.Text;
before = this.labelPressureLevel.Text;
DialogFormNumKeyPad myKeypad = new DialogFormNumKeyPad(this.smartLabel15.Text, this.labelPressureLevel.Text, 5, 1, false);
if (myKeypad.ShowDialog() == DialogResult.OK)
@ -248,7 +251,7 @@ namespace INT_PT002.Controls
if (myKeypad.doubleValue > -50 || myKeypad.doubleValue < -100)
{
this.MessageBoxRange = "-50.0 ~ -100.0";
this.labelPressureLevel.Text = afterValue;
this.labelPressureLevel.Text = before;
this.smartTimerMessageShow.Start();
return;
}
@ -256,18 +259,21 @@ namespace INT_PT002.Controls
this.labelPressureLevel.Text = myKeypad.StringValue;
this.ParentForm.ParentForm.CurrentRecipe.VACUUM_GUAGE_LEVEL = myKeypad.StringValue;
this.ParentForm.ParentForm.SaveRecipeFile(this.ParentForm.ParentForm.CurrentRecipe);
after = myKeypad.StringValue;
value = Helper.StringBlankFillDigits6(myKeypad.StringValue);
this.ParentForm.ParentForm.TransferDataStream(CommunicationCommand.Write, CommunicationID.MainBoard, CommunicationAddress._5517_VacuumGaugeStdLevel, value);
this.ParentForm.ParentForm.SetTrackingHistoryData(Define.E_TrackingParameter.Pressure, "", before, after);
}
}
// 밸브
private void labelVacuumRelief_Click(object sender, EventArgs e)
{
string value = "", afterValue = "";
string value = "", before = "", after = "";
afterValue = this.labelVacuumRelief.Text;
before = this.labelVacuumRelief.Text;
DialogFormNumKeyPad myKeypad = new DialogFormNumKeyPad(this.smartLabel22.Text, this.labelVacuumRelief.Text, 4, 0, false);
if (myKeypad.ShowDialog() == DialogResult.OK)
@ -275,7 +281,7 @@ namespace INT_PT002.Controls
if (myKeypad.IntValue < 0 || myKeypad.IntValue > 9999)
{
this.MessageBoxRange = "0 ~ 9999";
this.labelVacuumRelief.Text = afterValue;
this.labelVacuumRelief.Text = before;
this.smartTimerMessageShow.Start();
return;
}
@ -283,16 +289,19 @@ namespace INT_PT002.Controls
this.labelVacuumRelief.Text = myKeypad.StringValue;
this.ParentForm.ParentForm.CurrentRecipe.VACUUM_RELIEF = myKeypad.IntValue;
this.ParentForm.ParentForm.SaveRecipeFile(this.ParentForm.ParentForm.CurrentRecipe);
after = myKeypad.StringValue;
value = Helper.StringBlankFillDigits4(myKeypad.StringValue);
this.ParentForm.ParentForm.TransferDataStream(CommunicationCommand.Write, CommunicationID.MainBoard, CommunicationAddress._5504_VacuumRelief, value);
this.ParentForm.ParentForm.SetTrackingHistoryData(Define.E_TrackingParameter.P_reliefTime, "", before, after);
}
}
private void labelVacuumHold1_Click(object sender, EventArgs e)
{
string value = "", afterValue = "";
string value = "", before = "", after = "";
afterValue = this.labelVacuumHold1.Text;
before = this.labelVacuumHold1.Text;
DialogFormNumKeyPad myKeypad = new DialogFormNumKeyPad(this.smartLabel24.Text, this.labelVacuumHold1.Text, 4, 0, false);
if (myKeypad.ShowDialog() == DialogResult.OK)
@ -300,7 +309,7 @@ namespace INT_PT002.Controls
if (myKeypad.IntValue < 0 || myKeypad.IntValue > 9999)
{
this.MessageBoxRange = "0 ~ 9999";
this.labelVacuumHold1.Text = afterValue;
this.labelVacuumHold1.Text = before;
this.smartTimerMessageShow.Start();
return;
}
@ -308,16 +317,19 @@ namespace INT_PT002.Controls
this.labelVacuumHold1.Text = myKeypad.StringValue;
this.ParentForm.ParentForm.CurrentRecipe.VACUUM_HOLD1 = myKeypad.IntValue;
this.ParentForm.ParentForm.SaveRecipeFile(this.ParentForm.ParentForm.CurrentRecipe);
after = myKeypad.StringValue;
value = Helper.StringBlankFillDigits4(myKeypad.StringValue);
this.ParentForm.ParentForm.TransferDataStream(CommunicationCommand.Write, CommunicationID.MainBoard, CommunicationAddress._5505_VacuumHold1, value);
this.ParentForm.ParentForm.SetTrackingHistoryData(Define.E_TrackingParameter.P_HlodingTime, "", before, after);
}
}
private void labelVacuumHold2_Click(object sender, EventArgs e)
{
string value = "", afterValue = "";
string value = "", before = "", after = "";
afterValue = this.labelVacuumHold2.Text;
before = this.labelVacuumHold2.Text;
DialogFormNumKeyPad myKeypad = new DialogFormNumKeyPad(this.smartLabel26.Text, this.labelVacuumHold2.Text, 4, 0, false);
if (myKeypad.ShowDialog() == DialogResult.OK)
@ -325,7 +337,7 @@ namespace INT_PT002.Controls
if (myKeypad.IntValue < 0 || myKeypad.IntValue > this.ParentForm.ParentForm.CurrentRecipe.VACUUM_HOLD1 - 1)
{
this.MessageBoxRange = string.Format("0 ~ {0}", this.ParentForm.ParentForm.CurrentRecipe.VACUUM_HOLD1 - 1);
this.labelVacuumHold2.Text = afterValue;
this.labelVacuumHold2.Text = before;
this.smartTimerMessageShow.Start();
return;
}
@ -333,16 +345,19 @@ namespace INT_PT002.Controls
this.labelVacuumHold2.Text = myKeypad.StringValue;
this.ParentForm.ParentForm.CurrentRecipe.VACUUM_HOLD2 = myKeypad.IntValue;
this.ParentForm.ParentForm.SaveRecipeFile(this.ParentForm.ParentForm.CurrentRecipe);
after = myKeypad.StringValue;
value = Helper.StringBlankFillDigits4(myKeypad.StringValue);
this.ParentForm.ParentForm.TransferDataStream(CommunicationCommand.Write, CommunicationID.MainBoard, CommunicationAddress._5506_VacuumHold2, value);
this.ParentForm.ParentForm.SetTrackingHistoryData(Define.E_TrackingParameter.P_HoldingTime2, "", before, after);
}
}
private void labelVacuumBlowoff_Click(object sender, EventArgs e)
{
string value = "", afterValue = "";
string value = "", before = "", after = "";
afterValue = this.labelVacuumBlowoff.Text;
before = this.labelVacuumBlowoff.Text;
DialogFormNumKeyPad myKeypad = new DialogFormNumKeyPad(this.smartLabel2.Text, this.labelVacuumBlowoff.Text, 4, 0, false);
if (myKeypad.ShowDialog() == DialogResult.OK)
@ -350,7 +365,7 @@ namespace INT_PT002.Controls
if (myKeypad.IntValue < 0 || myKeypad.IntValue > 9999)
{
this.MessageBoxRange = "0 ~ 9999";
this.labelVacuumBlowoff.Text = afterValue;
this.labelVacuumBlowoff.Text = before;
this.smartTimerMessageShow.Start();
return;
}
@ -358,18 +373,21 @@ namespace INT_PT002.Controls
this.labelVacuumBlowoff.Text = myKeypad.StringValue;
this.ParentForm.ParentForm.CurrentRecipe.VACUUM_BLOWOFF = myKeypad.IntValue;
this.ParentForm.ParentForm.SaveRecipeFile(this.ParentForm.ParentForm.CurrentRecipe);
after = myKeypad.StringValue;
value = Helper.StringBlankFillDigits4(myKeypad.StringValue);
this.ParentForm.ParentForm.TransferDataStream(CommunicationCommand.Write, CommunicationID.MainBoard, CommunicationAddress._5507_VacuumBlowoff, value);
this.ParentForm.ParentForm.SetTrackingHistoryData(Define.E_TrackingParameter.P_BreakTime, "", before, after);
}
}
// 변위센서
private void labelDispStdLevel_Click(object sender, EventArgs e)
{
string value = "", afterValue = "";
string value = "", before = "", after = "";
afterValue = this.labelDispStdLevel.Text;
before = this.labelDispStdLevel.Text;
DialogFormNumKeyPad myKeypad = new DialogFormNumKeyPad(this.smartLabel9.Text, this.labelDispStdLevel.Text, 5, 2, false);
if (myKeypad.ShowDialog() == DialogResult.OK)
@ -377,7 +395,7 @@ namespace INT_PT002.Controls
if (myKeypad.doubleValue < 0 || myKeypad.doubleValue > 100)
{
this.MessageBoxRange = "0.00 ~ 100.00";
this.labelDispStdLevel.Text = afterValue;
this.labelDispStdLevel.Text = before;
this.smartTimerMessageShow.Start();
return;
}
@ -385,16 +403,19 @@ namespace INT_PT002.Controls
this.labelDispStdLevel.Text = myKeypad.StringValue;
this.ParentForm.ParentForm.CurrentRecipe.DISP_JUDG_STD_LEVEL = myKeypad.StringValue;
this.ParentForm.ParentForm.SaveRecipeFile(this.ParentForm.ParentForm.CurrentRecipe);
after = myKeypad.StringValue;
value = Helper.StringBlankFillDigits6(myKeypad.StringValue);
this.ParentForm.ParentForm.TransferDataStream(CommunicationCommand.Write, CommunicationID.MainBoard, CommunicationAddress._5509_DispStdLevel, value);
this.ParentForm.ParentForm.SetTrackingHistoryData(Define.E_TrackingParameter.Disp_STD, "", before, after);
}
}
private void labelDispMinLevel_Click(object sender, EventArgs e)
{
string value = "", afterValue = "";
string value = "", before = "", after = "";
afterValue = this.labelDispMinLevel.Text;
before = this.labelDispMinLevel.Text;
DialogFormNumKeyPad myKeypad = new DialogFormNumKeyPad(this.smartLabel7.Text, this.labelDispMinLevel.Text, 5, 2, false);
if (myKeypad.ShowDialog() == DialogResult.OK)
@ -402,7 +423,7 @@ namespace INT_PT002.Controls
if (myKeypad.doubleValue < 0 || myKeypad.doubleValue > 100)
{
this.MessageBoxRange = "0.00 ~ 100.00";
this.labelDispMinLevel.Text = afterValue;
this.labelDispMinLevel.Text = before;
this.smartTimerMessageShow.Start();
return;
}
@ -410,16 +431,19 @@ namespace INT_PT002.Controls
this.labelDispMinLevel.Text = myKeypad.StringValue;
this.ParentForm.ParentForm.CurrentRecipe.DISP_JUDG_MIN_LEVEL = myKeypad.StringValue;
this.ParentForm.ParentForm.SaveRecipeFile(this.ParentForm.ParentForm.CurrentRecipe);
after = myKeypad.StringValue;
value = Helper.StringBlankFillDigits6(myKeypad.StringValue);
this.ParentForm.ParentForm.TransferDataStream(CommunicationCommand.Write, CommunicationID.MainBoard, CommunicationAddress._5510_DispMinLevel, value);
this.ParentForm.ParentForm.SetTrackingHistoryData(Define.E_TrackingParameter.Disp_Min, "", before, after);
}
}
private void labelDispEmptyLevel_Click(object sender, EventArgs e)
{
string value = "", afterValue = "";
string value = "", before = "", after = "";
afterValue = this.labelDispEmptyLevel.Text;
before = this.labelDispEmptyLevel.Text;
DialogFormNumKeyPad myKeypad = new DialogFormNumKeyPad(this.smartLabel5.Text, this.labelDispEmptyLevel.Text, 5, 2, false);
if (myKeypad.ShowDialog() == DialogResult.OK)
@ -427,7 +451,7 @@ namespace INT_PT002.Controls
if (myKeypad.doubleValue < 0 || myKeypad.doubleValue > 100)
{
this.MessageBoxRange = "0.00 ~ 100.00";
this.labelDispEmptyLevel.Text = afterValue;
this.labelDispEmptyLevel.Text = before;
this.smartTimerMessageShow.Start();
return;
}
@ -435,16 +459,19 @@ namespace INT_PT002.Controls
this.labelDispEmptyLevel.Text = myKeypad.StringValue;
this.ParentForm.ParentForm.CurrentRecipe.DISP_JUDG_EMPTY_LEVEL = myKeypad.StringValue;
this.ParentForm.ParentForm.SaveRecipeFile(this.ParentForm.ParentForm.CurrentRecipe);
after = myKeypad.StringValue;
value = Helper.StringBlankFillDigits6(myKeypad.StringValue);
this.ParentForm.ParentForm.TransferDataStream(CommunicationCommand.Write, CommunicationID.MainBoard, CommunicationAddress._5511_DispEmptyLevel, value);
this.ParentForm.ParentForm.SetTrackingHistoryData(Define.E_TrackingParameter.Disp_IPH, "", before, after);
}
}
private void labelDispHoldDelay_Click(object sender, EventArgs e)
{
string value = "", afterValue = "";
string value = "", before = "", after = "";
afterValue = this.labelDispHoldDelay.Text;
before = this.labelDispHoldDelay.Text;
DialogFormNumKeyPad myKeypad = new DialogFormNumKeyPad(this.smartLabel3.Text, this.labelDispHoldDelay.Text, 4, 0, false);
if (myKeypad.ShowDialog() == DialogResult.OK)
@ -452,7 +479,7 @@ namespace INT_PT002.Controls
if (myKeypad.IntValue < 0 || myKeypad.IntValue > 9999)
{
this.MessageBoxRange = "0 ~ 9999";
this.labelDispHoldDelay.Text = afterValue;
this.labelDispHoldDelay.Text = before;
this.smartTimerMessageShow.Start();
return;
}
@ -460,18 +487,21 @@ namespace INT_PT002.Controls
this.labelDispHoldDelay.Text = myKeypad.StringValue;
this.ParentForm.ParentForm.CurrentRecipe.DISP_HOLD_DELAY_MSEC = myKeypad.IntValue;
this.ParentForm.ParentForm.SaveRecipeFile(this.ParentForm.ParentForm.CurrentRecipe);
after = myKeypad.StringValue;
value = Helper.StringBlankFillDigits4(myKeypad.StringValue);
this.ParentForm.ParentForm.TransferDataStream(CommunicationCommand.Write, CommunicationID.MainBoard, CommunicationAddress._5512_DispHoldDelay, value);
this.ParentForm.ParentForm.SetTrackingHistoryData(Define.E_TrackingParameter.Disp_WaitingTime, "", before, after);
}
}
// 차압센서
private void labelDiffLrSecond_Click(object sender, EventArgs e)
{
string value = "", afterValue = "";
string value = "", before = "", after = "";
afterValue = this.labelDiffLrSecond.Text;
before = this.labelDiffLrSecond.Text;
DialogFormNumKeyPad myKeypad = new DialogFormNumKeyPad(this.smartLabel13.Text, this.labelDiffLrSecond.Text, 7, 2, false);
if (myKeypad.ShowDialog() == DialogResult.OK)
@ -479,7 +509,7 @@ namespace INT_PT002.Controls
if (myKeypad.doubleValue < 0 || myKeypad.doubleValue > 99999.99)
{
this.MessageBoxRange = "0.00 ~ 99999.99";
this.labelDiffLrSecond.Text = afterValue;
this.labelDiffLrSecond.Text = before;
this.smartTimerMessageShow.Start();
return;
}
@ -487,16 +517,19 @@ namespace INT_PT002.Controls
this.labelDiffLrSecond.Text = myKeypad.StringValue;
this.ParentForm.ParentForm.CurrentRecipe.DIFF_LR_SECOND = myKeypad.StringValue;
this.ParentForm.ParentForm.SaveRecipeFile(this.ParentForm.ParentForm.CurrentRecipe);
after = myKeypad.StringValue;
value = Helper.StringBlankFillDigits8(myKeypad.StringValue);
this.ParentForm.ParentForm.TransferDataStream(CommunicationCommand.Write, CommunicationID.MainBoard, CommunicationAddress._5513_DiffLrSecond, value);
this.ParentForm.ParentForm.SetTrackingHistoryData(Define.E_TrackingParameter.Diff_SEC, "", before, after);
}
}
private void labelDiffLrTotal_Click(object sender, EventArgs e)
{
string value = "", afterValue = "";
string value = "", before = "", after = "";
afterValue = this.labelDiffLrTotal.Text;
before = this.labelDiffLrTotal.Text;
DialogFormNumKeyPad myKeypad = new DialogFormNumKeyPad(this.smartLabel11.Text, this.labelDiffLrTotal.Text, 7, 2, false);
if (myKeypad.ShowDialog() == DialogResult.OK)
@ -504,7 +537,7 @@ namespace INT_PT002.Controls
if (myKeypad.doubleValue < 0 || myKeypad.doubleValue > 99999.99)
{
this.MessageBoxRange = "0.00 ~ 99999.99";
this.labelDiffLrTotal.Text = afterValue;
this.labelDiffLrTotal.Text = before;
this.smartTimerMessageShow.Start();
return;
}
@ -512,16 +545,19 @@ namespace INT_PT002.Controls
this.labelDiffLrTotal.Text = myKeypad.StringValue;
this.ParentForm.ParentForm.CurrentRecipe.DIFF_LR_TOTAL = myKeypad.StringValue;
this.ParentForm.ParentForm.SaveRecipeFile(this.ParentForm.ParentForm.CurrentRecipe);
after = myKeypad.StringValue;
value = Helper.StringBlankFillDigits8(myKeypad.StringValue);
this.ParentForm.ParentForm.TransferDataStream(CommunicationCommand.Write, CommunicationID.MainBoard, CommunicationAddress._5514_DiffLrTotal, value);
this.ParentForm.ParentForm.SetTrackingHistoryData(Define.E_TrackingParameter.Diff_SUM, "", before, after);
}
}
private void labelDiffLrMean_Click(object sender, EventArgs e)
{
string value = "", afterValue = "";
string value = "", before = "", after = "";
afterValue = this.labelDiffLrMean.Text;
before = this.labelDiffLrMean.Text;
DialogFormNumKeyPad myKeypad = new DialogFormNumKeyPad(this.smartLabel8.Text, this.labelDiffLrMean.Text, 7, 2, false);
if (myKeypad.ShowDialog() == DialogResult.OK)
@ -529,7 +565,7 @@ namespace INT_PT002.Controls
if (myKeypad.doubleValue < 0 || myKeypad.doubleValue > 99999.99)
{
this.MessageBoxRange = "0.00 ~ 99999.99";
this.labelDiffLrMean.Text = afterValue;
this.labelDiffLrMean.Text = before;
this.smartTimerMessageShow.Start();
return;
}
@ -537,16 +573,19 @@ namespace INT_PT002.Controls
this.labelDiffLrMean.Text = myKeypad.StringValue;
this.ParentForm.ParentForm.CurrentRecipe.DIFF_LR_MEAN = myKeypad.StringValue;
this.ParentForm.ParentForm.SaveRecipeFile(this.ParentForm.ParentForm.CurrentRecipe);
after = myKeypad.StringValue;
value = Helper.StringBlankFillDigits8(myKeypad.StringValue);
this.ParentForm.ParentForm.TransferDataStream(CommunicationCommand.Write, CommunicationID.MainBoard, CommunicationAddress._5515_DiffLrMean, value);
this.ParentForm.ParentForm.SetTrackingHistoryData(Define.E_TrackingParameter.Diff_AVG, "", before, after);
}
}
private void labelDiffHoldDelay_Click(object sender, EventArgs e)
{
string value = "", afterValue = "";
string value = "", before = "", after = "";
afterValue = this.labelDiffHoldDelay.Text;
before = this.labelDiffHoldDelay.Text;
DialogFormNumKeyPad myKeypad = new DialogFormNumKeyPad(this.smartLabel4.Text, this.labelDiffHoldDelay.Text, 4, 0, false);
if (myKeypad.ShowDialog() == DialogResult.OK)
@ -554,7 +593,7 @@ namespace INT_PT002.Controls
if (myKeypad.IntValue < 0 || myKeypad.IntValue > 9999)
{
this.MessageBoxRange = "0 ~ 9999";
this.labelDiffHoldDelay.Text = afterValue;
this.labelDiffHoldDelay.Text = before;
this.smartTimerMessageShow.Start();
return;
}
@ -562,18 +601,21 @@ namespace INT_PT002.Controls
this.labelDiffHoldDelay.Text = myKeypad.StringValue;
this.ParentForm.ParentForm.CurrentRecipe.DIFF_HOLD_DELAY_MSEC = myKeypad.IntValue;
this.ParentForm.ParentForm.SaveRecipeFile(this.ParentForm.ParentForm.CurrentRecipe);
after = myKeypad.StringValue;
value = Helper.StringBlankFillDigits4(myKeypad.StringValue);
this.ParentForm.ParentForm.TransferDataStream(CommunicationCommand.Write, CommunicationID.MainBoard, CommunicationAddress._5516_DiffHoldDelay, value);
this.ParentForm.ParentForm.SetTrackingHistoryData(Define.E_TrackingParameter.Diff_WaitingTime, "", before, after);
}
}
// SysteConfiguration
private void labelLcdDataPeriod_Click(object sender, EventArgs e)
{
string value = "", afterValue = "";
string value = "", before = "", after = "";
afterValue = this.labelLcdDataPeriod.Text;
before = this.labelLcdDataPeriod.Text;
DialogFormNumKeyPad myKeypad = new DialogFormNumKeyPad(this.smartLabel14.Text, this.labelLcdDataPeriod.Text, 4, 0, false);
if (myKeypad.ShowDialog() == DialogResult.OK)
@ -581,7 +623,7 @@ namespace INT_PT002.Controls
if (myKeypad.IntValue < 100 || myKeypad.IntValue > 5000)
{
this.MessageBoxRange = "100 ~ 5000";
this.labelLcdDataPeriod.Text = afterValue;
this.labelLcdDataPeriod.Text = before;
this.smartTimerMessageShow.Start();
return;
}
@ -589,16 +631,19 @@ namespace INT_PT002.Controls
this.labelLcdDataPeriod.Text = myKeypad.StringValue;
this.ParentForm.ParentForm.SystemConfig.LCD_DATA_PERIOD = myKeypad.IntValue;
this.ParentForm.ParentForm.SaveSystemConfigurationFile(this.ParentForm.ParentForm.SystemConfig);
after = myKeypad.StringValue;
value = Helper.StringBlankFillDigits4(myKeypad.StringValue);
this.ParentForm.ParentForm.TransferDataStream(CommunicationCommand.Write, CommunicationID.MainBoard, CommunicationAddress._1710_LcdDataPeriod, value);
this.ParentForm.ParentForm.SetTrackingHistoryData(Define.E_TrackingParameter.Etc_LcdDataPeriod, "", before, after);
}
}
private void labelChattering_Click(object sender, EventArgs e)
{
string value = "", afterValue = "";
string value = "", before = "", after = "";
afterValue = this.labelChattering.Text;
before = this.labelChattering.Text;
DialogFormNumKeyPad myKeypad = new DialogFormNumKeyPad(this.smartLabel18.Text, this.labelChattering.Text, 4, 0, false);
if (myKeypad.ShowDialog() == DialogResult.OK)
@ -606,7 +651,7 @@ namespace INT_PT002.Controls
if (myKeypad.IntValue < 50 || myKeypad.IntValue > 500)
{
this.MessageBoxRange = "50 ~ 500";
this.labelChattering.Text = afterValue;
this.labelChattering.Text = before;
this.smartTimerMessageShow.Start();
return;
}
@ -614,16 +659,19 @@ namespace INT_PT002.Controls
this.labelChattering.Text = myKeypad.StringValue;
this.ParentForm.ParentForm.SystemConfig.CHATTERING = myKeypad.IntValue;
this.ParentForm.ParentForm.SaveSystemConfigurationFile(this.ParentForm.ParentForm.SystemConfig);
after = myKeypad.StringValue;
value = Helper.StringBlankFillDigits4(myKeypad.StringValue);
this.ParentForm.ParentForm.TransferDataStream(CommunicationCommand.Write, CommunicationID.MainBoard, CommunicationAddress._6006_Chattering, value);
this.ParentForm.ParentForm.SetTrackingHistoryData(Define.E_TrackingParameter.Etc_Chattering, "", before, after);
}
}
private void labelCutWait_Click(object sender, EventArgs e)
{
string value = "", afterValue = "";
string value = "", before = "", after = "";
afterValue = this.labelCutWait.Text;
before = this.labelCutWait.Text;
DialogFormNumKeyPad myKeypad = new DialogFormNumKeyPad(this.smartLabel20.Text, this.labelCutWait.Text, 4, 0, false);
if (myKeypad.ShowDialog() == DialogResult.OK)
@ -631,7 +679,7 @@ namespace INT_PT002.Controls
if (myKeypad.IntValue < 100 || myKeypad.IntValue > 9999)
{
this.MessageBoxRange = "100 ~ 9999";
this.labelCutWait.Text = afterValue;
this.labelCutWait.Text = before;
this.smartTimerMessageShow.Start();
return;
}
@ -639,16 +687,19 @@ namespace INT_PT002.Controls
this.labelCutWait.Text = myKeypad.StringValue;
this.ParentForm.ParentForm.SystemConfig.JUDGMENT_DELAY_MSEC = myKeypad.IntValue;
this.ParentForm.ParentForm.SaveSystemConfigurationFile(this.ParentForm.ParentForm.SystemConfig);
after = myKeypad.StringValue;
value = Helper.StringBlankFillDigits4(myKeypad.StringValue);
this.ParentForm.ParentForm.TransferDataStream(CommunicationCommand.Write, CommunicationID.MainBoard, CommunicationAddress._5508_CuttingWait, value);
this.ParentForm.ParentForm.SetTrackingHistoryData(Define.E_TrackingParameter.Etc_CutWait, "", before, after);
}
}
private void labelBuzzer_Click(object sender, EventArgs e)
{
string value = "", afterValue = "";
string value = "", before = "", after = "";
afterValue = this.labelBuzzer.Text;
before = this.labelBuzzer.Text;
DialogFormNumKeyPad myKeypad = new DialogFormNumKeyPad(this.smartLabel23.Text, this.labelBuzzer.Text, 4, 0, false);
if (myKeypad.ShowDialog() == DialogResult.OK)
@ -656,7 +707,7 @@ namespace INT_PT002.Controls
if (myKeypad.IntValue < 0 || myKeypad.IntValue > 9999)
{
this.MessageBoxRange = "0 ~ 9999";
this.labelBuzzer.Text = afterValue;
this.labelBuzzer.Text = before;
this.smartTimerMessageShow.Start();
return;
}
@ -664,16 +715,19 @@ namespace INT_PT002.Controls
this.labelBuzzer.Text = myKeypad.StringValue;
this.ParentForm.ParentForm.SystemConfig.BUZZER_OP = myKeypad.IntValue;
this.ParentForm.ParentForm.SaveSystemConfigurationFile(this.ParentForm.ParentForm.SystemConfig);
after = myKeypad.StringValue;
value = Helper.StringBlankFillDigits4(myKeypad.StringValue);
this.ParentForm.ParentForm.TransferDataStream(CommunicationCommand.Write, CommunicationID.MainBoard, CommunicationAddress._6001_BuzzerOP, value);
this.ParentForm.ParentForm.SetTrackingHistoryData(Define.E_TrackingParameter.Etc_Buzzer, "", before, after);
}
}
private void labelSbDiffFilter_Click(object sender, EventArgs e)
{
string value = "", afterValue = "";
string value = "", before = "", after = "";
afterValue = this.labelSbDiffFilter.Text;
before = this.labelSbDiffFilter.Text;
DialogFormNumKeyPad myKeypad = new DialogFormNumKeyPad(this.smartLabel27.Text, this.labelSbDiffFilter.Text, 2, 0, false);
if (myKeypad.ShowDialog() == DialogResult.OK)
@ -681,7 +735,7 @@ namespace INT_PT002.Controls
if (myKeypad.IntValue < 1 || myKeypad.IntValue > 16)
{
this.MessageBoxRange = "1 ~ 16";
this.labelSbDiffFilter.Text = afterValue;
this.labelSbDiffFilter.Text = before;
this.smartTimerMessageShow.Start();
return;
}
@ -689,9 +743,12 @@ namespace INT_PT002.Controls
this.labelSbDiffFilter.Text = myKeypad.StringValue;
this.ParentForm.ParentForm.SystemConfig.SB_DIFF_FILTER = myKeypad.IntValue;
this.ParentForm.ParentForm.SaveSystemConfigurationFile(this.ParentForm.ParentForm.SystemConfig);
after = myKeypad.StringValue;
value = Helper.StringBlankFillDigits4(myKeypad.StringValue);
this.ParentForm.ParentForm.TransferDataStream(CommunicationCommand.Write, CommunicationID.MainBoard, CommunicationAddress._1706_SbDiffFilter, value);
this.ParentForm.ParentForm.SetTrackingHistoryData(Define.E_TrackingParameter.Etc_SbDiffFilter, "", before, after);
}
}

View File

@ -0,0 +1,379 @@
using System;
using System.Linq;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Text;
namespace INT_PT002.DataStore
{
public class AlarmList
{
#region Field
private bool m_IsServo1Alarm;
private bool m_IsServo2Alarm;
private bool m_IsServo1TorqueAlarm;
private bool m_IsServo2TorqueAlarm;
private bool m_IsPressureError;
private bool m_IsServoEmergencyStop;
private Collection<bool> m_CollectionIsSensorBoardError;
public event Define.EventHandlerAlarmStateChange EventAlarmStateChange;
#endregion
#region Constructor
public AlarmList()
{
this.Initialize();
}
#endregion
#region Property
public bool IsServo1Alarm
{
get { return this.m_IsServo1Alarm; }
set { this.m_IsServo1Alarm = value; }
}
public bool IsServo2Alarm
{
get { return this.m_IsServo2Alarm; }
set { this.m_IsServo2Alarm = value; }
}
public bool IsServoTorque1AlarmTorque
{
get { return this.m_IsServo1TorqueAlarm; }
set { this.m_IsServo1TorqueAlarm = value; }
}
public bool IsServoTorque2AlarmTorque
{
get { return this.m_IsServo2TorqueAlarm; }
set { this.m_IsServo2TorqueAlarm = value; }
}
public bool IsPressureError
{
get { return this.m_IsPressureError; }
set { this.m_IsPressureError = value; }
}
public bool IsServoEmergencyStop
{
get { return this.m_IsServoEmergencyStop; }
set { this.m_IsServoEmergencyStop = value; }
}
public Collection<bool> CollectionIsSensorBoardError
{
get { return this.m_CollectionIsSensorBoardError; }
set { this.m_CollectionIsSensorBoardError = value; }
}
#endregion
#region Method
private void Initialize()
{
this.IsServo1Alarm = false;
this.IsServo2Alarm = false;
this.IsServoTorque1AlarmTorque = false;
this.IsServoTorque2AlarmTorque = false;
this.IsPressureError = false;
this.IsServoEmergencyStop = false;
this.CollectionIsSensorBoardError = new Collection<bool>();
for (int i = 0; i < 10; i++)
this.CollectionIsSensorBoardError.Add(false);
}
public void SetAlarm(string alarm)
{
string sValue1 = "", sValue2 = "", sValue3 = "", sValue4 = "", sValue5 = "", sValue6 = "", sValue7 = "", sValue8 = "";
if (alarm.Length != 8)
return;
sValue1 = Convert.ToString(Convert.ToInt16(alarm.Substring(0, 1), 16), 2).PadLeft((4 <= 1) ? 1 : 4, '0');
sValue2 = Convert.ToString(Convert.ToInt16(alarm.Substring(1, 1), 16), 2).PadLeft((4 <= 1) ? 1 : 4, '0');
sValue3 = Convert.ToString(Convert.ToInt16(alarm.Substring(2, 1), 16), 2).PadLeft((4 <= 1) ? 1 : 4, '0');
sValue4 = Convert.ToString(Convert.ToInt16(alarm.Substring(3, 1), 16), 2).PadLeft((4 <= 1) ? 1 : 4, '0');
sValue5 = Convert.ToString(Convert.ToInt16(alarm.Substring(4, 1), 16), 2).PadLeft((4 <= 1) ? 1 : 4, '0');
sValue6 = Convert.ToString(Convert.ToInt16(alarm.Substring(5, 1), 16), 2).PadLeft((4 <= 1) ? 1 : 4, '0');
sValue7 = Convert.ToString(Convert.ToInt16(alarm.Substring(6, 1), 16), 2).PadLeft((4 <= 1) ? 1 : 4, '0');
sValue8 = Convert.ToString(Convert.ToInt16(alarm.Substring(7, 1), 16), 2).PadLeft((4 <= 1) ? 1 : 4, '0');
// 알람 16-센서보드10 에러
if (sValue4[0] == '0')
{
if (this.CollectionIsSensorBoardError[9] != false)
{
this.CollectionIsSensorBoardError[9] = false;
this.EventAlarmStateChange(Define.E_Trackingalarm.a16_SensorBoard10Error, "OFF");
}
}
else
{
if (this.CollectionIsSensorBoardError[9] != true)
{
this.CollectionIsSensorBoardError[9] = true;
this.EventAlarmStateChange(Define.E_Trackingalarm.a16_SensorBoard10Error, "ON");
}
}
// 알람 15-센서보드9 에러
if (sValue4[1] == '0')
{
if (this.CollectionIsSensorBoardError[8] != false)
{
this.CollectionIsSensorBoardError[8] = false;
this.EventAlarmStateChange(Define.E_Trackingalarm.a15_SensorBoard9Error, "OFF");
}
}
else
{
if (this.CollectionIsSensorBoardError[8] != true)
{
this.CollectionIsSensorBoardError[8] = true;
this.EventAlarmStateChange(Define.E_Trackingalarm.a15_SensorBoard9Error, "ON");
}
}
// 알람 14-센서보드8 에러
if (sValue4[2] == '0')
{
if (this.CollectionIsSensorBoardError[7] != false)
{
this.CollectionIsSensorBoardError[7] = false;
this.EventAlarmStateChange(Define.E_Trackingalarm.a14_SensorBoard8Error, "OFF");
}
}
else
{
if (this.CollectionIsSensorBoardError[7] != true)
{
this.CollectionIsSensorBoardError[7] = true;
this.EventAlarmStateChange(Define.E_Trackingalarm.a14_SensorBoard8Error, "ON");
}
}
// 알람 13-센서보드7 에러
if (sValue4[3] == '0')
{
if (this.CollectionIsSensorBoardError[6] != false)
{
this.CollectionIsSensorBoardError[6] = false;
this.EventAlarmStateChange(Define.E_Trackingalarm.a13_SensorBoard7Error, "OFF");
}
}
else
{
if (this.CollectionIsSensorBoardError[6] != true)
{
this.CollectionIsSensorBoardError[6] = true;
this.EventAlarmStateChange(Define.E_Trackingalarm.a13_SensorBoard7Error, "ON");
}
}
// 알람 12-센서보드6 에러
if (sValue3[0] == '0')
{
if (this.CollectionIsSensorBoardError[5] != false)
{
this.CollectionIsSensorBoardError[5] = false;
this.EventAlarmStateChange(Define.E_Trackingalarm.a12_SensorBoard6Error, "OFF");
}
}
else
{
if (this.CollectionIsSensorBoardError[5] != true)
{
this.CollectionIsSensorBoardError[5] = true;
this.EventAlarmStateChange(Define.E_Trackingalarm.a12_SensorBoard6Error, "ON");
}
}
// 알람 11-센서보드5 에러
if (sValue3[1] == '0')
{
if (this.CollectionIsSensorBoardError[4] != false)
{
this.CollectionIsSensorBoardError[4] = false;
this.EventAlarmStateChange(Define.E_Trackingalarm.a11_SensorBoard5Error, "OFF");
}
}
else
{
if (this.CollectionIsSensorBoardError[4] != true)
{
this.CollectionIsSensorBoardError[4] = true;
this.EventAlarmStateChange(Define.E_Trackingalarm.a11_SensorBoard5Error, "ON");
}
}
// 알람 10-센서보드4 에러
if (sValue3[2] == '0')
{
if (this.CollectionIsSensorBoardError[3] != false)
{
this.CollectionIsSensorBoardError[3] = false;
this.EventAlarmStateChange(Define.E_Trackingalarm.a10_SensorBoard4Error, "OFF");
}
}
else
{
if (this.CollectionIsSensorBoardError[3] != true)
{
this.CollectionIsSensorBoardError[3] = true;
this.EventAlarmStateChange(Define.E_Trackingalarm.a10_SensorBoard4Error, "ON");
}
}
// 알람 9-센서보드3 에러
if (sValue3[3] == '0')
{
if (this.CollectionIsSensorBoardError[2] != false)
{
this.CollectionIsSensorBoardError[2] = false;
this.EventAlarmStateChange(Define.E_Trackingalarm.a9_SensorBoard3Error, "OFF");
}
}
else
{
if (this.CollectionIsSensorBoardError[2] != true)
{
this.CollectionIsSensorBoardError[2] = true;
this.EventAlarmStateChange(Define.E_Trackingalarm.a9_SensorBoard3Error, "ON");
}
}
// 알람 8-센서보드2 에러
if (sValue2[0] == '0')
{
if (this.CollectionIsSensorBoardError[1] != false)
{
this.CollectionIsSensorBoardError[1] = false;
this.EventAlarmStateChange(Define.E_Trackingalarm.a8_SensorBoard2Error, "OFF");
}
}
else
{
if (this.CollectionIsSensorBoardError[1] != true)
{
this.CollectionIsSensorBoardError[1] = true;
this.EventAlarmStateChange(Define.E_Trackingalarm.a8_SensorBoard2Error, "ON");
}
}
// 알람 7-센서보드1 에러
if (sValue2[1] == '0')
{
if (this.CollectionIsSensorBoardError[0] != false)
{
this.CollectionIsSensorBoardError[0] = false;
this.EventAlarmStateChange(Define.E_Trackingalarm.a7_SensorBoard1Error, "OFF");
}
}
else
{
if (this.CollectionIsSensorBoardError[0] != true)
{
this.CollectionIsSensorBoardError[0] = true;
this.EventAlarmStateChange(Define.E_Trackingalarm.a7_SensorBoard1Error, "ON");
}
}
// 알람 6-압력에러
if (sValue2[2] == '0')
{
if (this.IsPressureError != false)
{
this.IsPressureError = false;
this.EventAlarmStateChange(Define.E_Trackingalarm.a6_PressureError, "OFF");
}
}
else
{
if (this.IsPressureError != true)
{
this.IsPressureError = true;
this.EventAlarmStateChange(Define.E_Trackingalarm.a6_PressureError, "ON");
}
}
// 알람 5-서보2 토크
if (sValue2[3] == '0')
{
if (this.IsServoTorque2AlarmTorque != false)
{
this.IsServoTorque2AlarmTorque = false;
this.EventAlarmStateChange(Define.E_Trackingalarm.a5_Servo2TorqueAlarm, "OFF");
}
}
else
{
if (this.IsServoTorque2AlarmTorque != true)
{
this.IsServoTorque2AlarmTorque = true;
this.EventAlarmStateChange(Define.E_Trackingalarm.a5_Servo2TorqueAlarm, "ON");
}
}
// 알람 4-서보1 토크
if (sValue1[0] == '0')
{
if (this.IsServoTorque1AlarmTorque != false)
{
this.IsServoTorque1AlarmTorque = false;
this.EventAlarmStateChange(Define.E_Trackingalarm.a4_Servo1TorqueAlarm, "OFF");
}
}
else
{
if (this.IsServoTorque1AlarmTorque != true)
{
this.IsServoTorque1AlarmTorque = true;
this.EventAlarmStateChange(Define.E_Trackingalarm.a4_Servo1TorqueAlarm, "ON");
}
}
// 알람 3-서보2 알람
if (sValue1[1] == '0')
{
if (this.IsServo2Alarm != false)
{
this.IsServo2Alarm = false;
this.EventAlarmStateChange(Define.E_Trackingalarm.a3_Servo2Alarm, "OFF");
}
}
else
{
if (this.IsServo2Alarm != true)
{
this.IsServo2Alarm = true;
this.EventAlarmStateChange(Define.E_Trackingalarm.a3_Servo2Alarm, "ON");
}
}
// 알람 2-서보1 알람
if (sValue1[2] == '0')
{
if (this.IsServo1Alarm != false)
{
this.IsServo1Alarm = false;
this.EventAlarmStateChange(Define.E_Trackingalarm.a2_Servo1Alarm, "OFF");
}
}
else
{
if (this.IsServo1Alarm != true)
{
this.IsServo1Alarm = true;
this.EventAlarmStateChange(Define.E_Trackingalarm.a2_Servo1Alarm, "ON");
}
}
// 알람 1-서보OFF
if (sValue1[3] == '0')
{
if (this.IsServoEmergencyStop != false)
{
this.IsServoEmergencyStop = false;
this.EventAlarmStateChange(Define.E_Trackingalarm.a1_ServoEmergencyStop, "OFF");
}
}
else
{
if (this.IsServoEmergencyStop != true)
{
this.IsServoEmergencyStop = true;
this.EventAlarmStateChange(Define.E_Trackingalarm.a1_ServoEmergencyStop, "ON");
}
}
}
#endregion
}
}

View File

@ -0,0 +1,78 @@
using System;
using System.Linq;
using System.Collections.Generic;
using System.Text;
namespace INT_PT002.DataStore
{
#region DataBackupYear
public class DataBackupYear
{
#region Field
private string m_Year;
public List<DataBackupMonth> Months;
#endregion
#region Constructor
public DataBackupYear(string year)
{
this.Initialize();
this.Year = year;
}
#endregion
#region Property
public string Year
{
get { return this.m_Year; }
private set { this.m_Year = value; }
}
#endregion
#region Method
private void Initialize()
{
this.Year = "";
this.Months = new List<DataBackupMonth>();
}
#endregion
}
#endregion
#region DataBackupMonth
public class DataBackupMonth
{
#region Field
private string m_Month;
public List<string> Days;
#endregion
#region Constructor
public DataBackupMonth(string month)
{
this.Initialize();
this.Month = month;
}
#endregion
#region Property
public string Month
{
get { return this.m_Month; }
private set { this.m_Month = value; }
}
#endregion
#region Method
private void Initialize()
{
this.Month = "";
this.Days = new List<string>();
}
#endregion
}
#endregion
}

View File

@ -171,42 +171,35 @@ namespace INT_PT002.DataStore
public enum E_TrackingParameter
{
ProductNumber,
WeightOverRange,
WeightPassRange,
WeightUnderRange,
WeightTareRange,
RecipeNumber,
Pressure,
JudgmentFilter,
JudgmentDelayTime,
JudgmentDamperDelayTime,
JudgmentCount,
SorterDelayTime,
SorterRunTime,
Disp_STD,
Disp_IPH,
Disp_Min,
Disp_WaitingTime,
AutoZeroTime,
AutoZeroRange,
AutoZeroVariance,
Diff_SEC,
Diff_AVG,
Diff_SUM,
Diff_WaitingTime,
Com3Baurate,
Com3Mode,
P_reliefTime,
P_HlodingTime,
P_HoldingTime2,
P_BreakTime,
CalMaxWeight,
CalBalWeight,
CalDigit,
Etc_LcdDataPeriod,
Etc_Chattering,
Etc_CutWait,
Etc_Buzzer,
Etc_SbDiffFilter,
EtcDoubleEntry,
EtcChattering,
EtcBuzzerRunTime,
EtcRelayRunTime,
EtcDecimalpoint,
MotorOriginOffset,
MotorOriginSpeed,
MotorSpeed,
MotorPosition0,
MotorPosition1,
MotorPosition2,
M1_Origin,
M1_Front1,
M1_Front2,
M2_Origin,
M2_Turn,
}
public enum E_Trackingalarm

View File

@ -0,0 +1,78 @@
using System;
using System.Linq;
using System.Collections.Generic;
using System.Text;
namespace INT_PT002.DataStore
{
public class HistoryData
{
#region Field
private string m_Type;
private DateTime m_Time;
private string m_LoginID;
private Object m_Event;
private string m_Detail;
private string m_BeforeData;
private string m_AfterData;
#endregion
#region Constructor
public HistoryData()
{
this.Initialize();
}
#endregion
#region Property
public string Type
{
get { return this.m_Type; }
set { this.m_Type = value; }
}
public DateTime Time
{
get { return this.m_Time; }
set { this.m_Time = value; }
}
public string LoginID
{
get { return this.m_LoginID; }
set { this.m_LoginID = value; }
}
public Object Event
{
get { return this.m_Event; }
set { this.m_Event = value; }
}
public string Detail
{
get { return this.m_Detail; }
set { this.m_Detail = value; }
}
public string BeforeData
{
get { return this.m_BeforeData; }
set { this.m_BeforeData = value; }
}
public string AfterData
{
get { return this.m_AfterData; }
set { this.m_AfterData = value; }
}
#endregion
#region Method
private void Initialize()
{
this.Type = "";
this.Time = new DateTime();
this.LoginID = "-";
this.Event = new object();
this.Detail = "";
this.AfterData = "";
this.BeforeData = "";
}
#endregion
}
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,158 @@
using System;
using System.Linq;
using System.Collections.Generic;
using System.Text;
namespace INT_PT002.DataStore
{
public class UpdateForMainBoard
{
#region Field
private bool m_IsUpdateFinish;
private bool m_IsAckResponse;
private bool m_IsLastData;
private byte[] m_ByteData;
private byte[] m_SendData;
private int m_Index;
private int m_RetryCount;
private int m_SendDataCount;
private int m_ProgressBar1;
private int m_ProgressBar2;
private int m_ProgressBar3;
private int m_ProgressBar4;
private int m_ProgressBar5;
private int m_ProgressBar6;
private int m_ProgressBar7;
private int m_ProgressBar8;
#endregion
#region Constructor
public UpdateForMainBoard()
{
this.Initialize();
}
#endregion
#region Property
public bool IsUpdateFinish
{
get { return this.m_IsUpdateFinish; }
set { this.m_IsUpdateFinish = value; }
}
public bool IsAckResponse
{
get { return this.m_IsAckResponse; }
set { this.m_IsAckResponse = value; }
}
public bool IsLastData
{
get { return this.m_IsLastData; }
set { this.m_IsLastData = value; }
}
public byte[] ByteData
{
get { return this.m_ByteData; }
set { this.m_ByteData = value; }
}
public byte[] SendData
{
get { return this.m_SendData; }
set { this.m_SendData = value; }
}
public int Index
{
get { return this.m_Index; }
set { this.m_Index = value; }
}
public int RetryCount
{
get { return this.m_RetryCount; }
set { this.m_RetryCount = value; }
}
public int SendDataCount
{
get { return this.m_SendDataCount; }
set
{
int iValue = 0;
this.m_SendDataCount = value;
iValue = value / 8;
this.ProgressBar1 = iValue;
this.ProgressBar2 = iValue * 2;
this.ProgressBar3 = iValue * 3;
this.ProgressBar4 = iValue * 4;
this.ProgressBar5 = iValue * 5;
this.ProgressBar6 = iValue * 6;
this.ProgressBar7 = iValue * 7;
this.ProgressBar8 = iValue * 8;
}
}
public int ProgressBar1
{
get { return this.m_ProgressBar1; }
private set { this.m_ProgressBar1 = value; }
}
public int ProgressBar2
{
get { return this.m_ProgressBar2; }
private set { this.m_ProgressBar2 = value; }
}
public int ProgressBar3
{
get { return this.m_ProgressBar3; }
private set { this.m_ProgressBar3 = value; }
}
public int ProgressBar4
{
get { return this.m_ProgressBar4; }
private set { this.m_ProgressBar4 = value; }
}
public int ProgressBar5
{
get { return this.m_ProgressBar5; }
private set { this.m_ProgressBar5 = value; }
}
public int ProgressBar6
{
get { return this.m_ProgressBar6; }
private set { this.m_ProgressBar6 = value; }
}
public int ProgressBar7
{
get { return this.m_ProgressBar7; }
private set { this.m_ProgressBar7 = value; }
}
public int ProgressBar8
{
get { return this.m_ProgressBar8; }
private set { this.m_ProgressBar8 = value; }
}
#endregion
#region Method
public void Initialize()
{
this.IsUpdateFinish = false;
this.IsAckResponse = false;
this.IsLastData = false;
this.ByteData = new byte[100];
this.SendData = new byte[100];
this.Index = 1;
this.RetryCount = 0;
this.SendDataCount = 0;
this.ProgressBar1 = 0;
this.ProgressBar2 = 0;
this.ProgressBar3 = 0;
this.ProgressBar4 = 0;
this.ProgressBar5 = 0;
this.ProgressBar6 = 0;
this.ProgressBar7 = 0;
this.ProgressBar8 = 0;
}
#endregion
}
}

View File

@ -0,0 +1,846 @@
using System;
using System.Linq;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Runtime.InteropServices;
using System.Text;
namespace INT_PT002.DataStore
{
#region User
public class CollectionUser
{
#region Field
private Collection<User> m_Level1Users;
private Collection<User> m_Level2Users;
private Collection<User> m_Level3Users;
private User m_DefaultUsers;
private User m_DeveloperUser;
#endregion
#region Constructor
public CollectionUser()
{
this.Initialize();
}
#endregion
#region Property
public Collection<User> Level1Users
{
get { return this.m_Level1Users; }
set { this.m_Level1Users = value; }
}
public Collection<User> Level2Users
{
get { return this.m_Level2Users; }
set { this.m_Level2Users = value; }
}
public Collection<User> Level3Users
{
get { return this.m_Level3Users; }
set { this.m_Level3Users = value; }
}
public User DefaultUsers
{
get { return this.m_DefaultUsers; }
set { this.m_DefaultUsers = value; }
}
public User DeveloperUser
{
get { return this.m_DeveloperUser; }
private set { this.m_DeveloperUser = value; }
}
#endregion
#region Method
private void Initialize()
{
this.Level1Users = new Collection<User>();
this.Level2Users = new Collection<User>();
this.Level3Users = new Collection<User>();
this.Level1Users.Clear();
this.Level2Users.Clear();
this.Level3Users.Clear();
for (int i = 0; i < 5; i++)
{
this.Level1Users.Add(new User());
this.Level2Users.Add(new User());
this.Level3Users.Add(new User());
}
this.DefaultUsers = new User();
this.DeveloperUser = new User();
this.DeveloperUser.ID = "Intech";
this.DeveloperUser.Password = "20090810";
this.DeveloperUser.Group = Define.E_UserStatus.Developer;
}
public User FindUser(string id)
{
User user = null;
// 개발자 유저 검색
if (id == this.DeveloperUser.ID)
{
user = new User();
user.ID = this.DeveloperUser.ID;
user.Password = this.DeveloperUser.Password;
user.Group = this.DeveloperUser.Group;
return user;
}
// 일반 유저 검색
for (int i = 0; i < this.Level1Users.Count; i++)
{
if (this.Level1Users[i].Group != Define.E_UserStatus.None)
{
if (this.Level1Users[i].ID.Trim() == id.Trim())
{
user = new User();
user.ID = this.Level1Users[i].ID.Trim();
user.Password = this.Level1Users[i].Password;
user.Group = this.Level1Users[i].Group;
return user;
}
}
if (this.Level2Users[i].Group != Define.E_UserStatus.None)
{
if (this.Level2Users[i].ID.Trim() == id.Trim())
{
user = new User();
user.ID = this.Level2Users[i].ID.Trim();
user.Password = this.Level2Users[i].Password;
user.Group = this.Level2Users[i].Group;
return user;
}
}
if (this.Level3Users[i].Group != Define.E_UserStatus.None)
{
if (this.Level3Users[i].ID.Trim() == id.Trim())
{
user = new User();
user.ID = this.Level3Users[i].ID.Trim();
user.Password = this.Level3Users[i].Password;
user.Group = this.Level3Users[i].Group;
return user;
}
}
}
return user;
}
public User FindDeveloperUser(string id)
{
User user = null;
// 개발자 유저 검색
if (id == this.DeveloperUser.ID)
{
user = new User();
user.ID = this.DeveloperUser.ID;
user.Password = this.DeveloperUser.Password;
user.Group = this.DeveloperUser.Group;
return user;
}
return user;
}
public bool SearchID(string id)
{
bool ret = false;
for (int i = 0; i < this.Level1Users.Count; i++)
{
if (this.Level1Users[i].ID.Trim() == id.Trim())
return ret = true;
}
for (int i = 0; i < this.Level2Users.Count; i++)
{
if (this.Level2Users[i].ID.Trim() == id.Trim())
return ret = true;
}
for (int i = 0; i < this.Level3Users.Count; i++)
{
if (this.Level3Users[i].ID.Trim() == id.Trim())
return ret = true;
}
return ret;
}
#endregion
}
#endregion
#region User
public class User
{
#region Field
private string m_ID;
private string m_Password;
private Define.E_UserStatus m_Group;
#endregion
#region Constructor
public User()
{
this.Initialize();
}
#endregion
#region Property
public string ID
{
get { return this.m_ID; }
set { this.m_ID = value; }
}
public string Password
{
get { return this.m_Password; }
set { this.m_Password = value; }
}
public Define.E_UserStatus Group
{
get { return this.m_Group; }
set { this.m_Group = value; }
}
#endregion
#region Method
private void Initialize()
{
this.ID = "-";
this.Password = "-";
this.Group = Define.E_UserStatus.None;
}
#endregion
}
#endregion
#region StructUserItem
[StructLayout(LayoutKind.Sequential)]
public struct StructUserItemPrevious
{
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 20)]
public string ID;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 20)]
public string Password;
public Define.E_UserStatus Group;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 20)]
public string Dummy1;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 20)]
public string Dummy2;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 20)]
public string Dummy3;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 20)]
public string Dummy4;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 20)]
public string Dummy5;
}
#endregion
#region UserGroup
public class UserGroup
{
#region Field
private UserGroupItem m_Level1;
private UserGroupItem m_Level2;
private UserGroupItem m_Level3;
private UserGroupItem m_Default;
#endregion
#region Constructor
public UserGroup()
{
this.Initialize();
}
#endregion
#region Property
public UserGroupItem Level1
{
get { return this.m_Level1; }
set { this.m_Level1 = value; }
}
public UserGroupItem Level2
{
get { return this.m_Level2; }
set { this.m_Level2 = value; }
}
public UserGroupItem Level3
{
get { return this.m_Level3; }
set { this.m_Level3 = value; }
}
public UserGroupItem Default
{
get { return this.m_Default; }
set { this.m_Default = value; }
}
#endregion
#region Method
private void Initialize()
{
this.Level1 = new UserGroupItem();
this.Level2 = new UserGroupItem();
this.Level3 = new UserGroupItem();
this.Default = new UserGroupItem();
}
public bool GetSet1AccessRight(Define.E_FormStore display)
{
bool ret = false;
return ret;
}
public bool GetSet2AccessRight(Define.E_FormStore display)
{
bool ret = false;
return ret;
}
public bool GetSet3AccessRight(Define.E_FormStore display)
{
bool ret = false;
return ret;
}
#endregion
}
#endregion
#region UserGroupItem
public class UserGroupItem
{
#region Field
private bool m_IsMainDisplayProductChange;
private bool m_IsMainDisplayClear;
private bool m_IsMainDisplaySubMenu;
private bool m_IsMenuRecipe;
private bool m_IsMenuUserSetting;
private bool m_IsMenuUserGroupEditor;
private bool m_IsMenuIOTest;
private bool m_IsMenuHistoryLog;
private bool m_IsMenuInspectionLog;
private bool m_IsMenuAlarmLog;
private bool m_IsMenuInformation;
private bool m_IsMenuStatus;
#endregion
#region Constructor
public UserGroupItem()
{
this.Initialize();
}
#endregion
#region Property
public bool IsMainDisplayProductChange
{
get { return this.m_IsMainDisplayProductChange; }
set { this.m_IsMainDisplayProductChange = value; }
}
public bool IsMainDisplayClear
{
get { return this.m_IsMainDisplayClear; }
set { this.m_IsMainDisplayClear = value; }
}
public bool IsMainDisplaySubMenu
{
get { return this.m_IsMainDisplaySubMenu; }
set { this.m_IsMainDisplaySubMenu = value; }
}
public bool IsMenuRecipe
{
get { return this.m_IsMenuRecipe; }
set { this.m_IsMenuRecipe = value; }
}
public bool IsMenuUserSetting
{
get { return this.m_IsMenuUserSetting; }
set { this.m_IsMenuUserSetting = value; }
}
public bool IsMenuUserGroupEditor
{
get { return this.m_IsMenuUserGroupEditor; }
set { this.m_IsMenuUserGroupEditor = value; }
}
public bool IsMenuIOTest
{
get { return this.m_IsMenuIOTest; }
set { this.m_IsMenuIOTest = value; }
}
public bool IsMenuHistoryLog
{
get { return this.m_IsMenuHistoryLog; }
set { this.m_IsMenuHistoryLog = value; }
}
public bool IsMenuInspectionLog
{
get { return this.m_IsMenuInspectionLog; }
set { this.m_IsMenuInspectionLog = value; }
}
public bool IsMenuAlarmLog
{
get { return this.m_IsMenuAlarmLog; }
set { this.m_IsMenuAlarmLog = value; }
}
public bool IsMenuInformation
{
get { return this.m_IsMenuInformation; }
set { this.m_IsMenuInformation = value; }
}
public bool IsMenuStatus
{
get { return this.m_IsMenuStatus; }
set { this.m_IsMenuStatus = value; }
}
public bool IsMainEnable
{
get
{
bool ret = false;
if (this.IsMainDisplayProductChange == true || this.IsMainDisplayClear == true
|| this.IsMainDisplaySubMenu == true)
ret = true;
return ret;
}
}
public bool IsRecipeEnable
{
get
{
bool ret = false;
if (this.IsMenuRecipe == true)
ret = true;
return ret;
}
}
public bool IsUserEnable
{
get
{
bool ret = false;
if (this.IsMenuUserSetting == true || this.IsMenuUserGroupEditor == true)
ret = true;
return ret;
}
}
public bool IsManualEnable
{
get
{
bool ret = false;
if (this.IsMenuIOTest == true)
ret = true;
return ret;
}
}
public bool IsLogEnable
{
get
{
bool ret = false;
if (this.IsMenuHistoryLog == true || this.IsMenuInspectionLog == true || this.IsMenuAlarmLog == true)
ret = true;
return ret;
}
}
public bool IsSystemEnable
{
get
{
bool ret = false;
if (this.IsMenuInformation == true || this.IsMenuStatus == true)
ret = true;
return ret;
}
}
#endregion
#region Method
private void Initialize()
{
this.IsMainDisplayProductChange = false;
this.IsMainDisplayClear = false;
this.IsMainDisplaySubMenu = false;
this.IsMenuRecipe = false;
this.IsMenuUserSetting = false;
this.IsMenuUserGroupEditor = false;
this.IsMenuIOTest = false;
this.IsMenuHistoryLog = false;
this.IsMenuInspectionLog = false;
this.IsMenuAlarmLog = false;
this.IsMenuInformation = false;
this.IsMenuStatus = false;
}
#endregion
}
#endregion
#region StructUserGroupItem(총 메뉴 개수 30개)
[StructLayout(LayoutKind.Sequential)]
public struct StructUserGroupItem
{
public bool IsMainDisplayRecipeChange;
public bool IsMainDisplayClear;
public bool IsMainDispalySubMenu;
public bool IsMenuRecipe;
public bool IsMenuUserSetting;
public bool IsMenuUserGroupEditor;
public bool IsMenuIOTest;
public bool IsMenuEquipmentLog;
public bool IsMenuCheckLog;
public bool IsMenuAlarmList;
public bool IsMenuInformation;
public bool IsMenuStatus;
public bool Dummy1;
public bool Dummy2;
public bool Dummy3;
public bool Dummy4;
public bool Dummy5;
public bool Dummy6;
public bool Dummy7;
public bool Dummy8;
public bool Dummy9;
public bool Dummy10;
public bool Dummy11;
public bool Dummy12;
public bool Dummy13;
public bool Dummy14;
public bool Dummy15;
public bool Dummy16;
public bool Dummy17;
public bool Dummy18;
}
#endregion
#region UserItem
public class UserItem
{
#region Field
private bool m_IsUpdate;
private string m_ID;
private string m_Password;
private string m_PreviousPassword1;
private string m_PreviousPassword2;
private string m_PreviousPassword3;
private int m_ExpireAccount;
private int m_ExpirePassword;
private bool m_IsLockAccount;
private bool m_IsLockPassword;
private DateTime m_DateRegister;
private DateTime m_DateLogin;
private DateTime m_DateExpireRegister;
private DateTime m_DateExpireLogin;
private Define.E_UserStatus m_Status;
private bool m_IsAdmin;
private bool m_IsMainRecipeChange;
private bool m_IsMainClear;
private bool m_IsMainSubMenu;
private bool m_IsMenuProduct;
private bool m_IsMenuUserSetting;
private bool m_IsMenuUserGroupEditor;
private bool m_IsMenuIOTest;
private bool m_IsMenuEquipmentLog;
private bool m_IsMenuCheckLog;
private bool m_IsMenuAlarmList;
private bool m_IsMenuInformation;
private bool m_IsMenuEquipmentTest;
#endregion
#region Constructor
public UserItem()
{
this.Initialize();
}
#endregion
#region Property
public bool IsUpdate
{
get { return this.m_IsUpdate; }
set { this.m_IsUpdate = value; }
}
public string ID
{
get { return this.m_ID; }
set { this.m_ID = value; }
}
public string Password
{
get { return this.m_Password; }
set { this.m_Password = value; }
}
public string PreviousPassword1
{
get { return this.m_PreviousPassword1; }
set { this.m_PreviousPassword1 = value; }
}
public string PreviousPassword2
{
get { return this.m_PreviousPassword2; }
set { this.m_PreviousPassword2 = value; }
}
public string PreviousPassword3
{
get { return this.m_PreviousPassword3; }
set { this.m_PreviousPassword3 = value; }
}
public int ExpireAccount
{
get { return this.m_ExpireAccount; }
set { this.m_ExpireAccount = value; }
}
public int ExpirePassword
{
get { return this.m_ExpirePassword; }
set { this.m_ExpirePassword = value; }
}
public bool IsLockAccount
{
get { return this.m_IsLockAccount; }
set { this.m_IsLockAccount = value; }
}
public bool IsLockPassword
{
get { return this.m_IsLockPassword; }
set { this.m_IsLockPassword = value; }
}
public DateTime DateRegister
{
get { return this.m_DateRegister; }
set { this.m_DateRegister = value; }
}
public DateTime DateLogin
{
get { return this.m_DateLogin; }
set { this.m_DateLogin = value; }
}
public DateTime DateExpireRegister
{
get { return this.m_DateExpireRegister; }
set { this.m_DateExpireRegister = value; }
}
public DateTime DateExpireLogin
{
get { return this.m_DateExpireLogin; }
set { this.m_DateExpireLogin = value; }
}
public Define.E_UserStatus Status
{
get { return this.m_Status; }
set { this.m_Status = value; }
}
public bool IsAdmin
{
get { return this.m_IsAdmin; }
set { this.m_IsAdmin = value; }
}
public bool IsMainRecipeChange
{
get { return this.m_IsMainRecipeChange; }
set { this.m_IsMainRecipeChange = value; }
}
public bool IsMainClear
{
get { return this.m_IsMainClear; }
set { this.m_IsMainClear = value; }
}
public bool IsMainSubMenu
{
get { return this.m_IsMainSubMenu; }
set { this.m_IsMainSubMenu = value; }
}
public bool IsMenuProduct
{
get { return this.m_IsMenuProduct; }
set { this.m_IsMenuProduct = value; }
}
public bool IsMenuUserSetting
{
get { return this.m_IsMenuUserSetting; }
set { this.m_IsMenuUserSetting = value; }
}
public bool IsMenuUserGroupEditor
{
get { return this.m_IsMenuUserGroupEditor; }
set { this.m_IsMenuUserGroupEditor = value; }
}
public bool IsMenuIOTest
{
get { return this.m_IsMenuIOTest; }
set { this.m_IsMenuIOTest = value; }
}
public bool IsMenuEquipmentLog
{
get { return this.m_IsMenuEquipmentLog; }
set { this.m_IsMenuEquipmentLog = value; }
}
public bool IsMenuCheckLog
{
get { return this.m_IsMenuCheckLog; }
set { this.m_IsMenuCheckLog = value; }
}
public bool IsMenuAlarmList
{
get { return this.m_IsMenuAlarmList; }
set { this.m_IsMenuAlarmList = value; }
}
public bool IsMenuInformation
{
get { return this.m_IsMenuInformation; }
set { this.m_IsMenuInformation = value; }
}
public bool IsMenuEquipmentTest
{
get { return this.m_IsMenuEquipmentTest; }
set { this.m_IsMenuEquipmentTest = value; }
}
#endregion
#region Method
private void Initialize()
{
this.IsUpdate = false;
this.ID = "-";
this.Password = "-";
this.PreviousPassword1 = "-";
this.PreviousPassword2 = "-";
this.PreviousPassword3 = "-";
this.ExpireAccount = 0;
this.ExpirePassword = 0;
this.DateRegister = DateTime.Now;
this.DateLogin = DateTime.Now;
this.DateExpireRegister = DateTime.Now;
this.DateExpireLogin = DateTime.Now;
this.Status = Define.E_UserStatus.None;
this.IsAdmin = false;
this.IsMainRecipeChange = false;
this.IsMainClear = false;
this.IsMainSubMenu = false;
this.IsMenuProduct = false;
this.IsMenuUserSetting = false;
this.IsMenuUserGroupEditor = false;
this.IsMenuIOTest = false;
this.IsMenuEquipmentLog = false;
this.IsMenuCheckLog = false;
this.IsMenuAlarmList = false;
this.IsMenuInformation = false;
this.IsMenuEquipmentTest = false;
}
public void SetPassword(string pass)
{
this.PreviousPassword3 = this.PreviousPassword2;
this.PreviousPassword2 = this.PreviousPassword1;
this.PreviousPassword1 = pass;
this.Password = pass;
}
public bool CheckID(string id)
{
bool ret = false;
return ret;
}
public bool CheckPassword(string pass)
{
bool ret = false;
return ret;
}
#endregion
}
#endregion
#region StructUserItem
[StructLayout(LayoutKind.Sequential)]
public struct StructUserItem
{
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 20)]
public string ID;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 20)]
public string Password;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 20)]
public string PreviousPassword1;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 20)]
public string PreviousPassword2;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 20)]
public string PreviousPassword3;
public int ExpireAccount;
public int ExpirePassword;
public DateTime DateRegister;
public DateTime DateLogin;
public bool IsAdmin;
public bool IsMainProductChange;
public bool IsMainWeightSetting;
public bool IsMainClear;
public bool IsMainSubMenu;
public bool IsMenuProduct;
public bool IsMenuUserSetting;
public bool IsMenuUserGroupEditor;
public bool IsMenuIOTest;
public bool IsMenuEquipmentLog;
public bool IsMenuCheckLog;
public bool IsMenuAlarmList;
public bool IsMenuInformation;
public bool IsMenuStatus;
}
#endregion
}

View File

@ -681,17 +681,21 @@ namespace INT_PT002.Forms
private void labelStop_Click(object sender, EventArgs e)
{
this.ParentForm.TransferData(CommunicationCommand.Start, CommunicationID.MainBoard);
this.ParentForm.SetTrackingHistoryData(Define.E_TrackingOperation.EquipmentStart, "");
}
private void labelStart_Click(object sender, EventArgs e)
{
this.ParentForm.TransferData(CommunicationCommand.Stop, CommunicationID.MainBoard);
this.ParentForm.SetTrackingHistoryData(Define.E_TrackingOperation.EquipmentStop, "");
}
private void buttonProductNo_Click(object sender, EventArgs e)
{
string afterValue = "";
string before = "", after = "";
afterValue = this.buttonRecipeNo.ButtonText;
before = this.buttonRecipeNo.ButtonText;
DialogFormNumKeyPad myKeypad = new DialogFormNumKeyPad("NUMBER", this.buttonRecipeNo.ButtonText, 4, 0, false);
if (myKeypad.ShowDialog() == DialogResult.OK)
@ -699,13 +703,16 @@ namespace INT_PT002.Forms
if (myKeypad.IntValue < 1 || myKeypad.IntValue > 1000)
{
this.MessageBoxRange = "1 ~ 1000";
this.buttonRecipeNo.ButtonText = afterValue;
this.buttonRecipeNo.ButtonText = before;
this.smartTimerMessageShow.Start();
return;
}
this.buttonRecipeNo.ButtonText = "**";
this.ParentForm.TransferRecipeParameter9043(myKeypad.IntValue);
after = myKeypad.StringValue;
this.ParentForm.SetTrackingHistoryData(Define.E_TrackingParameter.RecipeNumber, "", before, after);
}
}
private void buttonDisplayGraph_Click(object sender, EventArgs e)