public OutOvenForm(int i, int j, ManageSystem ms) { InitializeComponent(); this.i = i; this.j = j; this.ms = ms; this.Text = string.Format("腔体 {0} 出腔扫码", Current.ovens[i].Floors[j].Name); this.lbFloorNumber.Text = Current.ovens[i].Floors[j].Number; this.lvClampCodes.Columns.Clear(); this.lvClampCodes.Items.Clear(); this.lvClampCodes.Columns.Add("序号"); this.lvClampCodes.Columns.Add("料盒条码"); this.lvClampCodes.Columns.Add("电池数"); this.lvClampCodes.Columns[0].Width = 50; this.lvClampCodes.Columns[1].Width = 140; this.lvClampCodes.Columns[2].Width = 60; clampCodes.Clear(); //填充ListView foreach (Clamp c in Current.ovens[i].Floors[j].Clamps) { ListViewItem li = new ListViewItem();//创建行对象 li.Text = (++clampNum).ToString(); li.SubItems.Add(c.Code); li.SubItems.Add(c.Batteries.Count.ToString()); this.lvClampCodes.Items.Add(li); clampCodes.Add(c.Code); } this.lbTip.Text = "等待扫码!"; Current.IsOutOvenFormShow = true; }
private void button1_Click(object sender, EventArgs e) { system = new ManageSystem(); dataGridView1.Rows.Clear(); dataGridView2.Rows.Clear(); system.readData("E:\\Collage\\NewspaperSellerSimulation_Students\\NewspaperSellerSimulation\\TestCases\\TestCase3.txt"); //testDataReaderFromFile(); system.startSimulation(); fillDataGridViews(); string test = TestingManager.Test(system.system, Constants.FileNames.TestCase3); MessageBox.Show(test); }
public Form1() { InitializeComponent(); system = new ManageSystem(); }