cloudflight
2023-12-02 1a5ef6b2bf25de50b685b44299d9a049a2feac80
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
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Drawing.Imaging;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Xml.Linq;
 
namespace CloudWaterNetwork.建模
{
    public partial class AddFactoryForm : Form
    {
        public AddFactoryForm()
        {
            InitializeComponent();
        }
 
        public string FactoryName { get; set; } = "";
        public FactoryType factoryType { get; set; } =FactoryType.水厂;
 
        private void btnAdd_Click(object sender, EventArgs e)
        {
 
        }
 
        private void button1_Click(object sender, EventArgs e)
        {
            FactoryName = txtName.Text;
            factoryType = (FactoryType)cmbType.SelectedItem;
 
            DialogResult = DialogResult.OK;
            Close();
        }
 
        private void button2_Click(object sender, EventArgs e)
        {
            Close();
        }
 
        private void AddFactoryForm_Load(object sender, EventArgs e)
        {
            txtName.Text = FactoryName;
            cmbType.DataSource = Enum.GetValues(typeof(FactoryType));
            cmbType.SelectedItem = factoryType;
        }
    }
 
}