1. 알람셋팅화면에 기준값초기화 체크박스 추가
2. 기준값 초기화시 신규 설정된 기준값이 바로 저장되도록 함 (필요한 경우 5분 혹은 10분간격으로 window1, window2 : grp 파일은 생성해주는 것이 좋을 듯함) 3. 알람 설정화면을 통해서 값 변경시 , 기준값초기화 기능이 서브윈도우에 적용되지 않는 버그 수정
This commit is contained in:
@@ -766,7 +766,34 @@ namespace vmsnet
|
||||
|
||||
private void Pub_RemoteCommandEvent(object sender, RemoteCommand e)
|
||||
{
|
||||
if (e.Command == rCommand.StateMessage)
|
||||
if(e.Command == rCommand.AlarmValueReset)
|
||||
{
|
||||
////auto로 된 그룹의 기준값을 변경한다.
|
||||
this.DispCtrl1.SuspendLayout();
|
||||
foreach (HMI.CGROUP c in DispCtrl1.GROUPS)
|
||||
{
|
||||
if (c.AlarmType == "AUTO")
|
||||
{
|
||||
////이그룹을 사용하는 모든셀의 auto값을 초기화한다.
|
||||
foreach (HMI.CITEM i in c.Items)
|
||||
{
|
||||
i.alamv = -999;
|
||||
}
|
||||
}
|
||||
else if (c.AlarmType == "STOP")
|
||||
{
|
||||
c._alamcount = (short)0;
|
||||
c._alamcountlb = (short)0;
|
||||
}
|
||||
}
|
||||
this.DispCtrl1._raise_alarm_pre = true; ////혹알람이 발생되어있을지 모르니. 끄도록 발생한것 처럼 표시해준다.
|
||||
this.DispCtrl1.ResumeLayout();
|
||||
this.DispCtrl1.Invalidate();
|
||||
|
||||
////설정정보를 가져온다.
|
||||
PUB.SaveConfigFile("GRP");
|
||||
}
|
||||
else if (e.Command == rCommand.StateMessage)
|
||||
{
|
||||
var msg = e.Data.ToString();
|
||||
if (PUB.lastStatueMessage.Equals(msg) == false)
|
||||
@@ -1560,32 +1587,13 @@ namespace vmsnet
|
||||
{
|
||||
PUB.log.Add(AR.Log.ETYPE.NORMAL, "알람설정화면확인");
|
||||
|
||||
////auto로 된 그룹의 기준값을 변경한다.
|
||||
this.DispCtrl1.SuspendLayout();
|
||||
foreach (HMI.CGROUP c in DispCtrl1.GROUPS)
|
||||
{
|
||||
if (c.AlarmType == "AUTO")
|
||||
{
|
||||
////이그룹을 사용하는 모든셀의 auto값을 초기화한다.
|
||||
foreach (HMI.CITEM i in c.Items)
|
||||
{
|
||||
i.alamv = -999;
|
||||
}
|
||||
}
|
||||
else if (c.AlarmType == "STOP")
|
||||
{
|
||||
c._alamcount = (short)0;
|
||||
c._alamcountlb = (short)0;
|
||||
}
|
||||
}
|
||||
this.DispCtrl1._raise_alarm_pre = true; ////혹알람이 발생되어있을지 모르니. 끄도록 발생한것 처럼 표시해준다.
|
||||
this.DispCtrl1.ResumeLayout();
|
||||
this.DispCtrl1.Invalidate();
|
||||
|
||||
|
||||
////설정정보를 가져온다.
|
||||
PUB.RaiseRemoteCommandEvent(rCommand.AlarmValueReset);
|
||||
|
||||
////설정정보를 가져온다(저장은 메인에서만 진행한다)
|
||||
PUB.SaveConfigFile("GRP");
|
||||
|
||||
//각 창별로 window1.grp / window2.grp 의 파일에 그룹상태를 저장 합니다
|
||||
PUB.RaiseRemoteCommandEvent(rCommand.SaveGroupClass);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user