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 GetFlags() { return new List() { "机组" }; } /// /// /// /// public void BindData(MonitorPointGroup group) { this.group = group; textEditName.EditValue = group.Name; } /// /// 获取数据 /// 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(); } } }