Пример #1
0
 public void AddMesh(Mesh mesh)
 {
     _meshes.Add(mesh);
     treeView1.Nodes.Add("Mesh");
 }
Пример #2
0
 private void treeView1_AfterSelect(object sender, TreeViewEventArgs e)
 {
     _currentMesh = _meshes[e.Node.Index];
     pictureBox1.Invalidate();
 }
Пример #3
0
        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();
                }
            }
        }
Пример #4
0
 private void newToolStripMenuItem_Click(object sender, EventArgs e)
 {
     _meshes.Clear();
     _meshes.Add(_currentMesh = new Mesh());
     pictureBox1.Invalidate();
 }
Пример #5
0
 private void ModelDesigner_Load(object sender, EventArgs e)
 {
     AddMesh(_currentMesh = new Mesh());
 }
Пример #6
0
 public void RemoveMesh(Mesh mesh)
 {
     treeView1.Nodes.RemoveAt(_meshes.IndexOf(mesh));
     _meshes.Remove(mesh);
 }