public void AddMesh(Mesh mesh) { _meshes.Add(mesh); treeView1.Nodes.Add("Mesh"); }
private void treeView1_AfterSelect(object sender, TreeViewEventArgs e) { _currentMesh = _meshes[e.Node.Index]; pictureBox1.Invalidate(); }
private void toolStripMenuItem1_Click(object sender, EventArgs e) { using (OpenFileDialog dg = new OpenFileDialog()) { dg.Filter = "All Files (*)|*"; dg.DefaultExt = "txt"; dg.RestoreDirectory = true; if (dg.ShowDialog() == System.Windows.Forms.DialogResult.OK) { _meshes.Clear(); _meshes.Add(_currentMesh = new Mesh()); pictureBox1.Invalidate(); } } }
private void newToolStripMenuItem_Click(object sender, EventArgs e) { _meshes.Clear(); _meshes.Add(_currentMesh = new Mesh()); pictureBox1.Invalidate(); }
private void ModelDesigner_Load(object sender, EventArgs e) { AddMesh(_currentMesh = new Mesh()); }
public void RemoveMesh(Mesh mesh) { treeView1.Nodes.RemoveAt(_meshes.IndexOf(mesh)); _meshes.Remove(mesh); }