示例#1
0
        protected override void OnPageLoad()
        {
            PluginMain.EnsureConnection();

            base.OnPageLoad();
            if (PluginMain.IsConnected())
            {
                LoadSettings();
                if (GUIWindowManager.GetPreviousActiveWindow() != WindowId.ProgramInfo)
                {
                    OnClearRules(false);
                    _selectedTitle      = string.Empty;
                    _selectedTitleIndex = 0;
                }
                ShowSearchResults(_selectedTitle);
                UpdateButtonStates();
                _sortByButton.SortChanged += new SortEventHandler(SortChanged);

                if (this._channelType == ChannelType.Television)
                {
                    GUIPropertyManager.SetProperty("#currentmodule", Utility.GetLocalizedText(TextId.TVGuideSearch));
                }
                else
                {
                    GUIPropertyManager.SetProperty("#currentmodule", Utility.GetLocalizedText(TextId.RadioGuideSearch));
                }
            }
        }
示例#2
0
        protected override void OnPageLoad()
        {
            PluginMain.EnsureConnection();

            base.OnPageLoad();
            if (PluginMain.IsConnected())
            {
                LoadSettings();
                if (GUIWindowManager.GetPreviousActiveWindow() != WindowId.ProgramInfo &&
                    GUIWindowManager.GetPreviousActiveWindow() != WindowId.ManualShedule)
                {
                    _selectedSchedule = null;
                }
                LoadUpcomingPrograms(_selectedSchedule);
                _sortByButton.SortChanged += new SortEventHandler(SortChanged);

                if (this._channelType == ChannelType.Television)
                {
                    GUIPropertyManager.SetProperty("#currentmodule", Utility.GetLocalizedText(TextId.TVScheduler));
                }
                else
                {
                    GUIPropertyManager.SetProperty("#currentmodule", Utility.GetLocalizedText(TextId.RadioScheduler));
                }
            }
        }
示例#3
0
        protected override void OnPageLoad()
        {
            PluginMain.EnsureConnection();
            base.OnPageLoad();

            if (PluginMain.IsConnected())
            {
                _currentChannelType = ChannelType.Television;
                LoadAll(null);
                GUIPropertyManager.SetProperty("#currentmodule", Utility.GetLocalizedText(TextId.ChannelManager));
            }
        }
示例#4
0
        protected override void OnPageLoad()
        {
            PluginMain.EnsureConnection();
            base.OnPageLoad();

            if (PluginMain.IsConnected())
            {
                LoadSettings();
                UpdateButtons();
                GUIPropertyManager.SetProperty("#currentmodule", Utility.GetLocalizedText(TextId.ArgusServerSettings));
            }
        }
示例#5
0
        protected override void OnPageLoad()
        {
            PluginMain.EnsureConnection();
            base.OnPageLoad();

            if (PluginMain.IsConnected())
            {
                UpdateChannels();
                UpdateDateTime();
                UpdateButtonStates();
                UpdateDaysinMonth(Int32.Parse(_spinStartMonth.GetLabel()), Int32.Parse(_spinStartYear.GetLabel()));
                GUIPropertyManager.SetProperty("#currentmodule", GUILocalizeStrings.Get(100748));
            }
        }
示例#6
0
        private void OnStart(bool resume)
        {
            if (!_started)
            {
                try
                {
                    using (Settings xmlreader = new MPSettings())
                    {
                        _lastActivemoduleWasFullscreen = xmlreader.GetValueAsBool("general", "lastactivemoduleTvfullscreen", false);
                    }

                    PluginMain.EnsureConnection(true, false);
                    _notifyManager.start();
                    _eventListener.StartListener();
                    StartKeepAliveThread();
                    StartCacheMiniGuideChannelsThread();

                    if (PluginMain.IsConnected())
                    {
                        //TODO
                        if (_showlastactivemodule && _lastActivemoduleWasFullscreen)
                        {
                            Channel previousChannel = PluginMain.Navigator.GetPreviousChannel(ChannelType.Television);
                            if (previousChannel != null)
                            {
                                //PluginMain.Navigator.ZapToChannel(previousChannel, false);
                            }
                        }
                    }
                }
                catch (Exception ex)
                {
                    Log.Error("TvHome: OnStart error -{0}", ex.Message);
                }
                _started = true;
            }
        }