private void set_item_Click(object sender, EventArgs e) { soundPlayer.Play(); Button this_obj = sender as Button; equipment_slot es = new equipment_slot(); if (es.ShowDialog() == DialogResult.OK) { //保存要存储的槽位 List <string> slotInfo = new List <string> { }; foreach (string item in es.slot_box.CheckedItems) { slotInfo.Add(item); } item_form isp = new item_form(); if (isp.ShowDialog() == DialogResult.OK) { for (int i = 0; i < slotInfo.Count; i++) { equipInfo[i] = "\"" + slotInfo[i] + "\"" + isp.result; } } equipInfo[equipInfo.Count - 1] = equipInfo[equipInfo.Count - 1].TrimEnd(','); } }
private void set_item_Click(object sender, EventArgs e) { item_form Item_Form = new item_form(); if (Item_Form.ShowDialog() == DialogResult.OK && Item_Form.result.Trim() != "") { set_item.Parent.Tag = Item_Form.result; } else { set_item.Parent.Tag = null; } }