private static bool IsPluginEnabled(string name) { using (MediaPortal.Profile.Settings xmlreader = new MediaPortal.Profile.MPSettings()) { return xmlreader.GetValueAsBool("plugins", name, false); } }
static DaemonTools() { using (MediaPortal.Profile.Settings xmlreader = new MediaPortal.Profile.MPSettings()) { _Enabled = xmlreader.GetValueAsBool("daemon", "enabled", false); _Path = xmlreader.GetValueAsString("daemon", "path", ""); _Drive = xmlreader.GetValueAsString("daemon", "drive", "E:"); _DriveNo = xmlreader.GetValueAsInt("daemon", "driveNo", 0); _DriveType = xmlreader.GetValueAsString("daemon", "driveType", ""); /* * DAEMON Tools supports the following image files: * cue/bin * iso * ccd (CloneCD) * bwt (Blindwrite) * mds (Media Descriptor File) * cdi (Discjuggler) * nrg (Nero) * pdi (Instant CD/DVD) * b5t (BlindWrite 5) */ string[] extensions = xmlreader.GetValueAsString("daemon", "extensions", Utils.ImageExtensionsDefault).Split(','); _supportedExtensions = new HashSet <string>(); // Can't use an AddRange, as we need to trim the blanks foreach (string ext in extensions) { _supportedExtensions.Add(ext.Trim()); } } }
static DaemonTools() { using (MediaPortal.Profile.Settings xmlreader = new MediaPortal.Profile.MPSettings()) { _Enabled = xmlreader.GetValueAsBool("daemon", "enabled", false); _Path = xmlreader.GetValueAsString("daemon", "path", ""); _Drive = xmlreader.GetValueAsString("daemon", "drive", "E:"); _DriveNo = xmlreader.GetValueAsInt("daemon", "driveNo", 0); _DriveType = xmlreader.GetValueAsString("daemon", "driveType", ""); /* * DAEMON Tools supports the following image files: * cue/bin * iso * ccd (CloneCD) * bwt (Blindwrite) * mds (Media Descriptor File) * cdi (Discjuggler) * nrg (Nero) * pdi (Instant CD/DVD) * b5t (BlindWrite 5) */ string[] extensions = xmlreader.GetValueAsString("daemon", "extensions", Utils.ImageExtensionsDefault).Split(','); _supportedExtensions = new HashSet<string>(); // Can't use an AddRange, as we need to trim the blanks foreach (string ext in extensions) _supportedExtensions.Add(ext.Trim()); } }
public void PageLoad() { AllocResources(); //_keyboard.InitializeInstance(); _previousOverlayVisible = GUIGraphicsContext.Overlay; _keyboard.PressedEnter = false; GUIGraphicsContext.Overlay = false; GUIPropertyManager.SetProperty("#currentmodule", GUILocalizeStrings.Get(100000 + GetID)); InitializeBackground(); _keyboard.ResetLabelAsInitialText(); if (!_keyboard._useSearchLayout && !_keyboard._password) { using (MediaPortal.Profile.MPSettings xmlreader = new MediaPortal.Profile.MPSettings()) { _keyboard.SmsStyleText = xmlreader.GetValueAsBool("general", "smsstyleinput", true); } } GUIPropertyManager.SetProperty("#VirtualKeyboard.SMSStyleInput", _keyboard.SmsStyleText.ToString().ToLowerInvariant()); base.OnPageLoad(); Log.Debug("Window: {0} init", ToString()); }
protected override void LoadSettings() { base.LoadSettings(); using (MediaPortal.Profile.Settings xmlreader = new MediaPortal.Profile.MPSettings()) { currentLayout = (Layout)xmlreader.GetValueAsInt(SerializeName, "layout", (int)Layout.List); m_bSortAscending = xmlreader.GetValueAsBool(SerializeName, "sortasc", true); } }
public static void CheckInstalledVersions() { using (MediaPortal.Profile.Settings xmlreader = new MediaPortal.Profile.MPSettings()) { fUseDvbSubtitles = xmlreader.GetValueAsBool("tvservice", "dvbbitmapsubtitles", false); } startFilterCheckThread(); }
/// <summary> /// Constructor which initializes the osd controller /// </summary> private OSDController() { _fullscreenWindow = new FullscreenWindow(); _videoOSDWindow = new VideoOSDWindow(); _dialogWindow = new DialogWindow(); _osdForm = new OSDForm(); GUIGraphicsContext.form.SizeChanged += parent_SizeChanged; using (MediaPortal.Profile.Settings settings = new MediaPortal.Profile.MPSettings()) { _blankScreen = settings.GetValueAsBool("externalOSDLibrary", "blankScreen", false); } }
protected override void LoadSettings() { base.LoadSettings(); using (MediaPortal.Profile.Settings xmlreader = new MediaPortal.Profile.MPSettings()) { currentLayout = (Layout)xmlreader.GetValueAsInt(SerializeName, "layout", (int)Layout.List); m_bSortAscending = xmlreader.GetValueAsBool(SerializeName, "sortasc", true); currentSortMethod = (MusicSort.SortMethod)xmlreader.GetValueAsInt(SerializeName, "sortmethod", (int)MusicSort.SortMethod.Name); } }
public override bool Init() { bool bResult = Load(GUIGraphicsContext.GetThemedSkinFile(@"\videoFullScreen.xml")); GetID = (int)Window.WINDOW_FULLSCREEN_VIDEO; using (MediaPortal.Profile.Settings xmlreader = new MediaPortal.Profile.MPSettings()) { _immediateSeekIsRelative = xmlreader.GetValueAsBool("movieplayer", "immediateskipstepsisrelative", true); _immediateSeekValue = xmlreader.GetValueAsInt("movieplayer", "immediateskipstepsize", 10); } SettingsLoaded = false; g_Player.PlayBackEnded += new g_Player.EndedHandler(g_Player_PlayBackEnded); g_Player.PlayBackStopped += new g_Player.StoppedHandler(g_Player_PlayBackStopped); g_Player.PlayBackChanged += new g_Player.ChangedHandler(g_Player_PlayBackChanged); return bResult; }
public static bool IsPluginEnabled(string name) { using (MediaPortal.Profile.Settings xmlreader = new MediaPortal.Profile.MPSettings()) { return(xmlreader.GetValueAsBool("plugins", name, false)); } }
public void Load() { var passwordNeedsUpdate = false; using (MediaPortal.Profile.Settings xmlreader = new MediaPortal.Profile.MPSettings()) { Mp3 = xmlreader.GetValueAsBool("radiotime", "mp3", true); Wma = xmlreader.GetValueAsBool("radiotime", "wma", true); Real = xmlreader.GetValueAsBool("radiotime", "real", false); ShowPresets = xmlreader.GetValueAsBool("radiotime", "showpresets", false); UseVideo = xmlreader.GetValueAsBool("radiotime", "UseVideo", false); JumpNowPlaying = xmlreader.GetValueAsBool("radiotime", "JumpNowPlaying", false); User = xmlreader.GetValueAsString("radiotime", "user", string.Empty); var encryptedPassword = xmlreader.GetValueAsString("radiotime", "encryptedPassword", string.Empty); if (!string.IsNullOrEmpty(encryptedPassword)) { { Password = PasswordUtility.DecryptData(encryptedPassword, DataProtectionScope.LocalMachine); if (string.IsNullOrEmpty(Password)) { Password = string.Empty; } } } else { Password = xmlreader.GetValueAsString("radiotime", "password", string.Empty); passwordNeedsUpdate = true; } FolderId = xmlreader.GetValueAsString("radiotime", "FolderId", string.Empty); PluginName = xmlreader.GetValueAsString("radiotime", "pluginname", "RadioTime"); StartWithFastPreset = xmlreader.GetValueAsBool("radiotime", "StartWithFastPreset", false); SearchHistory.Clear(); ArtistSearchHistory.Clear(); var searchs = xmlreader.GetValueAsString("radiotime", "searchHistory", ""); if (!string.IsNullOrEmpty(searchs)) { var array = searchs.Split('|'); for (var i = 0; i < array.Length && i < 25; i++) { if (!string.IsNullOrEmpty(array[i])) { SearchHistory.Add(array[i]); } } } searchs = xmlreader.GetValueAsString("radiotime", "artistSearchHistory", ""); if (!string.IsNullOrEmpty(searchs)) { var array = searchs.Split('|'); for (var i = 0; i < array.Length && i < 25; i++) { if (!string.IsNullOrEmpty(array[i])) { ArtistSearchHistory.Add(array[i]); } } } PartnerId = "41"; } if (passwordNeedsUpdate) { SaveEncryptedPassword(); } }
private void Initialize() { using (MediaPortal.Profile.Settings xmlreader = new MediaPortal.Profile.MPSettings()) { ReceiveEnabled = xmlreader.GetValueAsBool("USBUIRT", "internal", false); TransmitEnabled = xmlreader.GetValueAsBool("USBUIRT", "external", false); Is3Digit = xmlreader.GetValueAsBool("USBUIRT", "is3digit", false); tunerNeedsEnter = xmlreader.GetValueAsBool("USBUIRT", "needsenter", false); CommandRepeatCount = xmlreader.GetValueAsInt("USBUIRT", "repeatcount", 2); InterCommandDelay = xmlreader.GetValueAsInt("USBUIRT", "commanddelay", 100); } if (!LoadValues()) { Log.Info("USBUIRT:unable to load values from:{0}", remotefile); } if (!LoadTunerValues()) { Log.Info("USBUIRT:unable to load tunervalues from:{0}", tunerfile); } }