private void btnBTPRemovePalette_Click(object sender, EventArgs e) { int index = lbxPalettes.SelectedIndex; if (index >= 0 && index < lbxPalettes.Items.Count) { m_BTP.RemovePalette(lbxPalettes.Items[index].ToString()); LoadOnlyBTPReferencedTextures(); } }