private void GuidePanel_Load(object sender, EventArgs e) { try { _inLoad = true; Cursor.Current = Cursors.WaitCursor; _model = new GuideModel(); _controller = new GuideController(_model); ChannelType channelType = ChannelType.Television; if (MainForm.Session.ContainsKey(SessionKey.ChannelType)) { channelType = (ChannelType)MainForm.Session[SessionKey.ChannelType]; } _controller.Initialize(channelType, 24, ArgusTV.WinForms.Controls.EpgControl.EpgHoursOffset, "All Channels"); _channelTypeComboBox.SelectedIndex = (int)_model.ChannelType; _groupsBindingSource.DataSource = _model.ChannelGroups; _channelGroupsComboBox.DisplayMember = "GroupName"; _channelGroupsComboBox.ValueMember = "ChannelGroupId"; if (MainForm.Session.ContainsKey(SessionKey.ChannelGroupId)) { _channelGroupsComboBox.SelectedValue = (Guid)MainForm.Session[SessionKey.ChannelGroupId]; } DateTime guideDate = GetCurrentGuideDate(); if (MainForm.Session.ContainsKey(SessionKey.GuideDate)) { guideDate = (DateTime)MainForm.Session[SessionKey.GuideDate]; } _gotoNowTime = true; _guideDatePicker.Value = guideDate; RefreshEpg(true); } catch (Exception ex) { MessageBox.Show(this, ex.Message, null, MessageBoxButtons.OK, MessageBoxIcon.Error); } finally { Cursor.Current = Cursors.Default; _inLoad = false; } }
public void RefreshEpg(GuideModel model) { _model = model; _channelCells.Clear(); int top = 0; foreach (Channel channel in _model.Channels) { top = CreateChannelCell(channel, top); } this.Height = top; this.Refresh(); }
public GuideController(GuideModel model) { _model = model; }
protected override void OnPageLoad() { if (PluginMain.EnsureConnection() && _model == null) { _model = new GuideModel(); _controller = new GuideController(_model); _controller.Initialize(_channelType, 3, Utility.GetLocalizedText(TextId.AllChannels)); } if (PluginMain.Navigator.CurrentGroup != null && PluginMain.Navigator.CurrentGroup.ChannelType == _channelType) { _controller.SetChannelGroup(PluginMain.Navigator.CurrentGroup.ChannelGroupId); } base.OnPageLoad(); }
public void RefreshEpg(GuideModel model) { _model = model; _guideProgramCells.Clear(); int top = 0; foreach (Channel channel in _model.Channels) { top = CreateEpgChannelCells(channel, top); } this.Width = (int)(5760 * _widthFactor); this.Height = top; this.Refresh(); }
public void RefreshEpg(GuideModel model) { _epgProgramsGridControl.RefreshEpg(model); }
public void RefreshEpg(GuideModel model) { _model = model; _epgChannelsControl.RefreshEpg(model); _epgProgramsControl.RefreshEpg(model); SetTimeIndicator(); }
public static DateTime GetEpgStartTime(GuideModel model) { return model.GuideDateTime.Date.AddHours(EpgHoursOffset); }
public static DateTime GetEpgEndTime(GuideModel model) { return model.GuideDateTime.Date.AddDays(1).AddHours(EpgHoursOffset); }
public void RefreshEpg(GuideModel model) { _epgChannelsGridControl.RefreshEpg(model); }