private void List_Edit_Click(object sender, EventArgs e) { int index = listBox1.SelectedIndex; if (index >= 0) { string str = "" + listBox1.Items[index]; if (str == "") { str = " "; } string[] strs = str.Split(','); if (strs.Length < 2) { Form_Add_Item form = new Form_Add_Item(listBox1, false); form.ShowDialog(); } else { Form_Add_Equipment form = new Form_Add_Equipment(listBox1, false); form.ShowDialog(); } } }
private void Add_Equipment_Click(object sender, EventArgs e) { Form_Add_Equipment form = new Form_Add_Equipment(listBox1, true); form.ShowDialog(); }