Ejemplo n.º 1
0
 private void SaveSettings()
 {
     using (global::MediaPortal.Profile.Settings xmlwriter = new global::MediaPortal.Profile.MPSettings())
     {
         xmlwriter.SetValue(this.SettingsSection, "channel", _currentChannel == null ? String.Empty : _currentChannel.DisplayName);
         xmlwriter.SetValue(this.SettingsSection, "ypos", _cursorX.ToString());
         xmlwriter.SetValue(this.SettingsSection, "yoffset", _channelOffset.ToString());
         xmlwriter.SetValue(this.SettingsSection, "timeperblock", _timePerBlock);
     }
 }
Ejemplo n.º 2
0
        private void LoadSettings(out string currentChannelName)
        {
            using (global::MediaPortal.Profile.Settings xmlreader = new global::MediaPortal.Profile.MPSettings())
            {
                _cursorX = xmlreader.GetValueAsInt(this.SettingsSection, "ypos", 0);
                _channelOffset = xmlreader.GetValueAsInt(this.SettingsSection, "yoffset", 0);
                _byIndex = xmlreader.GetValueAsBool("mytv", "byindex", true);
                _showChannelNumber = xmlreader.GetValueAsBool("mytv", "showchannelnumber", false);
                _channelNumberMaxLength = xmlreader.GetValueAsInt("mytv", "channelnumbermaxlength", 3);
                _timePerBlock = xmlreader.GetValueAsInt(this.SettingsSection, "timeperblock", 30);
                _hdtvProgramText = xmlreader.GetValueAsString("mytv", "hdtvProgramText", "(HDTV)");
                _guideContinuousScroll = xmlreader.GetValueAsBool("mytv", "continuousScrollGuide", false);
                _loopDelay = xmlreader.GetValueAsInt("gui", "listLoopDelay", 0);
                currentChannelName = xmlreader.GetValueAsString(this.SettingsSection, "channel", String.Empty);

                _currentChannel = PluginMain.Navigator.CurrentChannel ?? PluginMain.Navigator.GetPreviousChannel(_channelType);
                if (_currentChannel != null)
                {
                    currentChannelName = _currentChannel.DisplayName;
                }

                if (_channelOffset < 0)
                {
                    _channelOffset = 0;
                }
            }
            _useNewRecordingButtonColor =
              Utils.FileExistsInCache(Path.Combine(GUIGraphicsContext.Skin, @"media\tvguide_recButton_Focus_middle.png"));
            _useNewPartialRecordingButtonColor =
              Utils.FileExistsInCache(Path.Combine(GUIGraphicsContext.Skin, @"media\tvguide_partRecButton_Focus_middle.png"));
            _useNewNotifyButtonColor =
              Utils.FileExistsInCache(Path.Combine(GUIGraphicsContext.Skin, @"media\tvguide_notifyButton_Focus_middle.png"));
            _useHdProgramIcon =
              Utils.FileExistsInCache(Path.Combine(GUIGraphicsContext.Skin, @"media\tvguide_hd_program.png"));
        }