2019-05-15 03:43:37 +02:00
|
|
|
|
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;
|
|
|
|
|
using System.IO;
|
2019-07-16 23:35:21 +02:00
|
|
|
|
using Toolbox.Library;
|
|
|
|
|
using Toolbox.Library.Forms;
|
2019-05-15 03:43:37 +02:00
|
|
|
|
|
|
|
|
|
namespace FirstPlugin.Forms
|
|
|
|
|
{
|
|
|
|
|
public partial class OdysseyCostumeSelector : STForm
|
|
|
|
|
{
|
|
|
|
|
public string SelectedCostumeName = "";
|
|
|
|
|
|
|
|
|
|
public List<string> ExcludeFileList = new List<string>(new string[] {
|
|
|
|
|
"Eye","Face", "Head", "HeadTexture","Under","HandL","HandR","HandTexture", "BodyTexture","Hair","2D","Cap","Tail","Ruck",
|
|
|
|
|
"aHakama","Skirt","Shell","PonchoPoncho","PonchoGuitar"
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
public OdysseyCostumeSelector(string GamePath)
|
|
|
|
|
{
|
|
|
|
|
InitializeComponent();
|
|
|
|
|
|
|
|
|
|
foreach (string dir in Directory.GetFiles($"{GamePath}\\ObjectData", "Mario*"))
|
|
|
|
|
{
|
|
|
|
|
string filename = Path.GetFileNameWithoutExtension(dir);
|
|
|
|
|
|
2019-05-15 21:35:05 +02:00
|
|
|
|
listViewCustom1.BeginUpdate();
|
2019-05-15 03:43:37 +02:00
|
|
|
|
bool Exluded = ExcludeFileList.Any(filename.Contains);
|
|
|
|
|
if (Exluded == false)
|
|
|
|
|
{
|
|
|
|
|
listViewCustom1.Items.Add(new ListViewItem(filename) { Tag = dir });
|
|
|
|
|
}
|
2019-05-15 21:35:05 +02:00
|
|
|
|
listViewCustom1.EndUpdate();
|
2019-05-15 03:43:37 +02:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void listViewCustom1_DoubleClick(object sender, EventArgs e)
|
|
|
|
|
{
|
|
|
|
|
if (listViewCustom1.SelectedIndices.Count <= 0)
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
SelectedCostumeName = (string)listViewCustom1.SelectedItems[0].Tag;
|
|
|
|
|
DialogResult = DialogResult.OK;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|