public static bool ContextAddRemoveProgramHistory(ContentPanel panel, ArgusTV.WinForms.Controls.ProgramContextMenuStrip.AddRemoveProgramHistoryEventArgs e) { try { if (e.AddToHistory) { if (DialogResult.Yes == MessageBox.Show(panel, "Are you sure you want to add this recording to its schedule's" + Environment.NewLine + "history of previously recorded programs?", "Add To History", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button2)) { Proxies.ControlService.AddToPreviouslyRecordedHistory(e.UpcomingProgram); return true; } } else { if (DialogResult.Yes == MessageBox.Show(panel, "Are you sure you want to remove this recording from its schedule's" + Environment.NewLine + "history of previously recorded programs?", "Add To History", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button2)) { Proxies.ControlService.RemoveFromPreviouslyRecordedHistory(e.UpcomingProgram); return true; } } } catch (Exception ex) { MessageBox.Show(panel, ex.Message, null, MessageBoxButtons.OK, MessageBoxIcon.Error); } return false; }
public static bool ContextDeleteSchedule(ContentPanel panel, ArgusTV.WinForms.Controls.ProgramContextMenuStrip.EditScheduleEventArgs e) { try { if (DialogResult.Yes == MessageBox.Show(panel, "Are you sure you want to delete this recording's schedule?", "Delete Schedule", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button2)) { Proxies.SchedulerService.DeleteSchedule(e.ScheduleId); return true; } } catch (Exception ex) { MessageBox.Show(panel, ex.Message, null, MessageBoxButtons.OK, MessageBoxIcon.Error); } return false; }
public static bool ContextCancelProgram(ContentPanel panel, ArgusTV.WinForms.Controls.ProgramContextMenuStrip.CancelProgramEventArgs e) { try { if (e.Cancel) { Proxies.SchedulerService.CancelUpcomingProgram(e.ScheduleId, e.GuideProgramId, e.ChannelId, e.StartTime); } else { Proxies.SchedulerService.UncancelUpcomingProgram(e.ScheduleId, e.GuideProgramId, e.ChannelId, e.StartTime); } return true; } catch (Exception ex) { MessageBox.Show(panel, ex.Message, null, MessageBoxButtons.OK, MessageBoxIcon.Error); } return false; }
private void _epgControl_ProgramContextMenu(object sender, ArgusTV.WinForms.Controls.EpgControl.ProgramEventArgs e) { ScheduleType? scheduleType = null; UpcomingProgram upcomingProgram = null; UpcomingGuideProgram upcomingGuideProgram = null; GuideUpcomingProgram upcomingProgramInfo; if (_model.UpcomingRecordingsById.TryGetValue(e.UpcomingProgramId, out upcomingProgramInfo) || _model.UpcomingAlertsById.TryGetValue(e.UpcomingProgramId, out upcomingProgramInfo) || _model.UpcomingSuggestionsById.TryGetValue(e.UpcomingProgramId, out upcomingProgramInfo)) { scheduleType = upcomingProgramInfo.Type; upcomingProgram = upcomingProgramInfo.UpcomingRecording != null ? upcomingProgramInfo.UpcomingRecording.Program : null; upcomingGuideProgram = upcomingProgramInfo.UpcomingGuideProgram; } _programContextMenuStrip.SetTarget(e.Channel, e.GuideProgram.GuideProgramId, e.GuideProgram.Title, e.GuideProgram.SubTitle, e.GuideProgram.EpisodeNumberDisplay, e.GuideProgram.StartTime, scheduleType, upcomingProgram, upcomingGuideProgram); _programContextMenuStrip.Show(_epgControl, e.Location); }
public static void ContextEditSchedule(ContentPanel panel, ArgusTV.WinForms.Controls.ProgramContextMenuStrip.EditScheduleEventArgs e) { try { EditSchedulePanel editPanel = new EditSchedulePanel(); editPanel.Schedule = Proxies.SchedulerService.GetScheduleById(e.ScheduleId).Result; editPanel.OpenPanel(panel); } catch (Exception ex) { MessageBox.Show(panel, ex.Message, null, MessageBoxButtons.OK, MessageBoxIcon.Error); } }
private void _programContextMenuStrip_DeleteSchedule(object sender, ArgusTV.WinForms.Controls.ProgramContextMenuStrip.EditScheduleEventArgs e) { if (Utility.ContextDeleteSchedule(this, e)) { RefreshSelectedGroupChannels(); } }
private void _programContextMenuStrip_AddRemoveProgramHistory(object sender, ArgusTV.WinForms.Controls.ProgramContextMenuStrip.AddRemoveProgramHistoryEventArgs e) { if (Utility.ContextAddRemoveProgramHistory(this, e)) { RefreshSelectedGroupChannels(); } }
public abstract string AllocateCard(Channel channel, ArgusTV.DataContracts.CardChannelAllocation[] alreadyAllocated, bool useReversePriority);
private void _programContextMenuStrip_AddRemoveProgramHistory(object sender, ArgusTV.WinForms.Controls.ProgramContextMenuStrip.AddRemoveProgramHistoryEventArgs e) { if (Utility.ContextAddRemoveProgramHistory(this, e)) { RefreshAllUpcomingPrograms(); } }
private void _programContextMenuStrip_DeleteSchedule(object sender, ArgusTV.WinForms.Controls.ProgramContextMenuStrip.EditScheduleEventArgs e) { if (Utility.ContextDeleteSchedule(this, e)) { _upcomingProgramsControl.RemoveUpcomingProgramsForSchedule(e.ScheduleId); } }
private void _programContextMenuStrip_CancelProgram(object sender, ArgusTV.WinForms.Controls.ProgramContextMenuStrip.CancelProgramEventArgs e) { if (Utility.ContextCancelProgram(this, e)) { if (e.Cancel) { _upcomingProgramsControl.RemoveUpcomingProgram(e.ScheduleId, e.GuideProgramId, e.ChannelId, e.StartTime); } } }
private void _programContextMenuStrip_PlayWithVlc(object sender, ArgusTV.WinForms.Controls.ProgramContextMenuStrip.PlayWithVlcEventArgs e) { WinFormsUtility.RunVlc(e.RecordingFileName); }
private void _programContextMenuStrip_SetProgramPrePostRecord(object sender, ArgusTV.WinForms.Controls.ProgramContextMenuStrip.SetProgramPrePostRecordEventArgs e) { if (Utility.ContextSetProgramPrePostRecord(this, e)) { _controller.RefreshUpcomingPrograms(); RefreshEpg(false); } }
private void _programContextMenuStrip_DeleteSchedule(object sender, ArgusTV.WinForms.Controls.ProgramContextMenuStrip.EditScheduleEventArgs e) { if (Utility.ContextDeleteSchedule(this, e)) { _controller.RefreshUpcomingPrograms(); RefreshEpg(false); } }
public static bool ContextSetProgramPrePostRecord(ContentPanel panel, ArgusTV.WinForms.Controls.ProgramContextMenuStrip.SetProgramPrePostRecordEventArgs e) { try { if (e.IsPreRecord) { Proxies.SchedulerService.SetUpcomingProgramPreRecord(e.UpcomingProgramId, e.StartTime, e.Seconds); } else { Proxies.SchedulerService.SetUpcomingProgramPostRecord(e.UpcomingProgramId, e.StartTime, e.Seconds); } return true; } catch (Exception ex) { MessageBox.Show(panel, ex.Message, null, MessageBoxButtons.OK, MessageBoxIcon.Error); } return false; }
private void _programContextMenuStrip_CancelProgram(object sender, ArgusTV.WinForms.Controls.ProgramContextMenuStrip.CancelProgramEventArgs e) { if (Utility.ContextCancelProgram(this, e)) { RefreshUpcomingPrograms(); } }
private void _programContextMenuStrip_EditSchedule(object sender, ArgusTV.WinForms.Controls.ProgramContextMenuStrip.EditScheduleEventArgs e) { Utility.ContextEditSchedule(this, e); }
private void _programContextMenuStrip_SetProgramPriority(object sender, ArgusTV.WinForms.Controls.ProgramContextMenuStrip.SetProgramPriorityEventArgs e) { if (Utility.ContextSetProgramPriority(this, e)) { RefreshUpcomingPrograms(); } }
private void _programContextMenuStrip_CancelProgram(object sender, ArgusTV.WinForms.Controls.ProgramContextMenuStrip.CancelProgramEventArgs e) { if (Utility.ContextCancelProgram(this, e)) { RefreshSelectedGroupChannels(); } }
public static void ContextCreateNewSchedule(ContentPanel panel, ArgusTV.WinForms.Controls.ProgramContextMenuStrip.CreateNewScheduleEventArgs e) { EditSchedulePanel editPanel = new EditSchedulePanel(); editPanel.Schedule = e.Schedule; editPanel.OpenPanel(panel); }
private void _programContextMenuStrip_SetProgramPrePostRecord(object sender, ArgusTV.WinForms.Controls.ProgramContextMenuStrip.SetProgramPrePostRecordEventArgs e) { if (Utility.ContextSetProgramPrePostRecord(this, e)) { RefreshSelectedGroupChannels(); } }
private void _epgControl_ProgramClicked(object sender, ArgusTV.WinForms.Controls.EpgControl.ProgramEventArgs e) { try { GuideProgram guideProgram = Proxies.GuideService.GetProgramById(e.GuideProgram.GuideProgramId).Result; using (ProgramDetailsPopup popup = new ProgramDetailsPopup()) { popup.Channel = e.Channel; popup.GuideProgram = guideProgram; Point location = _epgControl.PointToScreen(e.Location); location.Offset(-250, -40); popup.Location = location; popup.ShowDialog(this); } } catch (Exception ex) { MessageBox.Show(this, ex.Message, null, MessageBoxButtons.OK, MessageBoxIcon.Error); } }