public void add_new_object(int format)
 {
     FormNewElement f = new FormNewElement(packs, treeView1);
     switch (format)
     {
         case ElementType.PNGTexture: f.button2_Click(null, null); break;
         case ElementType.CollisionMesh: f.button4_Click(null, null); break;
         case ElementType.LevelObjectDescription: f.button7_Click(null, null); break;
         case ElementType.RenderObjectDescription: f.button6_Click(null, null); break;
         case ElementType.ParticelRenderObjectDescription: f.button11_Click(null, null); break;
         case ElementType.Material: f.button10_Click(null, null); break;
         default: break;
     }
 }
        private void textureToolStripMenuItem_Click(object sender, EventArgs e)
        {
            string name = ((ToolStripMenuItem)sender).Text;

            FormNewElement f = new FormNewElement(packs, treeView1);
            switch (name)
            {
                case "Texture": f.button2_Click(null, null); break;
                case "CollisionMesh": f.button4_Click(null, null); break;
                case "LevelObject": f.button7_Click(null, null); break;
                case "RenderObject": f.button6_Click(null, null); break;
                case "Particle": f.button11_Click(null, null); break;
                case "Material": f.button10_Click(null, null); break;

                default: break;
            }
        }
 private void newToolStripMenuItem_Click(object sender, EventArgs e)
 {
     FormNewElement f = new FormNewElement(packs, treeView1);
     f.ShowDialog();
 }