public SpotifyConfigForm(SpotifyPlugin plugin) { InitializeComponent(); _plugin = plugin; // Set the original values. string filename = _plugin.Host.Paths.PlaydarEtcPath + @"\spotify.conf"; _conf = new SimplePropertiesFile(filename); if (File.Exists(filename)) { _origUsername = _conf.Sections["spotify"]["username"]; _origPassword = _conf.Sections["spotify"]["password"]; } else { _origUsername = ""; _origPassword = ""; } }
public NapsterConfigForm(NapsterPlugin plugin) { InitializeComponent(); _plugin = plugin; // Set the original values. string filename = _plugin.Host.Paths.PlaydarEtcPath + @"\napster.conf"; _conf = new SimplePropertiesFile(filename); if (File.Exists(filename)) { _origUsername = _conf.Sections["napster"]["username"]; _origPassword = _conf.Sections["napster"]["password"]; _deviceid = !_conf.Sections["napster"].ContainsKey("deviceid") ? "" : _conf.Sections["napster"]["deviceid"]; } else { _origUsername = ""; _origPassword = ""; _deviceid = ""; } }
public MP3tunesConfigForm(MP3tunesPlugin plugin) { InitializeComponent(); _plugin = plugin; // Set the original values. string filename = _plugin.Host.Paths.PlaydarEtcPath + @"\mp3tunes.conf"; _conf = new SimplePropertiesFile(filename); if (File.Exists(filename)) { _origUsername = _conf.Sections["mp3tunes"]["username"]; _origPassword = _conf.Sections["mp3tunes"]["password"]; _partnerToken = !_conf.Sections["mp3tunes"].ContainsKey("partner_token") ? "" : _conf.Sections["mp3tunes"]["partner_token"]; } else { _origUsername = ""; _origPassword = ""; _partnerToken = ""; } }