namespace PrjExe11
{
public partial class Form7_1 : Form
{
public Form7_1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
InputBox f = new InputBox();
f.Title = "输入对话框";
f.TipText = "请输入年龄";
if (f.ShowDialog() == DialogResult.OK)
{
this.label1.Text = f.Message;
}
}
private string Tip;
private string Input;
public partial class InputBox : Form
{
public string Title
{
set { this.Text = value; }
}
public string Message
{
get { return this.Input.Text; }
}
public string TipText
{
set { this.Tip.Text = value; }
}
private void Form7_1_Load(object sender, EventArgs e)
{
}
private void button1_Click(object sender, EventArgs e)
{
}
}
}
} |