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


C# MPSettings.SetValueAsBool方法代码示例

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


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

示例1: SaveSettings

 private void SaveSettings()
 {
   using (Settings xmlreader = new MPSettings())
   {
     xmlreader.SetValueAsBool("myradio", "showallchannelsgroup", _showAllChannelsGroup);
     xmlreader.SetValueAsBool("myradio", "rememberlastgroup", _rememberLastGroup);
     xmlreader.SetValue("myradio", "rootgroup", _rootGroup);
     xmlreader.SetValueAsBool ("myradio", "autoturnonradio",_autoTurnOnRadio);
   }
 }
开发者ID:npcomplete111,项目名称:MediaPortal-1,代码行数:10,代码来源:RadioSetupForm.cs

示例2: SaveSettings

    public override void SaveSettings()
    {
      using (Settings xmlwriter = new MPSettings())
      {
        xmlwriter.SetValue("general", "loglevel", cbDebug.SelectedIndex);
        xmlwriter.SetValue("general", "ThreadPriority", mpThreadPriority.SelectedItem.ToString());

        xmlwriter.SetValueAsBool("general", "watchdogEnabled", checkBoxEnableWatchdog.Checked);
        xmlwriter.SetValueAsBool("general", "restartOnError", checkBoxAutoRestart.Checked);
        xmlwriter.SetValue("general", "restart delay", numericUpDownDelay.Value);
      }
    }
开发者ID:arangas,项目名称:MediaPortal-1,代码行数:12,代码来源:General.cs

示例3: SaveSettings

 private void SaveSettings()
 {
   using (var xmlwriter = new MPSettings())
   {
     xmlwriter.SetValueAsBool("lastfm:test", "autoDJ", chkAutoDJ.Checked);
     xmlwriter.SetValueAsBool("lastfm:test", "allowDiffVersions", chkDiferentVersions.Checked);
     xmlwriter.SetValueAsBool("lastfm:test", "avoidDuplicates", chkAvoidDuplicates.Checked);
     xmlwriter.SetValue("lastfm:test", "randomness", numRandomness.Value);
     xmlwriter.SetValueAsBool("lastfm:test", "announce", chkAnnounce.Checked);
     xmlwriter.SetValueAsBool("lastfm:test", "scrobble", chkScrobble.Checked);
   }      
 }
开发者ID:arangas,项目名称:MediaPortal-1,代码行数:12,代码来源:LastFMConfig.cs

示例4: SaveSettings

 public void SaveSettings()
 {
   using (Settings writer = new MPSettings())
   {
     writer.SetValueAsBool("psclientplugin", "homeonly", homeOnlyCheckBox.Checked);
     writer.SetValueAsBool("psclientplugin", "extensivelogging", extLogCheckBox.Checked);
     writer.SetValue("psclientplugin", "shutdownmode", shutModeComboBox.SelectedIndex.ToString());
     writer.SetValueAsBool("psclientplugin", "forceshutdown", forceCheckBox.Checked);
     writer.SetValueAsBool("psclientplugin", "shutdownenabled", enableShutdownCheckBox.Checked);
     writer.SetValue("psclientplugin", "idletimeout", idleNumericUpDown.Value);
   }
 }
开发者ID:arangas,项目名称:MediaPortal-1,代码行数:12,代码来源:PowerSchedulerClientSetup.cs

示例5: SaveSettings

    private void SaveSettings()
    {
      using (Settings xmlreader = new MPSettings())
      {
        xmlreader.SetValue("tvservice", "hostname", _serverHostName);
        xmlreader.SetValue("tvservice", "preferredlanguages", _preferredLanguages);
        xmlreader.SetValueAsBool("tvservice", "preferac3", _preferAC3);

        xmlreader.SetValueAsBool("tvservice", "rebuildgraphOnNewAudioSpecs", _rebuildGraphOnNewAudioSpecs);
        xmlreader.SetValueAsBool("tvservice", "rebuildgraphOnNewVideoSpecs", _rebuildGraphOnNewVideoSpecs);
        xmlreader.SetValueAsBool("tvservice", "avoidSeeking", _avoidSeeking);
      }
    }
开发者ID:arangas,项目名称:MediaPortal-1,代码行数:13,代码来源:TvSetupForm.cs

示例6: DoModal

    public override void DoModal(int dwParentId)
    {
      int nagCount;
      using (Settings xmlreader = new MPSettings())
      {
        nagCount = xmlreader.GetValueAsInt("general", "skinobsoletecount", 0);
      }

      //if (chkIgnore != null)
      //{
        chkIgnore.Visible = nagCount > 4;
      //}
      
      GUIPropertyManager.SetProperty("#userskin", _userSkin);
      _timeLeft = 0;
      timeStart = DateTime.Now;
      UpdateCountDown(0);
      base.DoModal(dwParentId);
      GUIPropertyManager.SetProperty("#userskin", "");
      GUIPropertyManager.SetProperty("#countdownseconds", "");

      if (RevertToUserSkin)
      {
        nagCount++; 
      }

      using (Settings xmlwriter = new MPSettings())
      {
        xmlwriter.SetValueAsBool("general", "dontshowskinversion", chkIgnore.Selected);
        xmlwriter.SetValue("general", "skinobsoletecount", nagCount);
      }
    }
开发者ID:realsilver,项目名称:MediaPortal-1,代码行数:32,代码来源:GUIDialogOldSkin.cs

示例7: SaveSettings

 private void SaveSettings()
 {
   using (Settings xmlwriter = new MPSettings())
   {
     xmlwriter.SetValueAsBool("filemenu", "enabled", btnFileMenu.Selected);
     xmlwriter.SetValue("filemenu", "pincode", Utils.EncryptPassword(_pin));
   }
 }
开发者ID:hkjensen,项目名称:MediaPortal-1,代码行数:8,代码来源:GUISettingsGUI.cs

示例8: SaveSettings

 public override void SaveSettings()
 {
   using (Settings xmlwriter = new MPSettings())
   {
     xmlwriter.SetValueAsBool("filemenu", "enabled", chbEnabled.Checked);
     xmlwriter.SetValue("filemenu", "pincode", Util.Utils.EncryptPassword(textPinCodeBox.Text));
     xmlwriter.SetValue("filemenu", "trashcan", textTrashcanFolder.Text);
   }
 }
开发者ID:arangas,项目名称:MediaPortal-1,代码行数:9,代码来源:GuiFileMenu.cs

示例9: SaveSettings

 private void SaveSettings()
 {
   using (Settings xmlwriter = new MPSettings())
   {
     xmlwriter.SetValue("gui", "language", _btnLanguage.Label);
     xmlwriter.SetValue("skin", "name", _btnSkin.Label);
     xmlwriter.SetValueAsBool("gui", "myprefix", _btnLanguagePrefix.Selected);
   }
   Config.SkinName = _btnSkin.Label;
 }
开发者ID:arangas,项目名称:MediaPortal-1,代码行数:10,代码来源:GUISettingsGUI_Skin.cs

示例10: SaveSettings

    /// <summary>
    /// 
    /// </summary>
    public override void SaveSettings()
    {
      using (Settings xmlwriter = new MPSettings())
      {
        xmlwriter.SetValueAsBool("dvdplayer", "pixelratiocorrection", pixelRatioCheckBox.Checked);
        xmlwriter.SetValue("dvdplayer", "armode", aspectRatioComboBox.Text);
        xmlwriter.SetValue("dvdplayer", "displaymode", displayModeComboBox.Text);

        xmlwriter.SetValue("dvdplayer", "defaultar", defaultZoomModeComboBox.SelectedItem);
      }
    }
开发者ID:arangas,项目名称:MediaPortal-1,代码行数:14,代码来源:DVDZoom.cs

示例11: SaveSettings

    /// <summary>
    /// 
    /// </summary>
    public override void SaveSettings()
    {
      using (Settings xmlwriter = new MPSettings())
      {
        xmlwriter.SetValue("dvdplayer", "path", fileNameTextBox.Text);
        xmlwriter.SetValue("dvdplayer", "arguments", parametersTextBox.Text);

        xmlwriter.SetValueAsBool("dvdplayer", "internal", !internalPlayerCheckBox.Checked);
        xmlwriter.SetValueAsBool("dvdplayer", "mediainfoused", useMediaInfo.Checked);
      }
    }
开发者ID:arangas,项目名称:MediaPortal-1,代码行数:14,代码来源:DVDPlayer.cs

示例12: SaveSettings

 public override void SaveSettings()
 {
   if (_init == false) return;
   using (Settings xmlwriter = new MPSettings())
   {
     xmlwriter.SetValueAsBool("general", "nonsquare", checkboxMpNonsquare.Checked);
     xmlwriter.SetValueAsBool("general", "exclusivemode", checkboxDXEclusive.Checked);
     xmlwriter.SetValue("general", "dx9filteringmode", mpVMR9FilterMethod.Text);
     xmlwriter.SetValueAsBool("general", "usevrm9forwebstreams", checkBoxVMRWebStreams.Checked);
     xmlwriter.SetValueAsBool("general", "dx9decimatemask", checkBoxDecimateMask.Checked);
     xmlwriter.SetValueAsBool("general", "useEVRenderer", radioButtonEVR.Checked);
   }
 }
开发者ID:arangas,项目名称:MediaPortal-1,代码行数:13,代码来源:FiltersVideoRendererConfig.cs

示例13: btnContinue_Click

    private void btnContinue_Click(object sender, EventArgs e)
    {
      if (checkBoxConfirmed.Checked)
      {
        this.DialogResult = DialogResult.OK;
      }

      using (Settings xmlwriter = new MPSettings())
      {
        xmlwriter.SetValueAsBool("general", "AdvancedConfigMode", radioButtonAdvanced.Checked);
      }

      this.Close();
    }
开发者ID:arangas,项目名称:MediaPortal-1,代码行数:14,代码来源:DlgConfigModeHint.cs

示例14: SaveSettings

 private void SaveSettings()
 {
   // Don't save setting if skin value was not set
   if (_btnSkin != null && _btnSkin.Label != "Skin:")
   {
     using (Settings xmlwriter = new MPSettings())
     {
       xmlwriter.SetValue("gui", "language", _btnLanguage.Label);
       xmlwriter.SetValue("skin", "name", _btnSkin.Label);
       xmlwriter.SetValueAsBool("gui", "myprefix", _btnLanguagePrefix.Selected);
     }
     Config.SkinName = _btnSkin.Label;
   }
 }
开发者ID:MediaPortal,项目名称:MediaPortal-1,代码行数:14,代码来源:GUISettingsGUI_Skin.cs

示例15: SaveSettings

    public override void SaveSettings()
    {
      using (Settings xmlwriter = new MPSettings())
      {
        string prefLangs = "";
        xmlwriter.SetValue("tvservice", "hostname", mpTextBoxHostname.Text);
        xmlwriter.SetValueAsBool("tvservice", "preferac3", mpCheckBoxPrefAC3.Checked);
        xmlwriter.SetValueAsBool("tvservice", "preferAudioTypeOverLang", mpCheckBoxPrefAudioOverLang.Checked);

        xmlwriter.SetValueAsBool("tvservice", "dvbbitmapsubtitles", mpCheckBoxEnableDVBSub.Checked);
        xmlwriter.SetValueAsBool("tvservice", "dvbttxtsubtitles", mpCheckBoxEnableTTXTSub.Checked);
        xmlwriter.SetValueAsBool("tvservice", "ccsubtitles", mpCheckBoxEnableCCSub.Checked);
        xmlwriter.SetValueAsBool("tvservice", "autoshowsubwhentvstarts", mpCheckBoxAutoShowSubWhenTvStarts.Checked);
        xmlwriter.SetValueAsBool("tvservice", "audiodualmono", enableAudioDualMonoModes.Checked);
        xmlwriter.SetValueAsBool("mytv", "hideAllChannelsGroup", cbHideAllChannels.Checked);
        xmlwriter.SetValueAsBool("myradio", "hideAllChannelsGroup", cbHideAllChannels.Checked);
        //currently we use the same checkbox for radio but different settings in config file
        xmlwriter.SetValueAsBool("mytv", "showChannelStateIcons", cbShowChannelStateIcons.Checked);
        xmlwriter.SetValueAsBool("mytv", "continuousScrollGuide", cbContinuousScrollGuide.Checked);
        xmlwriter.SetValueAsBool("mytv", "relaxTsReader", cbRelaxTsReader.Checked);

        xmlwriter.SetValueAsBool("tvservice", "isWakeOnLanEnabled", mpCheckBoxIsWakeOnLanEnabled.Checked);
        xmlwriter.SetValue("tvservice", "WOLTimeOut", mpNumericTextBoxWOLTimeOut.Text);
        xmlwriter.SetValueAsBool("tvservice", "isAutoMacAddressEnabled", mpCheckBoxIsAutoMacAddressEnabled.Checked);
        xmlwriter.SetValue("tvservice", "macAddress", mpTextBoxMacAddress.Text);

        xmlwriter.SetValueAsBool("mytv", "enableRecNotifier", chkRecnotifications.Checked);
        xmlwriter.SetValue("mytv", "notifyTVBefore", txtNotifyBefore.Text);
        xmlwriter.SetValue("mytv", "notifyTVTimeout", txtNotifyAfter.Text);
        xmlwriter.SetValueAsBool("mytv", "notifybeep", checkBoxNotifyPlaySound.Checked);
        xmlwriter.SetValue("mytv", "showEpisodeInfo", comboboxShowEpisodeInfo.SelectedIndex);

        foreach (ListViewItem item in mpListViewPreferredAudioLang.Items)
        {
          prefLangs += (string)item.Name + ";";
        }
        xmlwriter.SetValue("tvservice", "preferredaudiolanguages", prefLangs);

        prefLangs = "";
        foreach (ListViewItem item in mpListViewPreferredSubLang.Items)
        {
          prefLangs += (string)item.Name + ";";
        }
        xmlwriter.SetValue("tvservice", "preferredsublanguages", prefLangs);

        //When TvServer is changed, if user changed mode (SingleSeat/MultiSeat), he needs to review the RTSP setting in DebugOptions section
        if ((xmlwriter.GetValueAsBool("tvservice", "DebugOptions", false) || SettingsForm.debug_options) &&
            (_SingleSeat != Network.IsSingleSeat()))
        {
          MessageBox.Show("Please review your RTSP settings in \"DebugOptions\" section", "Warning",
                          MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
        }

      }
    }
开发者ID:nio22,项目名称:MediaPortal-1,代码行数:55,代码来源:TVClient.cs


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