发布时间:2019-09-07 08:12:33编辑:auto阅读(1557)
public partial class Form3 : Form
{
public Form3()
{
InitializeComponent();
}
//建立私有变量
private string some_name, email_address, topic, option;
//属性姓名
public string SomeName
{
get
{
return some_name;
}
set
{
some_name = value;
}
}
//属性电子邮件
public string Someemail
{
get
{
return email_address;
}
set
{
email_address = value;
}
}
//属性主题
public string Sometopic
{
get
{
return topic;
}
set
{
topic = value;
}
}
//属性意见
public string Someoption
{
get
{
return option;
}
set
{
option = value;
}
}
private void Form3_Load(object sender, EventArgs e)
{
listBox1.Items.Add(SomeName);
listBox1.Items.Add(Someemail);
listBox1.Items.Add(Sometopic);
listBox1.Items.Add(Someoption);
}
} |
private void button1_Click(object sender, EventArgs e)
{
if (textBox1.Text == "" || textBox2.Text == "")
{
MessageBox.Show("姓名,或者邮件信息禁止为空!", "信息提示");
}
else
{
this.Hide();
Formcc2 childForm2 = new Formcc2();
childForm2.SomeName = textBox1.Text;
childForm2.Someemail = textBox2.Text;
childForm2.Sometopic = comboBox1.SelectedItem.ToString();
childForm2.Someoption = richTextBox1.Text;
//原来的代码内容:childForm3.Show();
//下面是更改后的代码内容
childForm2.MdiParent = this.MdiParent;
childForm2.Show();
}
} |
上一篇: python-selenum3 第六天—
下一篇: 2-3 选项卡控件
47860
46423
37309
34755
29329
25988
24938
19965
19560
18047
5804°
6430°
5944°
5973°
7078°
5924°
5959°
6453°
6415°
7796°