namespace IBox.WinFrmUI
|
{
|
public partial class MonitorGroupEditForm : Form
|
{
|
public MonitorGroupEditForm(MonitorPointGroup monitorPointGroup)
|
{
|
InitializeComponent();
|
//SetData();
|
if (monitorPointGroup != null)
|
BindData(monitorPointGroup);
|
}
|
public MonitorPointGroup group { get; set; }
|
private void simpleButton2_Click(object sender, EventArgs e)
|
{
|
this.Close();
|
}
|
|
private List<string> GetFlags()
|
{
|
return new List<string>()
|
{
|
"机组"
|
};
|
}
|
|
|
/// <summary>
|
///
|
/// </summary>
|
/// <param name="group"></param>
|
public void BindData(MonitorPointGroup group)
|
{
|
this.group = group;
|
textEditName.EditValue = group.Name;
|
}
|
|
/// <summary>
|
/// 获取数据
|
/// </summary>
|
private void GetData()
|
{
|
if (this.group == null)
|
this.group = new MonitorPointGroup();
|
this.group.Name = textEditName.EditValue.ToString();
|
//this.group.Flags= textEditFlags.EditValue.ToString().Split(',').ToList();
|
}
|
|
private void simpleButton1_Click(object sender, EventArgs e)
|
{
|
GetData();
|
DialogResult = DialogResult.OK;
|
this.Close();
|
}
|
}
|
}
|