private void calendar1_ScheduleLabelMouseUp(object sender, CalendarControl.Calendar.ScheduleLabelMouseEventArgs e)
 {
     if (e.Button == System.Windows.Forms.MouseButtons.Right)
     {
         menu.Items.Clear();
         menu.Items.Add("新しいルールを作成", null, MenuSetRuleClick);
         this.ContextMenuStrip = menu;
         this.ContextMenuStrip.Show(Cursor.Position);                //PointToScreen(new Point(e.X, e.Y)));
     }
 }
示例#2
0
文件: Form1.cs 项目: krkkng/Taikihyou
 private void calendar1_ScheduleLabelMouseUp(object sender, CalendarControl.Calendar.ScheduleLabelMouseEventArgs e)
 {
     //MessageBox.Show(e.Label.Schedule.Item);
     //menu.Items.Clear();
     //List<StandbyList.Person> list = st.PossibleList(e.Label.Schedule.Start, st.Standby);
     //if (list.Count != 0 && list[0][e.Label.Schedule.Start] == StandbyList.PossibleDays.Status.Duty) return;
     //list.ForEach(t => menu.Items.Add(t.Name, null, MenuClick));
     //this.ContextMenuStrip = menu;
     //this.ContextMenuStrip.Show(PointToScreen(new Point(e.X, e.Y)));
     if (e.Button == System.Windows.Forms.MouseButtons.Right)
     {
         menu.Items.Clear();
         menu.Items.Add("削除", null, MenuDeleteClick);
         menu.Items.Add("-", null, null);
         menu.Items.Add("その他の候補者", null, MenuOtherClick);
         menu.Items.Add("フリー入力", null, MenuFreeCommentClick);
         this.ContextMenuStrip = menu;
         this.ContextMenuStrip.Show(PointToScreen(new Point(e.X, e.Y)));
     }
 }
示例#3
0
        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)));
            }
        }
示例#4
0
文件: Form1.cs 项目: krkkng/Taikihyou
 private void calendar1_ScheduleLabelMouseDoubleClick(object sender, CalendarControl.Calendar.ScheduleLabelMouseEventArgs e)
 {
     ShowSubForm(e.Label);
 }