本文整理汇总了C#中Profile.MPSettings.SetValue方法的典型用法代码示例。如果您正苦于以下问题:C# Profile.MPSettings.SetValue方法的具体用法?C# Profile.MPSettings.SetValue怎么用?C# Profile.MPSettings.SetValue使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Profile.MPSettings
的用法示例。
在下文中一共展示了Profile.MPSettings.SetValue方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: 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());
}
}
示例2: 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);
}
}
示例3: 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);
}
}
示例4: SaveSettings
private void SaveSettings()
{
using (Profile.Settings xmlwriter = new Profile.MPSettings())
{
xmlwriter.SetValue("mpsettings", "pin", Util.Utils.EncryptPin(_pin));
}
}
示例5: SaveSettings
private void SaveSettings()
{
using (Profile.Settings xmlwriter = new Profile.MPSettings())
{
xmlwriter.SetValueAsBool("musicmisc", "lookupSimilarTracks", !btnDisableSimilarTrackLookup.Selected);
xmlwriter.SetValue("musicmisc", "vumeter", _vuMeter.ToLowerInvariant());
}
}
示例6: 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());
}
}
示例7: 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();
}
示例8: OnShowScreens
private void OnShowScreens()
{
// Refresh screen
GetScreens();
var dlg = (GUIDialogMenu)GUIWindowManager.GetWindow((int)Window.WINDOW_DIALOG_MENU);
if (dlg == null)
{
return;
}
dlg.Reset();
dlg.SetHeading(496); // Options
foreach (Tuple<string, string, string> screen in _screenCollection)
{
dlg.Add(screen.Item1);
}
if (_screennumber < _screenCollection.Count)
{
dlg.SelectedLabel = _screennumber;
}
// Show dialog menu
dlg.DoModal(GetID);
if (dlg.SelectedLabel == -1)
{
return;
}
// Check if screen are present and if not force to use primary screen
if (dlg.SelectedLabel == -1)
{
dlg.SelectedLabel = 0;
}
using (Profile.Settings xmlwriter = new Profile.MPSettings())
{
xmlwriter.SetValue("screenselector", "screennumber", dlg.SelectedLabel);
xmlwriter.SetValue("screenselector", "screendeviceid", _screenCollection[dlg.SelectedLabel].Item2);
xmlwriter.SetValue("screenselector", "screendisplayname", _screenCollection[dlg.SelectedLabel].Item3);
SettingsChanged(true);
}
GUIPropertyManager.SetProperty("#defScreen", _screenCollection[dlg.SelectedLabel].Item1);
}
示例9: SaveSettings
private void SaveSettings()
{
using (Profile.Settings xmlwriter = new Profile.MPSettings())
{
xmlwriter.SetValue("pictures", "speed", m_iSpeed.ToString());
xmlwriter.SetValue("pictures", "transition", m_iTransistion.ToString());
xmlwriter.SetValue("pictures", "kenburnsspeed", m_iKenBurnsSpeed.ToString());
xmlwriter.SetValueAsBool("pictures", "kenburns", m_bKenBurns);
xmlwriter.SetValueAsBool("pictures", "random", m_bRandom);
xmlwriter.SetValueAsBool("pictures", "autoRepeat", cmLoopSlideShows.Selected);
xmlwriter.SetValueAsBool("pictures", "autoShuffle", cmShuffleSlideShows.Selected);
xmlwriter.SetValueAsBool("pictures", "useExif", cmExifSlideShows.Selected);
xmlwriter.SetValueAsBool("pictures", "usePicasa", cmPicasaSlideShows.Selected);
xmlwriter.SetValueAsBool("pictures", "useDayGrouping", cmGroupByDaySlideShows.Selected);
xmlwriter.SetValueAsBool("pictures", "enableVideoPlayback", cmEnablePlaySlideShows.Selected);
xmlwriter.SetValueAsBool("pictures", "playVideosInSlideshows", cmPlayInSlideShows.Selected);
}
}
示例10: SetRefreshInterval
private void SetRefreshInterval()
{
using (Profile.Settings xmlwriter = new Profile.MPSettings())
{
xmlwriter.SetValue("weather", "refresh", btnRefreshInterval.SelectedItemValue);
}
}
示例11: SetWindSpeedSelect
private void SetWindSpeedSelect()
{
int newWindUnit = 0;
if (btnWindSpeedSelect.SelectedItemLabel == GUILocalizeStrings.Get(561))
{
newWindUnit = 0; // km/h
}
else if (btnWindSpeedSelect.SelectedItemLabel == GUILocalizeStrings.Get(562))
{
newWindUnit = 1; // mph
}
else if (btnWindSpeedSelect.SelectedItemLabel == GUILocalizeStrings.Get(564))
{
newWindUnit = 2; // m/s
}
else if (btnWindSpeedSelect.SelectedItemLabel == GUILocalizeStrings.Get(563))
{
newWindUnit = 3; // kn
}
else if (btnWindSpeedSelect.SelectedItemLabel == GUILocalizeStrings.Get(565))
{
newWindUnit = 4; // bft
}
using (Profile.Settings xmlwriter = new Profile.MPSettings())
{
xmlwriter.SetValue("weather", "speed", newWindUnit);
}
}
示例12: OnStartUpDelay
private void OnStartUpDelay()
{
string seconds = _iStartUpDelay.ToString(CultureInfo.InvariantCulture);
GetNumberFromKeyboard(ref seconds);
_iStartUpDelay = Convert.ToInt32(seconds);
string property = _iStartUpDelay + " " + GUILocalizeStrings.Get(2999); // sec
GUIPropertyManager.SetProperty("#delayStartup", property);
if (_iStartUpDelay == 0)
{
_cmDelayStartup.IsEnabled = false;
_cmDelayResume.IsEnabled = false;
}
else
{
_cmDelayStartup.IsEnabled = true;
_cmDelayResume.IsEnabled = true;
}
using (Profile.Settings xmlwriter = new Profile.MPSettings())
{
xmlwriter.SetValue("general", "delay", _iStartUpDelay);
SettingsChanged(true);
}
}
示例13: SetInitialDefaultShares
public static void SetInitialDefaultShares(bool addOptical, bool addMusic, bool addPictures, bool addVideos)
{
ArrayList sharesVideos = new ArrayList();
ArrayList sharesMusic = new ArrayList();
ArrayList sharesPhotos = new ArrayList();
// add optical drive letters
if (addOptical)
{
string[] drives = Environment.GetLogicalDrives();
foreach (string drive in drives)
{
int driveType = Utils.getDriveType(drive);
if (driveType == (int)DriveType.CDRom)
{
string driveName = String.Format("({0}:) CD/DVD", drive.Substring(0, 1).ToUpperInvariant());
Share share = new Share(driveName, drive, string.Empty);
sharesMusic.Add(share);
sharesPhotos.Add(share);
sharesVideos.Add(share);
}
}
}
// add user profile dirs
string MusicProfilePath = Win32API.GetFolderPath(Win32API.CSIDL_MYMUSIC);
if (addMusic)
{
Share MusicShare = new Share(GetShareNameDefault(MusicProfilePath), MusicProfilePath, string.Empty);
sharesMusic.Add(MusicShare);
}
string PicturesProfilePath = Win32API.GetFolderPath(Win32API.CSIDL_MYPICTURES);
if (addPictures)
{
Share PicShare = new Share(GetShareNameDefault(PicturesProfilePath), PicturesProfilePath, string.Empty);
sharesPhotos.Add(PicShare);
}
string VideoProfilePath = Win32API.GetFolderPath(Win32API.CSIDL_MYVIDEO);
if (addVideos)
{
Share VidShare = new Share(GetShareNameDefault(VideoProfilePath), VideoProfilePath, string.Empty);
sharesVideos.Add(VidShare);
}
using (Profile.Settings xmlwriter = new Profile.MPSettings())
{
if (addMusic)
{
xmlwriter.SetValue("music", "default", MusicProfilePath);
SaveShare(sharesMusic, "music");
}
if (addPictures)
{
xmlwriter.SetValue("pictures", "default", PicturesProfilePath);
SaveShare(sharesPhotos, "pictures");
}
if (addVideos)
{
xmlwriter.SetValue("movies", "default", VideoProfilePath);
SaveShare(sharesVideos, "movies");
}
}
}
示例14: LoadFolderSettings
private void LoadFolderSettings(string folderName)
{
if (folderName == string.Empty)
{
folderName = "root";
}
object o;
FolderSettings.GetFolderSetting(folderName, "VideoFiles", typeof(MapSettings), out o);
if (o != null)
{
_mapSettings = o as MapSettings;
if (_mapSettings == null)
{
_mapSettings = new MapSettings();
}
CurrentSortAsc = _mapSettings.SortAscending;
CurrentSortMethod = (VideoSort.SortMethod)_mapSettings.SortBy;
currentLayout = (Layout)_mapSettings.ViewAs;
}
else
{
Share share = _virtualDirectory.GetShare(folderName);
if (share != null)
{
if (_mapSettings == null)
{
_mapSettings = new MapSettings();
}
CurrentSortAsc = _mapSettings.SortAscending;
CurrentSortMethod = (VideoSort.SortMethod)_mapSettings.SortBy;
currentLayout = (Layout)share.DefaultLayout;
CurrentLayout = (Layout)share.DefaultLayout;
}
}
using (Profile.Settings xmlreader = new Profile.MPSettings())
{
if (xmlreader.GetValueAsBool("movies", "rememberlastfolder", false))
{
xmlreader.SetValue("movies", "lastfolder", folderName);
}
}
SwitchLayout();
UpdateButtonStates();
}
示例15: SaveSettings
protected override void SaveSettings()
{
base.SaveSettings();
using (Profile.Settings xmlwriter = new Profile.MPSettings())
{
xmlwriter.SetValue(SerializeName, "sortmethod", (int)currentSortMethod);
xmlwriter.SetValue(SerializeName, "sortmethodroot", (int)currentSortMethodRoot);
}
}