duheng
2025-03-28 b266e82b9a377fa35a766f7a3a2f5aa95f3c9125
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
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();
        }
    }
}