private void ComputerRemoveDialog_Load(object sender, System.EventArgs e) { ArrayList list = mgmt.getComputerCollection(); foreach (Computer computer in list) { comboComputer.Items.Add(computer.getName()); } }
private void ProcessDefineDialog_Load(object sender, System.EventArgs e) { comboType.SelectedIndex = 0; ArrayList list = c_mgmt.getComputerCollection(); int i = 0, selIndex = 0; foreach (Computer computer in list) { this.comboComputer.Items.Add(computer.getName()); if (computer.getName().Equals(m_selComputer)) { selIndex = i; } i++; } comboComputer.SelectedIndex = selIndex; }