qin
2025-03-06 06eff2094e17b8ed3452e44a6d77b729a7621919
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
56
57
58
59
60
61
62
63
64
65
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();
        }
    }
}