当前位置: 首页>>代码示例>>C#>>正文


C# Profile.MPSettings.GetValueAsInt方法代码示例

本文整理汇总了C#中Profile.MPSettings.GetValueAsInt方法的典型用法代码示例。如果您正苦于以下问题:C# Profile.MPSettings.GetValueAsInt方法的具体用法?C# Profile.MPSettings.GetValueAsInt怎么用?C# Profile.MPSettings.GetValueAsInt使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Profile.MPSettings的用法示例。


在下文中一共展示了Profile.MPSettings.GetValueAsInt方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: LoadSettings

 private void LoadSettings()
 {
   using (Profile.Settings xmlreader = new Profile.MPSettings())
   {
     m_iSpeedHorizontal = xmlreader.GetValueAsInt("gui", "ScrollSpeedRight", 1);
     m_iSpeedVertical = xmlreader.GetValueAsInt("gui", "ScrollSpeedDown", 4);
     m_iListLoopDelay = xmlreader.GetValueAsInt("gui", "listLoopDelay", 100);
   }
 }
开发者ID:edterbak,项目名称:MediaPortal-1,代码行数:9,代码来源:GUISettingsGUI_ScrollSpeed.cs

示例2: LoadSettings

    // Need change for 1.3.0
    #region Serialization

    private void LoadSettings()
    {
      using (Profile.Settings xmlreader = new Profile.MPSettings())
      {
        // Mark Watched
        btnMarkWatched.Selected = xmlreader.GetValueAsBool("movies", "markwatched", true);
        btnKeepFoldersTogether.Selected = xmlreader.GetValueAsBool("movies", "keepfolderstogether", false);
        btnCommercialSkip.Selected = xmlreader.GetValueAsBool("comskip", "automaticskip", false);
        _watchedPercentage = xmlreader.GetValueAsInt("movies", "playedpercentagewatched", 95);
        _videoAudioDelay = xmlreader.GetValueAsInt("FFDShow", "audiodelayInterval", 50);      
      }
    }
开发者ID:hkjensen,项目名称:MediaPortal-1,代码行数:15,代码来源:GUISettingsMyVideos_OtherSettings.cs

示例3: LoadSettings

 private void LoadSettings()
 {
   using (Profile.Settings xmlreader = new Profile.MPSettings())
   {
     checkBoxUseTrayIcon.Checked = xmlreader.GetValueAsBool("audioscrobbler", "showtrayicon", true);
     checkBoxShowBallonTips.Checked = xmlreader.GetValueAsBool("audioscrobbler", "showballontips", true);
     checkBoxSubmitToProfile.Checked = xmlreader.GetValueAsBool("audioscrobbler", "submitradiotracks", true);
     checkBoxDirectSkip.Checked = xmlreader.GetValueAsBool("audioscrobbler", "directskip", false);
     numericUpDownListEntries.Value = xmlreader.GetValueAsInt("audioscrobbler", "listentrycount", 24);
     comboBoxStreamPlayerType.SelectedIndex = xmlreader.GetValueAsInt("audioscrobbler", "streamplayertype", 0);
     checkBoxOneClickMode.Checked = xmlreader.GetValueAsBool("audioscrobbler", "oneclickstart", false);
   }
 }
开发者ID:sekotin,项目名称:MediaPortal-1,代码行数:13,代码来源:PluginSetupForm.cs

示例4: LoadSettings

    private void LoadSettings()
    {
      using (Profile.Settings xmlreader = new Profile.MPSettings())
      {
        m_iSpeed = xmlreader.GetValueAsInt("pictures", "speed", 3);
        m_iTransistion = xmlreader.GetValueAsInt("pictures", "transition", 20);
        m_iKenBurnsSpeed = xmlreader.GetValueAsInt("pictures", "kenburnsspeed", 20);
        m_bKenBurns = xmlreader.GetValueAsBool("pictures", "kenburns", false);
        m_bRandom = xmlreader.GetValueAsBool("pictures", "random", false);
        m_bXFade = (!m_bRandom & !m_bKenBurns);

        cmShuffleSlideShows.Selected = xmlreader.GetValueAsBool("pictures", "autoShuffle", false);
        cmLoopSlideShows.Selected = xmlreader.GetValueAsBool("pictures", "autoRepeat", false);

        cmExifSlideShows.Selected = xmlreader.GetValueAsBool("pictures", "useExif", true);
        cmPicasaSlideShows.Selected = xmlreader.GetValueAsBool("pictures", "usePicasa", false);
        cmGroupByDaySlideShows.Selected = xmlreader.GetValueAsBool("pictures", "useDayGrouping", false);
        cmEnablePlaySlideShows.Selected = xmlreader.GetValueAsBool("pictures", "enableVideoPlayback", false);
        cmPlayInSlideShows.Selected = xmlreader.GetValueAsBool("pictures", "playVideosInSlideshows", false);
      }
    }
开发者ID:arangas,项目名称:MediaPortal-1,代码行数:21,代码来源:GUISettingsPictures_Slideshow.cs

示例5: LoadSettings

 private void LoadSettings()
 {
   using (Profile.Settings xmlreader = new Profile.MPSettings())
   {
     _speed = xmlreader.GetValueAsInt("pictures", "speed", 3);
     _slideShowTransistionFrames = xmlreader.GetValueAsInt("pictures", "transition", 20);
     _kenBurnTransistionSpeed = xmlreader.GetValueAsInt("pictures", "kenburnsspeed", 20);
     _useKenBurns = xmlreader.GetValueAsBool("pictures", "kenburns", false);
     _useRandomTransitions = xmlreader.GetValueAsBool("pictures", "random", true);
     _autoShuffle = xmlreader.GetValueAsBool("pictures", "autoShuffle", false);
     _autoRepeat = xmlreader.GetValueAsBool("pictures", "autoRepeat", false);
   }
 }
开发者ID:npcomplete111,项目名称:MediaPortal-1,代码行数:13,代码来源:GUISlideShow.cs

示例6: LoadSettings

    protected override void LoadSettings()
    {
      base.LoadSettings();
      using (Profile.Settings xmlreader = new Profile.MPSettings())
      {
        MusicState.StartWindow = xmlreader.GetValueAsInt("music", "startWindow", GetID);
        MusicState.View = xmlreader.GetValueAsString("music", "startview", string.Empty);
        _createMissingFolderThumbCache = xmlreader.GetValueAsBool("thumbnails", "musicfolderondemand", true);
        _createMissingFolderThumbs = xmlreader.GetValueAsBool("musicfiles", "createMissingFolderThumbs", false);
        _useFolderThumbs = xmlreader.GetValueAsBool("musicfiles", "useFolderThumbs", true);

        _selectOption = xmlreader.GetValueAsString("musicfiles", "selectOption", "play");
        _addAllOnSelect = xmlreader.GetValueAsBool("musicfiles", "addall", true);
        _playlistIsCurrent = xmlreader.GetValueAsBool("musicfiles", "playlistIsCurrent", true);

        for (int i = 0; i < _sortModes.Length; ++i)
        {
          _sortTags1[i] = xmlreader.GetValueAsString("mymusic", _sortModes[i] + "1", _defaultSortTags1[i]);
          _sortTags2[i] = xmlreader.GetValueAsString("mymusic", _sortModes[i] + "2", _defaultSortTags2[i]);
        }

        string playListFolder = Environment.GetFolderPath(Environment.SpecialFolder.Personal);
        playListFolder += @"\My Playlists";

        m_strPlayListPath = xmlreader.GetValueAsString("music", "playlists", playListFolder);
        m_strPlayListPath = Util.Utils.RemoveTrailingSlash(m_strPlayListPath);

        _shareList.Clear();

        string strDefault = xmlreader.GetValueAsString("music", "default", string.Empty);
        for (int i = 0; i < VirtualDirectory.MaxSharesCount; i++)
        {
          string strShareName = String.Format("sharename{0}", i);
          string strSharePath = String.Format("sharepath{0}", i);
          string strPincode = String.Format("pincode{0}", i);

          string shareType = String.Format("sharetype{0}", i);
          string shareServer = String.Format("shareserver{0}", i);
          string shareLogin = String.Format("sharelogin{0}", i);
          string sharePwd = String.Format("sharepassword{0}", i);
          string sharePort = String.Format("shareport{0}", i);
          string remoteFolder = String.Format("shareremotepath{0}", i);
          string shareViewPath = String.Format("shareview{0}", i);

          Share share = new Share();
          share.Name = xmlreader.GetValueAsString("music", strShareName, string.Empty);
          share.Path = xmlreader.GetValueAsString("music", strSharePath, string.Empty);
          share.Pincode = xmlreader.GetValueAsInt("music", strPincode, -1);

          share.IsFtpShare = xmlreader.GetValueAsBool("music", shareType, false);
          share.FtpServer = xmlreader.GetValueAsString("music", shareServer, string.Empty);
          share.FtpLoginName = xmlreader.GetValueAsString("music", shareLogin, string.Empty);
          share.FtpPassword = xmlreader.GetValueAsString("music", sharePwd, string.Empty);
          share.FtpPort = xmlreader.GetValueAsInt("music", sharePort, 21);
          share.FtpFolder = xmlreader.GetValueAsString("music", remoteFolder, "/");
          share.DefaultLayout = (Layout)xmlreader.GetValueAsInt("music", shareViewPath, (int)Layout.List);

          if (share.Name.Length > 0)
          {
            if (strDefault == share.Name)
            {
              share.Default = true;
            }
            _shareList.Add(share);
          }
          else
          {
            break;
          }
        }
      }
    }
开发者ID:nio22,项目名称:MediaPortal-1,代码行数:72,代码来源:GUIMusicBaseWindow.cs

示例7: LoadSettings

    private void LoadSettings()
    {
      _listLocations.Clear();
      using (Profile.Settings xmlreader = new Profile.MPSettings())
      {
        _locationCode = xmlreader.GetValueAsString("weather", "location", string.Empty);
        _temperatureFarenheit = xmlreader.GetValueAsString("weather", "temperature", "C");
        int loadWind = xmlreader.GetValueAsInt("weather", "speed", 0);
        switch (loadWind)
        {
          case 0:
            _currentWindUnit = WindUnit.Kmh;
            break;
          case 1:
            _currentWindUnit = WindUnit.mph;
            break;
          case 2:
            _currentWindUnit = WindUnit.ms;
            break;
          case 3:
            _currentWindUnit = WindUnit.Kn;
            break;
          case 4:
            _currentWindUnit = WindUnit.Bft;
            break;
          default:
            _currentWindUnit = WindUnit.Bft;
            break;
        }

        _refreshIntercal = xmlreader.GetValueAsInt("weather", "refresh", 60);
        _lastRefreshTime = DateTime.Now.AddMinutes(-(_refreshIntercal + 1));
        _skipConnectionTest = xmlreader.GetValueAsBool("weather", "skipconnectiontest", false);
        Log.Info("GUIWindowWeather: SkipConnectionTest: {0}", _skipConnectionTest);

        bool bFound = false;
        for (int i = 0; i < VirtualDirectory.MaxSharesCount; i++)
        {
          string cityTag = String.Format("city{0}", i);
          string strCodeTag = String.Format("code{0}", i);
          string strSatUrlTag = String.Format("sat{0}", i);
          string strTempUrlTag = String.Format("temp{0}", i);
          string strUVUrlTag = String.Format("uv{0}", i);
          string strWindsUrlTag = String.Format("winds{0}", i);
          string strHumidUrlTag = String.Format("humid{0}", i);
          string strPrecipUrlTag = String.Format("precip{0}", i);
          string city = xmlreader.GetValueAsString("weather", cityTag, string.Empty);
          string strCode = xmlreader.GetValueAsString("weather", strCodeTag, string.Empty);
          string strSatURL = xmlreader.GetValueAsString("weather", strSatUrlTag, string.Empty);
          string strTempURL = xmlreader.GetValueAsString("weather", strTempUrlTag, string.Empty);
          string strUVURL = xmlreader.GetValueAsString("weather", strUVUrlTag, string.Empty);
          string strWindsURL = xmlreader.GetValueAsString("weather", strWindsUrlTag, string.Empty);
          string strHumidURL = xmlreader.GetValueAsString("weather", strHumidUrlTag, string.Empty);
          string strPrecipURL = xmlreader.GetValueAsString("weather", strPrecipUrlTag, string.Empty);
          if (city.Length > 0 && strCode.Length > 0)
          {
            if (strSatURL.Length == 0)
            {
              //strSatURL = "http://www.heute.de/CMO/frontend/subsystem_we/WeShowPicture/0,6008,161,00.gif";
              //strSatURL = @"http://images.intellicast.com/WeatherImg/SatelliteLoop/hieusat_None_anim.gif";
              //strSatURL = @"http://www.sat24.com/image.ashx?country=eu&type=loop&sat=vis";
              strSatURL = @"http://www.sat24.com/image.ashx?country=eu";
            }

            LocationInfo loc = new LocationInfo();
            loc.City = city;
            loc.CityCode = strCode;
            loc.UrlSattelite = strSatURL;
            loc.UrlTemperature = strTempURL;
            loc.UrlUvIndex = strUVURL;
            loc.UrlWinds = strWindsURL;
            loc.UrlHumidity = strHumidURL;
            loc.UrlPrecip = strPrecipURL;
            _listLocations.Add(loc);
            if (String.Compare(_locationCode, strCode, true) == 0)
            {
              bFound = true;
            }
          }
        }
        if (!bFound)
        {
          if (_listLocations.Count > 0)
          {
            _locationCode = ((LocationInfo)_listLocations[0]).CityCode;
          }
        }
      }
    }
开发者ID:npcomplete111,项目名称:MediaPortal-1,代码行数:89,代码来源:GUIWindowWeather.cs

示例8: LoadSettings

    private void LoadSettings()
    {
      using (Profile.Settings xmlreader = new Profile.MPSettings())
      {
        m_iSpeed = xmlreader.GetValueAsInt("pictures", "speed", 3);
        m_iTransistion = xmlreader.GetValueAsInt("pictures", "transition", 20);
        m_iKenBurnsSpeed = xmlreader.GetValueAsInt("pictures", "kenburnsspeed", 20);
        m_bKenBurns = xmlreader.GetValueAsBool("pictures", "kenburns", false);
        m_bRandom = xmlreader.GetValueAsBool("pictures", "random", false);
        m_bXFade = (!m_bRandom & !m_bKenBurns);


        cmShuffleSlideShows.Selected = xmlreader.GetValueAsBool("pictures", "autoShuffle", false);
        cmLoopSlideShows.Selected = xmlreader.GetValueAsBool("pictures", "autoRepeat", false);
      }
    }
开发者ID:npcomplete111,项目名称:MediaPortal-1,代码行数:16,代码来源:GUISettingsSlideShow.cs

示例9: LoadButtonNames

    protected override void LoadButtonNames()
    {
      if (menuMain == null)
      {
        return;
      }
      menuMain.ButtonInfos.Clear();
      ArrayList plugins = PluginManager.SetupForms;

      using (Profile.Settings xmlreader = new Profile.MPSettings())
      {
        foreach (ISetupForm setup in plugins)
        {
          string plugInText;
          string focusTexture;
          string nonFocusTexture;
          string hover;
          string nonFocusHover;
          if (setup.GetHome(out plugInText, out focusTexture, out nonFocusTexture, out hover))
          {
            if (setup.PluginName().Equals("Home"))
            {
              continue;
            }
            IShowPlugin showPlugin = setup as IShowPlugin;

            string showInPlugIns = xmlreader.GetValue("myplugins", setup.PluginName());
            if ((showInPlugIns == null) || (showInPlugIns.Length < 1))
            {
              if ((showPlugin != null) && (showPlugin.ShowDefaultHome() == true))
              {
                continue;
              }
            }
            else
            {
              if (showInPlugIns.ToLowerInvariant().Equals("no"))
              {
                continue;
              }
            }

            if ((focusTexture == null) || (focusTexture.Length < 1))
            {
              focusTexture = setup.PluginName();
            }
            if ((nonFocusTexture == null) || (nonFocusTexture.Length < 1))
            {
              nonFocusTexture = setup.PluginName();
            }
            if ((hover == null) || (hover.Length < 1))
            {
              hover = setup.PluginName();
            }
            focusTexture = GetFocusTextureFileName(focusTexture);
            nonFocusTexture = GetNonFocusTextureFileName(nonFocusTexture);
            nonFocusHover = GetNonFocusHoverFileName(hover);
            hover = GetHoverFileName(hover);
            int index = xmlreader.GetValueAsInt("pluginSorting", "my Plugins", Int32.MaxValue);
            menuMain.ButtonInfos.Add(new MenuButtonInfo(plugInText, setup.GetWindowId(), focusTexture, nonFocusTexture,
                                                        hover, nonFocusHover, index));
          }
        }
      }
    }
开发者ID:arangas,项目名称:MediaPortal-1,代码行数:65,代码来源:GUIPlugIns.cs

示例10: SetOutputContext

    public override bool SetOutputContext(OutputContextType outputType)
    {
      if (VisualizationWindow == null)
      {
        return false;
      }

      if (_Initialized && !firstRun)
      {
        return true;
      }

      // If width or height are 0 the call to CreateVis will fail.  
      // If width or height are 1 the window is in transition so we can ignore it.
      if (VisualizationWindow.Width <= 1 || VisualizationWindow.Height <= 1)
      {
        return false;
      }

      if (VizPluginInfo == null || VizPluginInfo.FilePath.Length == 0 || !File.Exists(VizPluginInfo.FilePath))
      {
        return false;
      }

      string vizPath = VizPluginInfo.FilePath;
      string configFile = Path.Combine(System.Windows.Forms.Application.StartupPath, @"musicplayer\plugins\visualizations\Sonique\vis.ini");     

      try
      {
        // Call Play befor use BASSVIS_ExecutePlugin (moved here)
        BassVis.BASSVIS_SetPlayState(_visParam, BASSVIS_PLAYSTATE.Play);

        using (Profile.Settings xmlreader = new Profile.MPSettings())
        {
          VizPluginInfo.UseOpenGL = xmlreader.GetValueAsBool("musicvisualization", "useOpenGL", true);
          VizPluginInfo.UseCover = xmlreader.GetValueAsBool("musicvisualization", "useCover", true);
          VizPluginInfo.RenderTiming = xmlreader.GetValueAsInt("musicvisualization", "renderTiming", 25);
          VizPluginInfo.ViewPortSize = xmlreader.GetValueAsInt("musicvisualization", "viewPort", 0);
        }

        // Create the Visualisation
        visExec = new BASSVIS_EXEC(vizPath);
        visExec.SON_ConfigFile = configFile;
        visExec.SON_ParentHandle = VisualizationWindow.Handle;
        visExec.Width = VisualizationWindow.Width;
        visExec.Height = VisualizationWindow.Height;
        visExec.SON_UseOpenGL = VizPluginInfo.UseOpenGL;
        visExec.SON_ViewportWidth = VizPluginInfo.ViewPortSizeX;
        visExec.SON_ViewportHeight = VizPluginInfo.ViewPortSizeY;
        visExec.Left = VisualizationWindow.Left;
        visExec.Top = VisualizationWindow.Top;
        visExec.SON_ShowFPS = true;
        // can not check IsRadio on first start
        // so ProgressBar and Cover Visible state will hide after change to the next Plugin to
        if (Bass.IsRadio)
        {
          // no duration deactivate ProgressBar
          visExec.SON_ShowPrgBar = false;
          // Cover-Support used only on first start if VizPluginInfo.UseCover = true
          // after or change the plugin in FullScreen, Cover-Support will disable for RadioStreams
          visExec.SON_UseCover = false; 
        }
        else
        {
          visExec.SON_ShowPrgBar = true;
          visExec.SON_UseCover = VizPluginInfo.UseCover; 
        }

        BassVis.BASSVIS_ExecutePlugin(visExec, _visParam);

        if (_visParam.VisHandle != 0)
        {
          // Config Settings
          BassVis.BASSVIS_SetOption(_visParam, BASSVIS_CONFIGFLAGS.BASSVIS_SONIQUEVIS_CONFIG_RENDERTIMING, VizPluginInfo.RenderTiming);
          BassVis.BASSVIS_SetOption(_visParam, BASSVIS_CONFIGFLAGS.BASSVIS_SONIQUEVIS_CONFIG_USESLOWFADE, 1);
          BassVis.BASSVIS_SetOption(_visParam, BASSVIS_CONFIGFLAGS.BASSVIS_SONIQUEVIS_CONFIG_SLOWFADE, 5);
          BassVis.BASSVIS_SetOption(_visParam, BASSVIS_CONFIGFLAGS.BASSVIS_CONFIG_FFTAMP, 5);
          
          // SetForegroundWindow
          GUIGraphicsContext.form.Activate();
        }
        firstRun = false;
      }
      catch (Exception ex)
      {
        Log.Error(
          "Visualization Manager: Sonique visualization engine initialization failed with the following exception {0}",
          ex);
      }
      _Initialized = _visParam.VisHandle != 0;
      return _visParam.VisHandle != 0;
    }
开发者ID:splatterpop,项目名称:MediaPortal-1,代码行数:92,代码来源:SoniqueViz.cs

示例11: LoadSettings

    protected override void LoadSettings()
    {
      base.LoadSettings();
      using (Profile.Settings xmlreader = new Profile.MPSettings())
      {
        currentLayout = (Layout) xmlreader.GetValueAsInt(SerializeName, "layout", (int) Layout.List);
        m_bSortAscending = xmlreader.GetValueAsBool(SerializeName, "sortasc", true);
        VideoState.StartWindow = xmlreader.GetValueAsInt("movies", "startWindow", GetID);
        VideoState.View = xmlreader.GetValueAsString("movies", "startview", "369");

        // Prevent unaccesible My Videos from corrupted config
        if (!IsVideoWindow(VideoState.StartWindow))
        {
          VideoState.StartWindow = GetID;
          VideoState.View = "369";
        }

        _addVideoFilesToDb = xmlreader.GetValueAsBool("gui", "addVideoFilesToDb", false);
        _isFuzzyMatching = xmlreader.GetValueAsBool("movies", "fuzzyMatching", false);
        _scanSkipExisting = xmlreader.GetValueAsBool("moviedatabase", "scanskipexisting", false);
        _getActors = xmlreader.GetValueAsBool("moviedatabase", "getactors", true);
        _markWatchedFiles = xmlreader.GetValueAsBool("movies", "markwatched", true);
        //_eachFolderIsMovie = xmlreader.GetValueAsBool("movies", "eachFolderIsMovie", false);
        _fileMenuEnabled = xmlreader.GetValueAsBool("filemenu", "enabled", true);
        _fileMenuPinCode = Util.Utils.DecryptPassword(xmlreader.GetValueAsString("filemenu", "pincode", string.Empty));
        _howToPlayAll = xmlreader.GetValueAsInt("movies", "playallinfolder", 3);
        _watchedPercentage = xmlreader.GetValueAsInt("movies", "playedpercentagewatched", 95);
        _videoInfoInShare = xmlreader.GetValueAsBool("moviedatabase", "movieinfoshareview", false);
        _BDInternalMenu = xmlreader.GetValueAsBool("bdplayer", "useInternalBDPlayer", true);

        _virtualDirectory = VirtualDirectories.Instance.Movies;
		    // External player
        _useInternalVideoPlayer = xmlreader.GetValueAsBool("movieplayer", "internal", true);
        _useInternalDVDVideoPlayer = xmlreader.GetValueAsBool("dvdplayer", "internal", true);
        _externalPlayerExtensions = xmlreader.GetValueAsString("movieplayer", "extensions", "");

        _wolTimeout = xmlreader.GetValueAsInt("WOL", "WolTimeout", 10);
        _wolResendTime = xmlreader.GetValueAsInt("WOL", "WolResendTime", 1);

        if (_virtualStartDirectory == string.Empty)
        {
          if (_virtualDirectory.DefaultShare != null)
          {
            if (_virtualDirectory.DefaultShare.IsFtpShare)
            {
              //remote:hostname?port?login?password?folder
              _currentFolder = _virtualDirectory.GetShareRemoteURL(_virtualDirectory.DefaultShare);
              _virtualStartDirectory = _currentFolder;
            }
            else
            {
              _currentFolder = _virtualDirectory.DefaultShare.Path;
              _virtualStartDirectory = _virtualDirectory.DefaultShare.Path;
            }
          }
        }

        _askBeforePlayingDVDImage = xmlreader.GetValueAsBool("daemon", "askbeforeplaying", false);

        if (xmlreader.GetValueAsBool("movies", "rememberlastfolder", false))
        {
          string lastFolder = xmlreader.GetValueAsString("movies", "lastfolder", _currentFolder);
          if (VirtualDirectory.IsImageFile(Path.GetExtension(lastFolder)))
          {
            lastFolder = "root";
          }
          if (lastFolder != "root")
          {
            _currentFolder = lastFolder;
          }
        }

        _switchRemovableDrives = xmlreader.GetValueAsBool("movies", "SwitchRemovableDrives", true);
        _useOnlyNfoScraper = xmlreader.GetValueAsBool("moviedatabase", "useonlynfoscraper", false);
        _doNotUseDatabase = xmlreader.GetValueAsBool("moviedatabase", "donotusedatabase", false);

      }

      if (_currentFolder.Length > 0 && _currentFolder == _virtualStartDirectory)
      {
        VirtualDirectory vDir = new VirtualDirectory();
        vDir.LoadSettings("movies");
      }
    }
开发者ID:gayancc,项目名称:MediaPortal-1,代码行数:84,代码来源:GUIVideoFiles.cs

示例12: LoadSettings

    /// <summary>
    /// Load Settings
    /// </summary>
    private void LoadSettings()
    {
      using (Profile.Settings xmlreader = new Profile.MPSettings())
      {
        Log.Info("BASS: Loading Settings");
        string strAudioPlayer = xmlreader.GetValueAsString("audioplayer", "playerId", "0");
        _audioPlayer = (AudioPlayer)Enum.Parse(typeof (AudioPlayer), strAudioPlayer);
        _soundDevice = xmlreader.GetValueAsString("audioplayer", "sounddevice", "Default Sound Device");
        _soundDeviceID = xmlreader.GetValueAsString("audioplayer", "sounddeviceid", "");
        _streamVolume = xmlreader.GetValueAsInt("audioplayer", "streamOutputLevel", 85);
        _bufferingMs = xmlreader.GetValueAsInt("audioplayer", "buffering", 5000);

        if (_bufferingMs <= 0)
        {
          _bufferingMs = 1000;
        }
        else if (_bufferingMs > 8000)
        {
          _bufferingMs = 8000;
        }

        _crossFadeIntervalMs = xmlreader.GetValueAsInt("audioplayer", "crossfade", 4000);

        if (_crossFadeIntervalMs < 0)
        {
          _crossFadeIntervalMs = 0;
        }
        else if (_crossFadeIntervalMs > 16000)
        {
          _crossFadeIntervalMs = 16000;
        }

        _softStop = xmlreader.GetValueAsBool("audioplayer", "fadeOnStartStop", true);
        _useSkipSteps = xmlreader.GetValueAsBool("audioplayer", "useSkipSteps", false);
        _enableReplaygain = xmlreader.GetValueAsBool("audioplayer", "enableReplayGain", false);
        _enableAlbumReplaygain = xmlreader.GetValueAsBool("audioplayer", "enableAlbumReplayGain", false);

        _asioBalance = (float)xmlreader.GetValueAsInt("audioplayer", "asiobalance", 0) / 100.00f;
        _wasApiExclusiveMode = xmlreader.GetValueAsBool("audioplayer", "wasapiExclusive", false);
        _wasApiSpeakers = xmlreader.GetValueAsInt("audioplayer", "wasApiSpeakers", 1);

        bool doGaplessPlayback = xmlreader.GetValueAsBool("audioplayer", "gaplessPlayback", false);

        if (doGaplessPlayback)
        {
          _crossFadeIntervalMs = 200;
          _playBackType = PlayBackType.GAPLESS;
        }
        else
        {
          if (_crossFadeIntervalMs == 0)
          {
            _playBackType = PlayBackType.NORMAL;
            //_crossFadeIntervalMs = 100;
          }
          else
          {
            _playBackType = PlayBackType.CROSSFADE;
          }
        }

        _upMixMono = xmlreader.GetValueAsInt("audioplayer", "upMixMono", 0);
        _upMixStereo = xmlreader.GetValueAsInt("audioplayer", "upMixStereo", 0);
        _upMixQuadro = xmlreader.GetValueAsInt("audioplayer", "upMixQuadro", 0);
        _upMixFiveDotOne = xmlreader.GetValueAsInt("audioplayer", "upMixFiveDotOne", 0);
      }
    }
开发者ID:doskabouter,项目名称:MediaPortal-1,代码行数:70,代码来源:Config.cs

示例13: LoadSettings

 private static void LoadSettings()
 {
   try
   {
     using (Profile.Settings xmlreader = new Profile.MPSettings())
     {
       int configQuality = xmlreader.GetValueAsInt("thumbnails", "quality", 2);
       switch (configQuality)
       {
         case 0:
           Quality = ThumbQuality.fastest;
           SetEncoderParams(25);
           Log.Warn("Thumbs: MediaPortal is using the fastest thumbnail mode");
           break;
         case 1:
           Quality = ThumbQuality.fast;
           SetEncoderParams(33);
           Log.Info("Thumbs: MediaPortal is using fast thumbnails");
           break;
         case 2:
           Quality = ThumbQuality.average;
           SetEncoderParams(50);
           Log.Info("Thumbs: MediaPortal is using average thumbnails");
           break;
         case 3:
           Quality = ThumbQuality.higher;
           SetEncoderParams(77);
           Log.Info("Thumbs: MediaPortal is using high quality thumbnails");
           break;
         case 4:
           Quality = ThumbQuality.highest;
           SetEncoderParams(97);
           Log.Warn("Thumbs: MediaPortal is using very high quality thumbnail mode");
           break;
         case 5:
           Quality = ThumbQuality.uhd;
           SetEncoderParams(100);
           Log.Warn("Thumbs: MediaPortal is using UHD quality thumbnail mode");
           break;
       }
     }
   }
   catch (Exception ex)
   {
     Log.Error("Thumbs: Error loading thumbnail quality - {0}", ex.Message);
   }
 }
开发者ID:MediaPortal,项目名称:MediaPortal-1,代码行数:47,代码来源:Thumbs.cs

示例14: InitWindSpeedSelect

    private void InitWindSpeedSelect()
    {
      int unit;
      string currentWindUnit;
      using (Profile.Settings xmlreader = new Profile.MPSettings())
      {
        unit = xmlreader.GetValueAsInt("weather", "speed", 0);
      }

      switch (unit)
      {
        case 0:
          currentWindUnit = GUILocalizeStrings.Get(561); // km/h
          break;
        case 1:
          currentWindUnit = GUILocalizeStrings.Get(562); // mph
          break;
        case 2:
          currentWindUnit = GUILocalizeStrings.Get(564); // m/s
          break;
        case 3:
          currentWindUnit = GUILocalizeStrings.Get(563); // kn
          break;
        case 4:
          currentWindUnit = GUILocalizeStrings.Get(565); // bft
          break;
        default:
          currentWindUnit = GUILocalizeStrings.Get(565); // bft
          break;
      }

      ArrayList availableUnits = new ArrayList();
      availableUnits.Add(GUILocalizeStrings.Get(561)); // km/h
      availableUnits.Add(GUILocalizeStrings.Get(562)); // mph
      availableUnits.Add(GUILocalizeStrings.Get(563)); // kn
      availableUnits.Add(GUILocalizeStrings.Get(564)); // m/s
      availableUnits.Add(GUILocalizeStrings.Get(565)); // bft

      int index = 0;
      foreach (string au in availableUnits)
      {
        btnWindSpeedSelect.AddItem(au, index);
        if (au == currentWindUnit)
        {
          btnWindSpeedSelect.SelectedItem = index;
        }
        index++;
      }
    }
开发者ID:edterbak,项目名称:MediaPortal-1,代码行数:49,代码来源:GUISettingsWeather.cs

示例15: InitRefreshInterval

 private void InitRefreshInterval()
 {
   int refresh;
   using (Profile.Settings xmlreader = new Profile.MPSettings())
   {
     refresh = xmlreader.GetValueAsInt("weather", "refresh", 60);
   }
   btnRefreshInterval.AddItemRange(1, 60); // minutes
   btnRefreshInterval.SelectedItem = refresh;
 }
开发者ID:edterbak,项目名称:MediaPortal-1,代码行数:10,代码来源:GUISettingsWeather.cs


注:本文中的Profile.MPSettings.GetValueAsInt方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。