首页 > 代码库 > 测试窗口

测试窗口

技术分享
 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 WindowsFormsApplication2
12 {
13     public partial class Form3 : Form
14     {
15         public Form3()
16         {
17             InitializeComponent();
18         }
19         //接收主窗口
20         public Form1 fr;
21         public int index;
22 
23         private void button1_Click(object sender, EventArgs e)
24         {
25             //把父类转化为子类
26             var test = (CodeJob)(fr.la[index]);
27             test.CodingLines = int.Parse(textBox1.Text.Trim());
28             test.Bugs = int.Parse(textBox2.Text.Trim());
29             test.WorkDay = int.Parse(textBox3.Text.Trim());
30         }
31     }
32 }
View Code

 

测试窗口