下面是代码,哪里出问题了
form2中
public delegate void SendFun(string str1, string str2,string str3,string str4,string str5,int x2);
public event SendFun SendToform1;
private void button1_Click(object sender, EventArgs e)
{
int a1, a2, a3, a4, a5, a6, a7, a8, a9, a0;
a1 = 1; a2 = 2; a3 = 3; a4 = 4; a5 = 5; a6 = 6; a7 = 7; a8 = 8; a9 = 9; a0 = 0;
if (f3.new1ToolStripMenuItem.Visible == false)
{
f3.new1ToolStripMenuItem.Visible = true;
f3.new1ToolStripMenuItem.Text = this.textBox1.Text;
if (SendToform1 != null)
{
SendToform1(this.textBox1.Text, this.textBox2.Text, this.textBox3.Text, cbb, this.textBox4.Text, a1);
}
}
else if (f3.new2ToolStripMenuItem.Visible == false)
{
f3.new2ToolStripMenuItem.Visible = true;
f3.new2ToolStripMenuItem.Text = this.textBox1.Text;
if (SendToform1 != null)
{
SendToform1(this.textBox1.Text, this.textBox2.Text, this.textBox3.Text, cbb, this.textBox4.Text, a2);
}
}//很多个
this.Close();
}
form1中
public static int x1;
private void RecvInfo1(string str1, string str2,string str3,string str4 ,string str5,int x2)
{
x1=x2;
if (x1 == 1) { new11 = str1; new12 = str2; new13 = str3; new14 = str4; new15 = str5; }
else if (x1 == 2) { new21 = str1; new22 = str2; new23 = str3; new24 = str4; new25 = str5; }
else if (x1 == 3) { new31 = str1; new32 = str2; new33 = str3; new34 = str4; new35 = str5; }
//很多个
}
form2中
public delegate void SendFun(string str1, string str2,string str3,string str4,string str5,int x2);
public event SendFun SendToform1;
private void button1_Click(object sender, EventArgs e)
{
int a1, a2, a3, a4, a5, a6, a7, a8, a9, a0;
a1 = 1; a2 = 2; a3 = 3; a4 = 4; a5 = 5; a6 = 6; a7 = 7; a8 = 8; a9 = 9; a0 = 0;
if (f3.new1ToolStripMenuItem.Visible == false)
{
f3.new1ToolStripMenuItem.Visible = true;
f3.new1ToolStripMenuItem.Text = this.textBox1.Text;
if (SendToform1 != null)
{
SendToform1(this.textBox1.Text, this.textBox2.Text, this.textBox3.Text, cbb, this.textBox4.Text, a1);
}
}
else if (f3.new2ToolStripMenuItem.Visible == false)
{
f3.new2ToolStripMenuItem.Visible = true;
f3.new2ToolStripMenuItem.Text = this.textBox1.Text;
if (SendToform1 != null)
{
SendToform1(this.textBox1.Text, this.textBox2.Text, this.textBox3.Text, cbb, this.textBox4.Text, a2);
}
}//很多个
this.Close();
}
form1中
public static int x1;
private void RecvInfo1(string str1, string str2,string str3,string str4 ,string str5,int x2)
{
x1=x2;
if (x1 == 1) { new11 = str1; new12 = str2; new13 = str3; new14 = str4; new15 = str5; }
else if (x1 == 2) { new21 = str1; new22 = str2; new23 = str3; new24 = str4; new25 = str5; }
else if (x1 == 3) { new31 = str1; new32 = str2; new33 = str3; new34 = str4; new35 = str5; }
//很多个
}
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货