public void Init() { ISettingsManager settingsManager = ServiceRegistration.Get <ISettingsManager>(); Settings = settingsManager.Load <WebradioSettings>(); OfflineVersion = ": " + Convert.ToString(StreamlistUpdate.OfflineVersion()); OnlineVersion = " : " + Convert.ToString(StreamlistUpdate.OnlineVersion()); Items.Clear(); var item = new ListItem(); item.AdditionalProperties[NAME] = "Automatically"; item.SetLabel("Name", "[Webradio.Settings.Automatically]"); if (Settings.StreamlistUpdateMode == "Automatically") { item.Selected = true; } Items.Add(item); item = new ListItem(); item.AdditionalProperties[NAME] = "Manually"; item.SetLabel("Name", "[Webradio.Settings.Manually]"); if (Settings.StreamlistUpdateMode == "Manually") { item.Selected = true; } Items.Add(item); item = new ListItem(); item.AdditionalProperties[NAME] = "Disabled"; item.SetLabel("Name", "[Webradio.Settings.Disabled]"); if (Settings.StreamlistUpdateMode == "Disabled") { item.Selected = true; } Items.Add(item); }
public void Init() { OfflineStreamlistVersion = Convert.ToString(StreamlistUpdate.OfflineVersion()); OnlineStreamlistVersion = Convert.ToString(StreamlistUpdate.OnlineVersion()); }