private void EditCmpRevData_Load(object sender, EventArgs e) { try { data = new CmpRevData(node.Tag as byte[]); if (data.Parts.Count == 0) { throw new Exception("No parts"); } } catch (Exception ex) { MessageBox.Show("Error " + ex.Message, "Error"); Close(); return; } labelPartCount.Text = String.Format("of {0}", data.Parts.Count); partUpDown.Maximum = data.Parts.Count; foreach (CmpRevData.Part part in data.Parts) { comboBoxChildName.Items.Add(part.ChildName); } comboBoxChildName.Select(); partNumber = 0; DisplayPart(); }