示例#1
0
 private void EditSelectedShow()
 {
     if (listViewItems.SelectedItems.Count == 1)
     {
         ListViewItem lvItem       = listViewItems.SelectedItems[0];
         ScheduleItem scheduleItem = lvItem.Tag as ScheduleItem;
         Shows.Show   show         = scheduleItem.Show;
         if (show != null)
         {
             using (Shows.ShowEditorForm f = new Shows.ShowEditorForm(show))
             {
                 if (f.ShowDialog() == System.Windows.Forms.DialogResult.OK)
                 {
                     UpdateListItem(scheduleItem);
                 }
             }
         }
         else
         {
             //messageBox Arguments are (Text, Title, No Button Visible, Cancel Button Visible)
             MessageBoxForm.msgIcon = SystemIcons.Error;                     //this is used if you want to add a system icon to the message form.
             var messageBox = new MessageBoxForm("The selected schedule does not have a show associated with it.", "Edit a Show", false, true);
             messageBox.ShowDialog();
         }
     }
 }
示例#2
0
文件: SetupForm.cs 项目: komby/vixen
 private void EditSelectedShow()
 {
     if (listViewItems.SelectedItems.Count == 1)
     {
         ListViewItem lvItem       = listViewItems.SelectedItems[0];
         ScheduleItem scheduleItem = lvItem.Tag as ScheduleItem;
         Shows.Show   show         = scheduleItem.Show;
         if (show != null)
         {
             using (Shows.ShowEditorForm f = new Shows.ShowEditorForm(show))
             {
                 if (f.ShowDialog() == System.Windows.Forms.DialogResult.OK)
                 {
                     UpdateListItem(scheduleItem);
                 }
             }
         }
         else
         {
             MessageBox.Show("The selected schedule does not have a show associated with it.", "Edit a Show", MessageBoxButtons.OKCancel, MessageBoxIcon.Error);
         }
     }
 }
示例#3
0
文件: SetupForm.cs 项目: stewmc/vixen
		private void EditSelectedShow()
		{
			if (listViewItems.SelectedItems.Count == 1)
			{
				ListViewItem lvItem = listViewItems.SelectedItems[0];
				ScheduleItem scheduleItem = lvItem.Tag as ScheduleItem;
				Shows.Show show = scheduleItem.Show;
				if (show != null)
				{
					using (Shows.ShowEditorForm f = new Shows.ShowEditorForm(show))
					{
						if (f.ShowDialog() == System.Windows.Forms.DialogResult.OK)
						{
							UpdateListItem(scheduleItem);
						}
					}
				}
				else
				{
					//messageBox Arguments are (Text, Title, No Button Visible, Cancel Button Visible)
					MessageBoxForm.msgIcon = SystemIcons.Error; //this is used if you want to add a system icon to the message form.
					var messageBox = new MessageBoxForm("The selected schedule does not have a show associated with it.", "Edit a Show", false, true);
					messageBox.ShowDialog();
				}
			}
		}
示例#4
0
 private void EditSelectedShow()
 {
     if (listViewItems.SelectedItems.Count == 1)
     {
         ListViewItem lvItem = listViewItems.SelectedItems[0];
         ScheduleItem scheduleItem = lvItem.Tag as ScheduleItem;
         Shows.Show show = scheduleItem.Show;
         if (show != null)
         {
             using (Shows.ShowEditorForm f = new Shows.ShowEditorForm(show))
             {
                 if (f.ShowDialog() == System.Windows.Forms.DialogResult.OK)
                 {
                     UpdateListItem(scheduleItem);
                 }
             }
         }
         else
         {
             MessageBox.Show("The selected schedule does not have a show associated with it.", "Edit a Show", MessageBoxButtons.OKCancel, MessageBoxIcon.Error);
         }
     }
 }