• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# Profile.MPSettings类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: SaveSettings

 private void SaveSettings()
 {
   using (Profile.Settings xmlreader = new Profile.MPSettings())
   {
     xmlreader.SetValueAsBool("musicfiles", "autoshuffle", m_bAutoShuffle);
   }
 }
开发者ID:npcomplete111,项目名称:MediaPortal-1,代码行数:7,代码来源:GUISettingsMusic.cs


示例2: LoadSettings

 private void LoadSettings()
 {
   using (Profile.Settings xmlreader = new Profile.MPSettings())
   {
     chkboxFixScrollbar.Checked = xmlreader.GetValueAsBool("home", "scrollfixed", false);
     chkBoxUseMyPlugins.Checked = xmlreader.GetValueAsBool("home", "usemyplugins", true);
     chkBoxAnimation.Checked = xmlreader.GetValueAsBool("home", "enableanimation", true);
     checkBoxShowSeconds.Checked = xmlreader.GetValueAsBool("home", "LongTimeFormat", false);
     string text = xmlreader.GetValueAsString("home", "dateformat", "<Day> <DD>.<Month>");
     cboxFormat.Items.Add(text);
     if (!text.Equals("<Day> <DD>.<Month>"))
     {
       cboxFormat.Items.Add("<Day> <DD>.<Month>");
     }
     if (!text.Equals("<Day> <DD> <Month>"))
     {
       cboxFormat.Items.Add("<Day> <DD> <Month>");
     }
     if (!text.Equals("<Day> <Month> <DD>"))
     {
       cboxFormat.Items.Add("<Day> <Month> <DD>");
     }
     cboxFormat.Text = text;
   }
 }
开发者ID:npcomplete111,项目名称:MediaPortal-1,代码行数:25,代码来源:GUIHomeSetupForm.cs


示例3: SaveSettings

 private void SaveSettings()
 {
   using (Profile.Settings xmlwriter = new Profile.MPSettings())
   {
     xmlwriter.SetValue("mpsettings", "pin", Util.Utils.EncryptPin(_pin));
   }
 }
开发者ID:edterbak,项目名称:MediaPortal-1,代码行数:7,代码来源:GUISettings.cs


示例4: LoadSettings

    private void LoadSettings()
    {
      using (Profile.Settings xmlreader = new Profile.MPSettings())
      {
        // Resume settings
        _cmTurnoffmonitor.Selected = xmlreader.GetValueAsBool("general", "turnoffmonitor", false);
        _cmShowlastactivemodule.Selected = xmlreader.GetValueAsBool("general", "showlastactivemodule", false);
        _cmStopOnAudioRemoval.Selected = xmlreader.GetValueAsBool("general", "stoponaudioremoval", false);
        _screennumber = xmlreader.GetValueAsInt("screenselector", "screennumber", 0);

        // Delay startup
        _iStartUpDelay = xmlreader.GetValueAsInt("general", "delay", 0);
        string property = _iStartUpDelay + " sec";
        GUIPropertyManager.SetProperty("#delayStartup", property);

        if (_iStartUpDelay == 0)
        {
          _cmDelayStartup.IsEnabled = false;
          _cmDelayResume.IsEnabled = false;
        }
        else
        {
          _cmDelayStartup.IsEnabled = true;
          _cmDelayResume.IsEnabled = true;
        }
        _cmDelayStartup.Selected = xmlreader.GetValueAsBool("general", "delay startup", false);
        _cmDelayResume.Selected = xmlreader.GetValueAsBool("general", "delay resume", false);

        GetScreens();
        GUIPropertyManager.SetProperty("#defScreen", _screenCollection[_screennumber].ToString());
      }
    }
开发者ID:cmendozac,项目名称:MediaPortal-1,代码行数:32,代码来源:GUISettingsGeneral_Resume.cs


示例5: Init

    public override bool Init()
    {
      using (Profile.Settings xmlreader = new Profile.MPSettings())
      {
        _playlistFolder = xmlreader.GetValueAsString("music", "playlists", string.Empty);
        _savePlaylistOnExit = xmlreader.GetValueAsBool("musicfiles", "savePlaylistOnExit", false);
        _resumePlaylistOnEnter = xmlreader.GetValueAsBool("musicfiles", "resumePlaylistOnMusicEnter", false);
        playlistPlayer.RepeatPlaylist = xmlreader.GetValueAsBool("musicfiles", "repeat", true);
      }

      if (_resumePlaylistOnEnter)
      {
        Log.Info("GUIMusicPlaylist: Loading default playlist {0}", _defaultPlaylist);
        bw = new BackgroundWorker();
        bw.WorkerSupportsCancellation = true;
        bw.WorkerReportsProgress = false;
        bw.DoWork += new DoWorkEventHandler(bw_DoWork);
        bw.RunWorkerCompleted += new RunWorkerCompletedEventHandler(bw_RunWorkerCompleted);
        bw.RunWorkerAsync();
      }
      else
      {
        defaultPlaylistLoaded = true;
      }

      GUIWindowManager.Receivers += new SendMessageHandler(this.OnThreadMessage);
      GUIWindowManager.OnNewAction += new OnActionHandler(this.OnNewAction);
      playlistPlayer.PlaylistChanged += playlistPlayer_Changed; 
      return Load(GUIGraphicsContext.GetThemedSkinFile(@"\myMusicplaylist.xml"));
    }
开发者ID:Eddie-Jee,项目名称:MediaPortal-1,代码行数:30,代码来源:GUIMusicPlaylist.cs


示例6: LoadSettings

 private void LoadSettings()
 {
   using (Profile.Settings xmlreader = new Profile.MPSettings())
   {
     m_bAutoShuffle = xmlreader.GetValueAsBool("musicfiles", "autoshuffle", true);
   }
 }
开发者ID:npcomplete111,项目名称:MediaPortal-1,代码行数:7,代码来源:GUISettingsMusic.cs


示例7: SaveSettings

 private void SaveSettings()
 {
   using (Profile.Settings xmlwriter = new Profile.MPSettings())
   {
     xmlwriter.SetValueAsBool("musicmisc", "lookupSimilarTracks", !btnDisableSimilarTrackLookup.Selected);
     xmlwriter.SetValue("musicmisc", "vumeter", _vuMeter.ToLowerInvariant());
   }
 }
开发者ID:arangas,项目名称:MediaPortal-1,代码行数:8,代码来源:GUISettingsMusic_NowPlaying.cs


示例8: SaveSettings

    private void SaveSettings()
    {
      using (Profile.Settings xmlwriter = new Profile.MPSettings())
      {
        xmlwriter.SetValueAsBool("general", "startfullscreen", _cmStartfullscreen.Selected);
        xmlwriter.SetValueAsBool("general", "usefullscreensplash", _cmUsefullscreensplash.Selected);
        xmlwriter.SetValueAsBool("general", "keepstartfullscreen", _cmkeepstartfullscreen.Selected);
        xmlwriter.SetValueAsBool("general", "alwaysontop", _cmAlwaysontop.Selected);
        try
        {
          if (_cmAlwaysontop.Selected) // always on top
          {
            using (RegistryKey subkey = Registry.CurrentUser.OpenSubKey(@"Control Panel\Desktop", true))
            {
              if (subkey != null) subkey.SetValue("ForegroundLockTimeout", 0);
            }
          }
        }
        // ReSharper disable EmptyGeneralCatchClause
        catch (Exception) { }
        // ReSharper restore EmptyGeneralCatchClause

        xmlwriter.SetValueAsBool("general", "hidetaskbar", _cmHidetaskbar.Selected);
        xmlwriter.SetValueAsBool("general", "autostart", _cmAutostart.Selected);
        try
        {
          if (_cmAutostart.Selected) // autostart on boot
          {
        Log.Debug("AUTOSTART");
            string fileName = Config.GetFile(Config.Dir.Base, "MediaPortal.exe");
            using (RegistryKey subkey = Registry.CurrentUser.OpenSubKey(@"Software\Microsoft\Windows\CurrentVersion\Run", true))
            {
              if (subkey != null)
              {
                subkey.SetValue("MediaPortal", fileName);
              }
            }
          }
          else
          {
            using (RegistryKey subkey = Registry.CurrentUser.OpenSubKey(@"Software\Microsoft\Windows\CurrentVersion\Run", true))
            {
              if (subkey != null)
              {
                subkey.DeleteValue("MediaPortal", false);
              }
            }
          }
        }
        // ReSharper disable EmptyGeneralCatchClause
        catch (Exception) { }
        // ReSharper restore EmptyGeneralCatchClause

        xmlwriter.SetValueAsBool("general", "minimizeonstartup", _cmMinimizeonstartup.Selected);
        xmlwriter.SetValueAsBool("general", "minimizeonexit", _cmMinimizeonexit.Selected);
        xmlwriter.SetValueAsBool("general", "minimizeonfocusloss", _cmMinimizeonfocusloss.Selected);
      }
    }
开发者ID:cmendozac,项目名称:MediaPortal-1,代码行数:58,代码来源:GUISettingsGeneral_Startup.cs


示例9: LoadSettings

 private void LoadSettings()
 {
   using (Profile.Settings xmlreader = new Profile.MPSettings())
   {
     btnDisableSimilarTrackLookup.Selected = !xmlreader.GetValueAsBool("musicmisc", "lookupSimilarTracks", true);
     _vuMeter= xmlreader.GetValueAsString("musicmisc", "vumeter", "none");
     _vuMeter = UppercaseFirst(_vuMeter);
   }
 }
开发者ID:arangas,项目名称:MediaPortal-1,代码行数:9,代码来源:GUISettingsMusic_NowPlaying.cs


示例10: 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


示例11: LoadSettings

 protected virtual void LoadSettings()
 {
   using (Profile.Settings xmlreader = new Profile.MPSettings())
   {
     _fixedScroll = xmlreader.GetValueAsBool("home", "scrollfixed", true); // fix scrollbar in the middle of menu
     _useMyPlugins = xmlreader.GetValueAsBool("home", "usemyplugins", true); // use previous menu handling
     _enableAnimation = xmlreader.GetValueAsBool("home", "enableanimation", true);
   }
 }
开发者ID:npcomplete111,项目名称:MediaPortal-1,代码行数:9,代码来源:GUIHomeBaseWindow.cs


示例12: SaveSettings

 private void SaveSettings()
 {
   using (Profile.Settings xmlwriter = new Profile.MPSettings())
   {
     xmlwriter.SetValue("gui", "ScrollSpeedRight", m_iSpeedHorizontal.ToString());
     xmlwriter.SetValue("gui", "ScrollSpeedDown", m_iSpeedVertical.ToString());
     xmlwriter.SetValue("screen", "GuiRenderFps", GUIGraphicsContext.MaxFPS);
     xmlwriter.SetValue("gui", "listLoopDelay", m_iListLoopDelay.ToString());
   }
 }
开发者ID:edterbak,项目名称:MediaPortal-1,代码行数:10,代码来源:GUISettingsGUI_ScrollSpeed.cs


示例13: LoadSettings

    public void LoadSettings(string section)
    {
      Clear();
      using (Profile.Settings xmlreader = new Profile.MPSettings())
      {
        string strDefault = xmlreader.GetValueAsString(section, "default", string.Empty);
        for (int i = 0; i < MaximumShares; 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(section, strShareName, string.Empty);
          share.Path = xmlreader.GetValueAsString(section, strSharePath, string.Empty);
          string pinCode = Utils.DecryptPin(xmlreader.GetValueAsString(section, strPincode, string.Empty));
          if (pinCode != string.Empty)
            share.Pincode = Convert.ToInt32(pinCode);
          else
            share.Pincode = -1;

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

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


示例14: SaveSettings

 private void SaveSettings()
 {
   using (Profile.Settings xmlWriter = new Profile.MPSettings())
   {
     xmlWriter.SetValueAsBool("home", "scrollfixed", chkboxFixScrollbar.Checked);
     xmlWriter.SetValueAsBool("home", "usemyplugins", chkBoxUseMyPlugins.Checked);
     xmlWriter.SetValueAsBool("home", "enableanimation", chkBoxAnimation.Checked);
     xmlWriter.SetValueAsBool("home", "LongTimeFormat", checkBoxShowSeconds.Checked);
     xmlWriter.SetValue("home", "dateformat", cboxFormat.Text);
   }
   SaveMenuSorting();
 }
开发者ID:npcomplete111,项目名称:MediaPortal-1,代码行数:12,代码来源:GUIHomeSetupForm.cs


示例15: SaveSettings

    private void SaveSettings()
    {
      using (Profile.Settings xmlwriter = new Profile.MPSettings())
      {
        xmlwriter.SetValueAsBool("movies", "markwatched", btnMarkWatched.Selected);
        xmlwriter.SetValueAsBool("movies", "keepfolderstogether", btnKeepFoldersTogether.Selected);
        xmlwriter.SetValueAsBool("comskip", "automaticskip", btnCommercialSkip.Selected);

        xmlwriter.SetValue("movies", "playedpercentagewatched", _watchedPercentage);
        xmlwriter.SetValue("FFDShow", "audiodelayInterval", _videoAudioDelay);
      }
    }
开发者ID:hkjensen,项目名称:MediaPortal-1,代码行数:12,代码来源:GUISettingsMyVideos_OtherSettings.cs


示例16: 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


示例17: SaveSettings

    private void SaveSettings()
    {
      using (Profile.Settings xmlwriter = new Profile.MPSettings())
      {
        xmlwriter.SetValueAsBool("musicmisc", "fetchlastfmcovers", !btnFetchlastfmcovers.Selected);
        xmlwriter.SetValueAsBool("musicmisc", "fetchlastfmtopalbums", !btnFetchlastfmtopalbums.Selected);
        xmlwriter.SetValueAsBool("musicmisc", "fetchlastfmtracktags", !btnFetchlastfmtracktags.Selected);
        xmlwriter.SetValueAsBool("musicmisc", "switchArtistOnLastFMSubmit", btnSwitchArtistOnLastFMSubmit.Selected);

        xmlwriter.SetValue("musicmisc", "vumeter", _vuMeter.ToLowerInvariant());
      }
    }
开发者ID:nio22,项目名称:MediaPortal-1,代码行数:12,代码来源:GUISettingsMusic_NowPlaying.cs


示例18: SaveSettings

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


示例19: LoadSettings

    private void LoadSettings()
    {
      using (Profile.Settings xmlreader = new Profile.MPSettings())
      {
        _pin = Util.Utils.DecryptPin(xmlreader.GetValueAsString("mpsettings", "pin", string.Empty));

        if (_pin != string.Empty)
        {
          btnLocked.Selected = true;
        }
      }
      
    }
开发者ID:edterbak,项目名称:MediaPortal-1,代码行数:13,代码来源:GUISettings.cs


示例20: 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



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# ProfileAuthenticationOption类代码示例发布时间:2022-05-24
下一篇:
C# Profile类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap