// リストアイテムが選択された. private void listBoxMainListBox_SelectedIndexChanged(object sender, EventArgs e) { if (TDCGExplorer.BusyTest()==true) return; try { int index = listBoxMainListBox.SelectedIndex; if (index >= 0) { if (index == lastSelectedListBoxIndex) return; lastSelectedListBoxIndex = index; LbGenItem item = listBoxMainListBox.Items[index] as LbGenItem; if (item != null) { item.DoClick(); listBoxMainListBox.Focus(); } } } catch (Exception exception) { TDCGExplorer.SetToolTips(TextResource.Error + ":" + exception.Message); Debug.WriteLine(exception.Message); } }
private void TahDecryptToolStripMenuItem_Click(object sender, EventArgs e) { if (TDCGExplorer.BusyTest()) return; try { int index = listBoxMainListBox.SelectedIndex; if (index >= 0) { LbGenItem item = listBoxMainListBox.Items[index] as LbGenItem; if (item != null) { item.DoTahEdit(); listBoxMainListBox.Focus(); } } } catch (Exception exception) { MessageBox.Show(TextResource.ExtractFailure + ":" + exception.Message, TextResource.ExtractFailureCaption, MessageBoxButtons.OK); } }
// TAHファイルを直接展開する. private void ExtractTahFileToolStripMenuItem_Click(object sender, EventArgs e) { if (TDCGExplorer.BusyTest()) return; try { int index = listBoxMainListBox.SelectedIndex; if (index >= 0) { LbGenItem item = listBoxMainListBox.Items[index] as LbGenItem; if (item != null) { item.DoDecrypt(); listBoxMainListBox.Focus(); } } } catch (Exception exception) { TDCGExplorer.SetToolTips(TextResource.Error + ":" + exception.Message); Debug.WriteLine(exception.Message); } }