此次结对编程者杨安琪http://www.cnblogs.com/ning-JML/p/5361395.html
程序代码:
form2:
1 using System; 2 using System.Collections.Generic; 3 using System.ComponentModel; 4 using System.Data; 5 using System.Drawing; 6 using System.Linq; 7 using System.Text; 8 using System.Threading.Tasks; 9 using System.Windows.Forms; 10 11 namespace 二四_软件工程20160406 12 { 13 14 public partial class Form2 : Form 15 { 16 int num; 17 bool chengchu; 18 bool kuohao; 19 bool yushu; 20 int shengxian; 21 int xiaxian; 22 public Form2() 23 { 24 InitializeComponent(); 25 } 26 27 private void label5_Click(object sender, EventArgs e) 28 { 29 30 } 31 32 private void button1_Click(object sender, EventArgs e) 33 { 34 num= int.Parse(textBox1.Text); 35 36 if (textBox2.Text == "Y") chengchu = true; 37 else if(textBox2.Text == "N") chengchu = false; 38 39 if (textBox3.Text == "Y") kuohao = true; 40 else if (textBox3.Text == "N") kuohao = false; 41 42 if (textBox4.Text == "Y") yushu = true; 43 else if (textBox4.Text == "N") yushu = false; 44 shengxian = int.Parse(textBox5.Text); ; 45 xiaxian = int.Parse(textBox6.Text); 46 47 new Form1(num, chengchu, kuohao, yushu, shengxian, xiaxian).Show(); 48 49 //Form1 a=new Form1(num,chengchu,kuohao,yushu,shengxian,xiaxian); 50 } 51 } 52 }