/// <summary> /// Constructor -- invokes the base constructor with has_login=true for handling user credentials. /// Sets configured Properties /// </summary> public Live365Plugin() : base(true) { use_proxy = UseProxyEntry.Get().Equals("True") ? true : false; use_credentials = UseCredentialsEntry.Get().Equals("True") ? true : false; if (!Int32.TryParse(HttpTimeoutEntry.Get(), out http_timeout_seconds)) { http_timeout_seconds = 20; } credentials_username = HttpUsernameEntry.Get(); credentials_password = HttpPasswordEntry.Get(); proxy_url = ProxyUrlEntry.Get(); SetWebIcon("http://www.live365.com/favicon.ico"); }
/// <summary> /// Saves the configuration for this plugin /// </summary> public override void SaveConfiguration() { if (configuration_widget == null) { return; } http_timeout_seconds = configuration_widget.HttpTimeout; credentials_password = configuration_widget.HttpPassword; credentials_username = configuration_widget.HttpUsername; proxy_url = configuration_widget.ProxyUrl; use_credentials = configuration_widget.UseCredentials; use_proxy = configuration_widget.UseProxy; HttpTimeoutEntry.Set(http_timeout_seconds.ToString()); HttpPasswordEntry.Set(credentials_password); HttpUsernameEntry.Set(credentials_username); ProxyUrlEntry.Set(proxy_url); UseCredentialsEntry.Set(use_credentials.ToString()); UseProxyEntry.Set(use_proxy.ToString()); }