private void btnUsedObjectEdit_Click(object sender, EventArgs e) { if (lvUsedObjects.SelectedItems[0].Tag == null) { return; } var form = new ObjectEditForm(lvUsedObjects.SelectedItems[0].Tag as xPObject); if (form.ShowDialog() == DialogResult.OK) { Share.Library_UpdateNodeName(form.PObject); Options.mainForm.RenewMaps(); } }
private void btnObjectAdd_Click(object sender, EventArgs e)// { if (tvObjects.SelectedNode?.Tag == null) { return; } var form = new ObjectEditForm(null, (tvObjects.SelectedNode.Tag as xPrototype).ID); if (form.ShowDialog() == DialogResult.OK) { form.PObject.tvNode = tvObjects.SelectedNode.Nodes.Add(""); form.PObject.tvNode.Tag = form.PObject; Options.PObjects.Add(form.PObject); Share.Library_UpdateNodeName(form.PObject); } }