private void ButtonUp_Click(object sender, EventArgs e)
{
if (this.ListTabs.SelectedIndex == -1 || this.ListTabs.SelectedIndex == 0)
return;
var selectedTabName = (string)this.ListTabs.SelectedItem;
var selectedTab = this._sts.Tabs[selectedTabName];
var targetTabName = (string)this.ListTabs.Items[this.ListTabs.SelectedIndex - 1];
var targetTab = this._sts.Tabs[targetTabName];
// ミュートタブは移動禁止
if (selectedTab.TabType == MyCommon.TabUsageType.Mute || targetTab.TabType == MyCommon.TabUsageType.Mute)
return;
var tweenMain = (TweenMain)this.Owner;
tweenMain.ReOrderTab(selectedTabName, targetTabName, true);
// ListTab のアイテム並び替え
// 選択が解除されてしまうのを防ぐため SelectedIndex のアイテムは操作せず前後のアイテムを移動する
var idx = this.ListTabs.SelectedIndex;
this.ListTabs.Items.RemoveAt(idx - 1);
this.ListTabs.Items.Insert(idx, targetTabName);
}