1
0
mirror of synced 2024-12-06 04:48:06 +01:00
Switch-Toolbox/Switch_Toolbox_Library/Forms/BatchFormatExport.cs
KillzXGaming 2a92afa122 Chr0 animation importing, dae exporting and tons more improvements!
Chr0 can be imported/replaced.
More fixes to importing sections including some errors and proper filtering.
Dae epxorting now has a progress bar and an option to idsable texture exporting.
Bfska can now be swapped between platforms. More sections will handle this method soon!.
Fixed spaces on files from "Export All".
Display multiple texture maps in bcres materials
2019-05-24 15:15:35 -04:00

59 lines
1.4 KiB
C#

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace Switch_Toolbox.Library
{
public partial class BatchFormatExport : Form
{
public int Index = 0;
public BatchFormatExport(List<string> Formats)
{
InitializeComponent();
foreach (string format in Formats)
comboBox1.Items.Add(format);
comboBox1.SelectedIndex = 0;
Index = 0;
}
public string GetSelectedExtension()
{
string SelectedExt = comboBox1.GetSelectedText();
string output = GetSubstringByString("(",")", SelectedExt);
output = output.Remove(0, 1);
output.Replace(" ", string.Empty);
if (output == ".")
output = ".raw";
return output;
}
public string GetSubstringByString(string a, string b, string c)
{
return c.Substring((c.IndexOf(a) + a.Length), (c.IndexOf(b) - c.IndexOf(a) - a.Length));
}
private void OkButton_Click(object sender, EventArgs e)
{
this.Close();
}
private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
{
Index = comboBox1.SelectedIndex;
}
}
}