public FormTextureList(TextureListContent tl, TreeView tv)
        {
            InitializeComponent();
            List = tl;
            ttt = tv;
            listBox1.Items.Clear();
            listBox1.Items.AddRange(List.Pack.Objects.FindAll(o =>
                o.loadedformat == ElementType.PNGTexture ).ConvertAll(o => o.name).ToArray());

            listBox2.Items.Clear();
            listBox2.Items.AddRange(List.Names.ToArray());
            listBox1.Enabled = button1.Enabled = button2.Enabled = List.Names.Count == 0;
            if (List.name != null)
                textBox1.Text = List.name;
            else
                textBox1.Text = "New_texture_list";
        }
 public void button3_Click(object sender, EventArgs e)
 {
     TextureListContent tl = new TextureListContent();
     tl.Pack = packs.packs[0];
     if (tl.createpropertieswindow(packs.packs[0], tv) == System.Windows.Forms.DialogResult.OK)
     {
         packs.packs[0].Attach(tl);
         FormMainPackExplorer.Instance.UpdateData();
     }
     if (sender == null) this.Close();
 }