Skip to content

Commit

Permalink
변경 (1.5 -> 1.6ver)
Browse files Browse the repository at this point in the history
 버그수정 : closeRestartDialog() 작동하지 않아서 Timer에 의해 호출되도록 수정.
  • Loading branch information
yeonSG committed Dec 13, 2021
1 parent 45ca95f commit cb11fe3
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 7 deletions.
2 changes: 1 addition & 1 deletion TubeFeederProject/TubeFeeder/DialogForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ private void comboBox_converterRollerSpeed_SelectedIndexChanged(object sender, E

private void smartButton_removeLogFile_Click(object sender, EventArgs e)
{
DialogResult dialogResult = MessageBox.Show("정말 로그파일을 삭제할까요?", "경고",MessageBoxButtons.OKCancel, MessageBoxIcon.Question, MessageBoxDefaultButton.Button2);
DialogResult dialogResult = MessageBox.Show("정말 로그파일을 삭제할까요?", "경고", MessageBoxButtons.OKCancel, MessageBoxIcon.Question, MessageBoxDefaultButton.Button2);

if (dialogResult != DialogResult.OK) {
return;
Expand Down
4 changes: 2 additions & 2 deletions TubeFeederProject/TubeFeeder/TubeFeeder.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

21 changes: 17 additions & 4 deletions TubeFeederProject/TubeFeeder/TubeFeeder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ public partial class Form1 : Form

private bool m_isRecivedFromCom = false;
private bool m_isOnError = false;
private bool m_isShowRestart = false;
private bool m_isBarcodeReadMode_On = false; // 바코드 읽기모드 On
private bool m_isAutoStopMode_On = false; // AutoStopMode On

Expand Down Expand Up @@ -528,14 +529,15 @@ public void msgRecive(MessageProtocol.ReciveMessage reciveMsg)
break;
case MessageProtocol.ReciveMessage.order_Error:
m_isOnError = true;
showRestartDialog(); // ysys
m_isShowRestart = true;
// showRestartDialog(); // ysys
break;
case MessageProtocol.ReciveMessage.order_RestartClick:
closeRestartDialog();
m_isShowRestart = false;
// closeRestartDialog();
break;
default:
break;

}
}

Expand All @@ -555,6 +557,8 @@ public void showRestartDialog()
btn_SettingsEnable(false);
m_isOnError = false;
}
m_isShowRestart = false;
restartDialog = null;
}

public void closeRestartDialog()
Expand Down Expand Up @@ -648,7 +652,7 @@ private void smartTimer1_Tick(object sender, EventArgs e)
setCurtimeLabelText(strCurTime);
setScanCountLabelText(m_scanCount + "");

if(m_isOnError==true)
if (m_isOnError == true)
{
if ((runTime.Seconds/3) != 0) // 3초 중 2초 소리냄 ( 삑-삑-X ... )
{
Expand Down Expand Up @@ -689,6 +693,15 @@ private void smartTimer1_Tick(object sender, EventArgs e)
;
}


if (m_isShowRestart == true && restartDialog == null)
{
showRestartDialog();
}
else if(m_isShowRestart == false)
{
closeRestartDialog();
}
}

private void smartTimer2_Tick(object sender, EventArgs e)
Expand Down

0 comments on commit cb11fe3

Please sign in to comment.