1
0
mirror of synced 2024-12-02 19:17:24 +01:00
Switch-Toolbox/Switch_FileFormatsMain/GUI/BntxSelector.cs

40 lines
1019 B
C#
Raw Normal View History

2018-11-12 02:51:12 +01: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;
namespace FirstPlugin
{
public partial class BntxSelector : Form
{
public BntxSelector()
{
InitializeComponent();
foreach (BinaryTextureContainer bntx in PluginRuntime.bntxContainers)
{
listView1.Items.Add(bntx.Text);
}
}
public BinaryTextureContainer GetBNTX()
{
foreach (BinaryTextureContainer bntx in PluginRuntime.bntxContainers)
{
if (bntx.Text == listView1.SelectedItems[0].Text)
return bntx;
}
throw new Exception("This shouldn't happen???");
}
private void listView1_DoubleClick(object sender, EventArgs e)
{
DialogResult = DialogResult.OK;
}
}
}