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);
|
|
}
|
}
|
}
|
}
|