/// <summary> /// メニューの グループ削除 をクリックした時のイベント /// </summary> private void MenuItem_DelGroup_Click(object sender, EventArgs e) { GroupManager.DeleteGroup(this); }
private static void DeleteSelectItem() { FormType n = GHManager.GetActiveForm(); if (n == FormType.Launcher) { if (GHManager.Launcher.FormVisible) { int idx = GHManager.Launcher.SelectIndex - 1; if (0 <= idx && idx < GroupManager.Items.Count) { GroupManager.DeleteGroup(GroupManager.Items[idx]); } } } else if (n == FormType.ItemList) { if (GHManager.ItemList.FormVisible) { int select = 0; if (GHManager.ItemList.ParentGHForm == 0) { select = GHManager.Launcher.SelectIndex - 1; if (GroupManager.CheckRange(select)) { GroupManager.Items[select].DeleteItem(GHManager.ItemList.SelectIndex); if (GroupManager.Items[select].Items.Count <= 0) { GHManager.ItemList.HideItemList(); } } } else { select = GHManager.MysetList.SelectIndex; if (MysetManager.CheckRange(select)) { if (MysetManager.Items[select].DeleteItem(GHManager.ItemList.SelectIndex)) { GHManager.ItemList.HideItemList(); if (MysetManager.Items.Count <= 0) { GHManager.MysetList.MysetList_Hide(); } } } } } } else if (n == FormType.MysetList) { if (GHManager.MysetList.FormVisible) { int idx = GHManager.MysetList.SelectIndex; if (MysetManager.CheckRange(idx)) { MysetManager.DeleteMyset(MysetManager.Items[idx]); if (MysetManager.Items.Count <= 0) { GHManager.MysetList.MysetList_Hide(); } } } } }