private void treeView1_AfterSelect(object sender, TreeViewEventArgs e) { if (!(treeView1.SelectedNode is BYAML.PathPoint)) { return; } BYAML.PathPoint pt = (BYAML.PathPoint)treeView1.SelectedNode; if (e.Node.Level != 0) { BYAMLEditor.Open(pt); } }
public void Open(BYAML.PathPoint obj) { currentEntry = obj; textBox1.Text = currentEntry.Text; if (currentEntry != null) { numericUpDown2.Value = (decimal)currentEntry.translate.X; numericUpDown3.Value = (decimal)currentEntry.translate.Y; numericUpDown1.Value = (decimal)currentEntry.translate.Z; propertyGrid1.SelectedObject = currentEntry; } }