using System;
|
using System.Collections.Generic;
|
using System.ComponentModel;
|
using System.Data;
|
using System.Drawing;
|
using System.Linq;
|
using System.Text;
|
using System.Threading.Tasks;
|
using System.Windows.Forms;
|
|
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>()
|
{
|
"机组"
|
};
|
}
|
|
private void SetData()
|
{
|
foreach(var item in GetFlags())
|
{
|
//textEditFlags.Properties.Items.Add(item);
|
}
|
}
|
|
private 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();
|
}
|
}
|
}
|