示例#1
0
 private void toolStripButton2_Click(object sender, EventArgs e)
 {
     using (ScheduleDialog form = new ScheduleDialog(null, null, null))
     {
         DialogResult dr = form.ShowDialog();
         if (dr == DialogResult.OK)
         {
         }
     }
 }
示例#2
0
 private void addToolStripMenuItem_Click_1(object sender, EventArgs e)
 {
     using (ScheduleDialog form = new ScheduleDialog(null, null, null))
     {
         DialogResult dr = form.ShowDialog();
         if (dr == DialogResult.OK)
         {
             viewToolStripMenuItem_Click_1(null, null);
         }
     }
 }
示例#3
0
        private void calendar1_ItemCreated(object sender, System.Windows.Forms.Calendar.CalendarItemCancelEventArgs e)
        {
            var start = Convert.ToDateTime(e.Item.Date).ToString("yyyy-MM-dd") + "T" + Convert.ToDateTime(e.Item.Date).ToString("HH:mm:ss");
            var end   = Convert.ToDateTime(e.Item.EndDate).ToString("yyyy-MM-dd") + "T" + Convert.ToDateTime(e.Item.EndDate).ToString("HH:mm:ss");

            using (ScheduleDialog form = new ScheduleDialog(start, end, e.Item.Date.ToString()))
            {
                DialogResult dr = form.ShowDialog();
                if (dr == DialogResult.OK)
                {
                    LoadingCalendar("Status");
                    monthView1_SelectionChanged(null, null);
                }
            }
        }