コード例 #1
0
        private void changeToolStripMenuItem_Click(object sender, EventArgs e)
        {
            CalendarItem item = ReturnCalendarItem();

            if (item != null && item.Tag != null)
            {
                ScheduledItem schitem = _data.ScheduledItems.Find(x => x.Id == (Guid)item.Tag);

                using (ConfigureScheduledItems csi = new ConfigureScheduledItems(schitem)) {
                    if (csi.ShowDialog() == DialogResult.OK)
                    {
                        _data.ScheduledItems.Add(csi._scheduledItem);
                        PlaceItems();
                    }
                }
            }
            else
            {
                MessageBox.Show("No item selected to change...", "Information", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
        }
コード例 #2
0
        private void addToolStripMenuItem_Click(object sender, EventArgs e)
        {
            CalendarItem item = ReturnCalendarItem();

            if (item != null && item.Tag != null)
            {
                MessageBox.Show("Item already exists.\r\n" + "If you wish to change date/time just drag and drop where you want the item to be.",
                    "Item Exists", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
            else
            {
                item = new CalendarItem(calendar1, calendar1.SelectedElementStart.Date, calendar1.SelectedElementEnd.Date, "New Item to Add");

                using (ConfigureScheduledItems csi = new ConfigureScheduledItems(item))
                {
                    if (csi.ShowDialog() == DialogResult.OK)
                    {
                        _data.ScheduledItems.Add(csi._scheduledItem);
                        PlaceItems();
                    }
                }
            }
        }
コード例 #3
0
        private void addToolStripMenuItem_Click(object sender, EventArgs e)
        {
            CalendarItem item = ReturnCalendarItem();

            if (item != null && item.Tag != null)
            {
                MessageBox.Show("Item already exists.\r\n" + "If you wish to change date/time just drag and drop where you want the item to be.",
                                "Item Exists", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
            else
            {
                item = new CalendarItem(calendar1, calendar1.SelectedElementStart.Date, calendar1.SelectedElementEnd.Date, "New Item to Add");

                using (ConfigureScheduledItems csi = new ConfigureScheduledItems(item))
                {
                    if (csi.ShowDialog() == DialogResult.OK)
                    {
                        _data.ScheduledItems.Add(csi._scheduledItem);
                        PlaceItems();
                    }
                }
            }
        }
コード例 #4
0
ファイル: ConfigureSchedule.cs プロジェクト: stewmc/vixen
		private void changeToolStripMenuItem_Click(object sender, EventArgs e)
		{
			CalendarItem item = ReturnCalendarItem();
			if (item != null && item.Tag != null) {
				ScheduledItem schitem = _data.ScheduledItems.Find(x => x.Id == (Guid) item.Tag);

				using (ConfigureScheduledItems csi = new ConfigureScheduledItems(schitem)) {
					if (csi.ShowDialog() == DialogResult.OK) {
						_data.ScheduledItems.Add(csi._scheduledItem);
						PlaceItems();
					}
				}
			}
			else {
				MessageBox.Show("No item selected to change...", "Information", MessageBoxButtons.OK, MessageBoxIcon.Information);
			}
		}