Files
2024-11-26 20:15:16 +09:00

97 lines
2.5 KiB
C#

using System.Collections.Generic;
using System;
using System.Drawing;
using System.Diagnostics;
using System.Data;
using System.Collections;
using System.Windows.Forms;
using AR;
using vmsnet;
namespace vmsnet
{
public partial class Frm_Grp
{
public HMI.CGROUP cellidx = null;
public Frm_Grp()
{
// 이 호출은 디자이너에 필요합니다.
InitializeComponent();
// InitializeComponent() 호출 뒤에 초기화 코드를 추가하십시오.
}
public Frm_Grp(HMI.CGROUP pidx)
{
// 이 호출은 디자이너에 필요합니다.
InitializeComponent();
cellidx = pidx;
cellidx.OnChangeData += cellidx_OnChangeData;
// InitializeComponent() 호출 뒤에 초기화 코드를 추가하십시오.
}
public void Frm_Grp_KeyDown(object sender, System.Windows.Forms.KeyEventArgs e)
{
if (e.KeyCode == Keys.Escape)
{
this.DialogResult = System.Windows.Forms.DialogResult.OK;
}
}
public void Frm_Cell_Load(object sender, System.EventArgs e)
{
this.Text = "그룹(" + cellidx. + ")속성";
this.PropertyGrid1.SelectedObject = cellidx;
//Select Case cellidx.알람형태
// Case 0
// Me.rad_alam_0.Checked = True
// Case 1
// Me.rad_alam_1.Checked = True
// Case 2
// Me.rad_alam_2.Checked = True
// Case 3
// Me.rad_alam_3.Checked = True
//End Select
//Me.lb_alam_hi.DataBindings.Add("text", cellidx, "상위알람")
//Me.lb_alam_low.DataBindings.Add("text", cellidx, "하위알람")
//Me.lb_row.DataBindings.Add("text", cellidx, "줄번호")
//Me.lb_col.DataBindings.Add("text", cellidx, "열번호")
//Dim bd As New System.Windows.Forms.Binding("text", cellidx, "column")
}
private void cellidx_OnChangeData()
{
bool OK = false;
var dr = PUB.DS.GRP.Select("idx=" + cellidx.IDX.ToString()) as DocumentElement.GRPRow[];
if (dr.Length == 1)
{
DocumentElement.GRPRow Drow = dr[0];
Drow.TITLE = cellidx.;
Drow.FONT = cellidx..Name + "," + System.Convert.ToString(cellidx..Size) + "," + System.Convert.ToString(cellidx..Style);
Drow.ALAMH = cellidx.HIGH;
Drow.ALAML = cellidx.LOW;
Drow.NBOFF = cellidx.NullBalanceOffset;
Drow.NBSEQ = cellidx._null_itemseq;
Drow.AcceptChanges();
PUB.DS.AcceptChanges();
OK = true;
}
else
{
OK = false;
}
if (!OK)
{
UTIL.MsgE("그룹 정보가 업데이트되지 않았습니다");
}
}
}
}