private void btnAddProcess_Click(object sender, EventArgs e) { SettingForm addpro = new SettingForm(); List <string> listTemp = new List <string>(); List <string> listPro = new List <string>(); GetData.GetProcessToList(ref listTemp, Model); addpro.listTemp = listTemp; addpro.listprocess = listPro; if (addpro.ShowDialog() == DialogResult.OK) { listTemp = addpro.listTemp; listPro = addpro.listprocess; } }
/// <summary> /// Open setting form when click setting button /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btnSetting_Click(object sender, EventArgs e) { if (listTemp.Count() == 0 && listProcess.Count() == 0) { GetData.GetProcessToList(ref listTemp, cmbModel.Text); } SettingForm stForm = new SettingForm(); stForm.Model = cmbModel.Text; stForm.listTemp = listTemp; stForm.listprocess = listProcess; if (stForm.ShowDialog() == DialogResult.OK) { flpnlYeildShow.Controls.Clear(); listProcess = stForm.listprocess; listTemp = stForm.listTemp; foreach (string name in stForm.listprocess) { AddCells(name); } } }