private void Rail_listbox() { Rail rail = new Rail(_railPath); rail.rail(Convert.ToInt32(listBox1.Items[listBox1.SelectedIndex])); Render3D(); }