Exemplo n.º 1
0
        public static void ContextCreateNewSchedule(ContentPanel panel, ArgusTV.WinForms.Controls.ProgramContextMenuStrip.CreateNewScheduleEventArgs e)
        {
            EditSchedulePanel editPanel = new EditSchedulePanel();

            editPanel.Schedule = e.Schedule;
            editPanel.OpenPanel(panel);
        }
Exemplo n.º 2
0
 private void CloseAndRemovePanel(ContentPanel contentPanel)
 {
     contentPanel.Visible = false;
     contentPanel.OnClosed();
     _contentContainer.Controls.Remove(contentPanel);
     contentPanel.Dispose();
 }
Exemplo n.º 3
0
 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);
 }
Exemplo n.º 4
0
        private void _cancelMenuItemLinkLabel_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            ContentPanel activePanel = this.ActiveContentPanel;

            if (activePanel != null)
            {
                activePanel.OnCancel();
            }
        }
Exemplo n.º 5
0
 public void OpenContentPanel(ContentPanel contentPanel)
 {
     foreach (Control control in _contentContainer.Controls)
     {
         control.Visible = false;
     }
     contentPanel.Dock = DockStyle.Fill;
     _contentContainer.Controls.Add(contentPanel);
     this.Text = _formTitle + " - " + contentPanel.Title;
 }
Exemplo n.º 6
0
 public void CloseContentPanel(ContentPanel contentPanel, ContentPanel activatePanel)
 {
     this.Text = _formTitle;
     if (activatePanel != null)
     {
         this.Text             = _formTitle + " - " + activatePanel.Title;
         activatePanel.Visible = true;
     }
     CloseAndRemovePanel(contentPanel);
 }
Exemplo n.º 7
0
 public static bool ContextSetProgramPriority(ContentPanel panel, ArgusTV.WinForms.Controls.ProgramContextMenuStrip.SetProgramPriorityEventArgs e)
 {
     try
     {
         Proxies.SchedulerService.SetUpcomingProgramPriority(e.UpcomingProgramId, e.StartTime, e.Priority);
         return(true);
     }
     catch (Exception ex)
     {
         MessageBox.Show(panel, ex.Message, null, MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
     return(false);
 }
Exemplo n.º 8
0
 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);
     }
 }
Exemplo n.º 9
0
 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);
 }
Exemplo n.º 10
0
 public void CloseAllContentPanels()
 {
     while (_contentContainer.Controls.Count > 0)
     {
         Control      control      = _contentContainer.Controls[0];
         ContentPanel contentPanel = control as ContentPanel;
         if (contentPanel != null)
         {
             CloseAndRemovePanel(contentPanel);
         }
         else
         {
             _contentContainer.Controls.RemoveAt(0);
             control.Dispose();
         }
     }
 }
Exemplo n.º 11
0
 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);
 }
Exemplo n.º 12
0
 public virtual void OnChildClosed(ContentPanel childPanel)
 {
 }
Exemplo n.º 13
0
 private void CloseAndRemovePanel(ContentPanel contentPanel)
 {
     contentPanel.Visible = false;
     contentPanel.OnClosed();
     _contentContainer.Controls.Remove(contentPanel);
     contentPanel.Dispose();
 }
Exemplo n.º 14
0
 public virtual void OnChildClosed(ContentPanel childPanel)
 {
 }
Exemplo n.º 15
0
 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;
 }
Exemplo n.º 16
0
 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;
 }
Exemplo n.º 17
0
 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;
 }
Exemplo n.º 18
0
 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;
 }
Exemplo n.º 19
0
 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);
     }
 }
Exemplo n.º 20
0
 public static void ContextCreateNewSchedule(ContentPanel panel, ArgusTV.WinForms.Controls.ProgramContextMenuStrip.CreateNewScheduleEventArgs e)
 {
     EditSchedulePanel editPanel = new EditSchedulePanel();
     editPanel.Schedule = e.Schedule;
     editPanel.OpenPanel(panel);
 }
Exemplo n.º 21
0
 public void CloseContentPanel(ContentPanel contentPanel, ContentPanel activatePanel)
 {
     this.Text = _formTitle;
     if (activatePanel != null)
     {
         this.Text = _formTitle + " - " + activatePanel.Title;
         activatePanel.Visible = true;
     }
     CloseAndRemovePanel(contentPanel);
 }
Exemplo n.º 22
0
 public void OpenPanel(ContentPanel ownerPanel)
 {
     _ownerPanel = ownerPanel;
     _ownerPanel.MainForm.OpenContentPanel(this);
 }
Exemplo n.º 23
0
 public void OpenPanel(ContentPanel ownerPanel)
 {
     _ownerPanel = ownerPanel;
     _ownerPanel.MainForm.OpenContentPanel(this);
 }
Exemplo n.º 24
0
 public void OpenContentPanel(ContentPanel contentPanel)
 {
     foreach (Control control in _contentContainer.Controls)
     {
         control.Visible = false;
     }
     contentPanel.Dock = DockStyle.Fill;
     _contentContainer.Controls.Add(contentPanel);
     this.Text = _formTitle + " - " + contentPanel.Title;
 }