private void btnUsedBoxEdit_Click(object sender, EventArgs e) { if (lvUsedBoxes.SelectedItems[0].Tag == null) { return; } var form = new BoxEditForm(lvUsedBoxes.SelectedItems[0].Tag as xPBox); if (form.ShowDialog() == DialogResult.OK) { Share.Library_UpdateNodeName(form.PBox); Options.mainForm.RenewMaps(); } }
private void btnBoxAdd_Click(object sender, EventArgs e)// { if (tvBoxes.SelectedNode?.Tag == null) { return; } var form = new BoxEditForm(null, (tvBoxes.SelectedNode.Tag as xPrototype).ID); if (form.ShowDialog() == DialogResult.OK) { form.PBox.tvNode = tvBoxes.SelectedNode.Nodes.Add(""); form.PBox.tvNode.Tag = form.PBox; Options.PBoxes.Add(form.PBox); Share.Library_UpdateNodeName(form.PBox); } }