admin
2020-06-19 84616e6d524a7df88ebcca4b74aca42461f34605
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
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;
using WindowsFormsApp1.utils;
 
namespace WindowsFormsApp1
{
    public partial class InputDialog : Form
    {
 
        private OnSuccess success;
        public InputDialog(String name,String desc,OnSuccess success)
        {
            this.success = success;
 
            InitializeComponent();
            this.Text = name;
            if (StringUtil.isEmpty(desc))
            {
                this.label38.Visible = false;
            }
            else {
                this.label38.Text = desc;
                this.label38.Visible = true;
            }
        }
 
        private void button7_Click(object sender, EventArgs e)
        {
            if (this.success != null)
            {
                this.Dispose();
                this.success(this.textBox1.Text);
               
            }
        }
    }
}