private void calendar1_ScheduleLabelMouseUp(object sender, CalendarControl.Calendar.ScheduleLabelMouseEventArgs e) { if (e.Button == System.Windows.Forms.MouseButtons.Right) { var menuitems = new ToolStripMenuItem[4]; menuitems[0] = new ToolStripMenuItem("削除", null, MenuDeleteClick); menuitems[1] = new ToolStripMenuItem("その他の候補者", null, MenuOtherClick); menuitems[2] = new ToolStripMenuItem("ランダム選択", null, MenuRandomSelect); menuitems[3] = new ToolStripMenuItem("フリー入力", null, MenuFreeCommentClick); menuitems[0].ShortcutKeyDisplayString = "Delete"; menuitems[2].ShortcutKeyDisplayString = "Ctrl+R"; menu.Items.Clear(); menuitems.ToList().ForEach(t => menu.Items.Add(t)); this.ContextMenuStrip = menu; this.ContextMenuStrip.Show(PointToScreen(new Point(e.X, e.Y))); } }