private void imageFormatToolStripMenuItem_Click(object sender, EventArgs e)
 {
     //Just use an existing dialog with the same basic function
     using (ExportAllFormatDialog d = new ExportAllFormatDialog())
     {
         d.Text = "Choose texture format";
         d.comboBox1.Items.RemoveAt(6); //TEX0
         if (d.ShowDialog(this) == DialogResult.OK)
         {
             _imgType = (ImageType)d.comboBox1.SelectedIndex;
             imageFormatToolStripMenuItem.Text = "Image Format: " + _imgType.ToString().ToUpper();
         }
     }
 }
 private void imageFormatToolStripMenuItem_Click(object sender, EventArgs e)
 {
     //Just use an existing dialog with the same basic function
     using (ExportAllFormatDialog d = new ExportAllFormatDialog())
     {
         d.Text = "Choose texture format";
         d.comboBox1.Items.RemoveAt(6); //TEX0
         if (d.ShowDialog(this) == DialogResult.OK)
         {
             _imgExtIndex = d.comboBox1.SelectedIndex;
             _imgExt = d.SelectedExtension;
             imageFormatToolStripMenuItem.Text = "Image Format: " + _imgExt.Substring(1).ToUpper();
         }
     }
 }
        public void ExportAll()
        {
            string path = Program.ChooseFolder();
            if (path == null)
                return;

            bool hasTextures = false;
            foreach (BRESGroupNode e in _resource.Children)
                if (e.Type == BRESGroupNode.BRESGroupType.Textures)
                {
                    hasTextures = true;
                    break;
                }

            if (hasTextures)
            {
                ExportAllFormatDialog dialog = new ExportAllFormatDialog();

                if (dialog.ShowDialog() == DialogResult.OK)
                    ((BRESNode)_resource).ExportToFolder(path, dialog.SelectedExtension);
            }
            else
                ((BRESNode)_resource).ExportToFolder(path);
        }
        public void ReplaceAll()
        {
            string path = Program.ChooseFolder();
            if (path == null)
                return;

            ExportAllFormatDialog dialog = new ExportAllFormatDialog();
            dialog.label1.Text = "Input format for textures:";

            if (dialog.ShowDialog() == DialogResult.OK)
                ((BRESNode)_resource).ReplaceFromFolder(path, dialog.SelectedExtension);
        }
        public void ExportAll()
        {
            string path = Program.ChooseFolder();
            if (path == null)
                return;

            ExportAllFormatDialog dialog = new ExportAllFormatDialog();

            if (dialog.ShowDialog() == DialogResult.OK)
                ((BRESNode)_resource).ExportToFolder(path, dialog.SelectedExtension);
        }