private void button2_Click(object sender, EventArgs e) { try { data.BoundingBoxMaxX = Single.Parse(textBoxBBMaxX.Text); data.BoundingBoxMaxY = Single.Parse(textBoxBBMaxY.Text); data.BoundingBoxMaxZ = Single.Parse(textBoxBBMaxZ.Text); data.BoundingBoxMinX = Single.Parse(textBoxBBMinX.Text); data.BoundingBoxMinY = Single.Parse(textBoxBBMinY.Text); data.BoundingBoxMinZ = Single.Parse(textBoxBBMinZ.Text); data.CenterX = Single.Parse(textBoxCenterX.Text); data.CenterY = Single.Parse(textBoxCenterY.Text); data.CenterZ = Single.Parse(textBoxCenterZ.Text); data.Radius = Single.Parse(textBoxRadius.Text); string oldName = node.Name; object oldData = node.Tag; node.Tag = data.GetBytes(); parent.NodeChanged(node, oldName, oldData); } catch (Exception ex) { MessageBox.Show("Error " + ex.Message, "Error"); Close(); return; } }
/// <summary> /// Update all VMeshRef nodes with newVMeshLibId. /// </summary> /// <param name="crc"></param> /// <returns></returns> public void UpdateVMeshRefs(TreeNode[] nodes, uint newVMeshLibId) { foreach (TreeNode node in nodes) { VMeshRef data = new VMeshRef(node.Tag as byte[]); data.VMeshLibId = newVMeshLibId; node.Tag = data.GetBytes(); } }