private void frmMain_Shown(object sender, EventArgs e) { Thread.Sleep(200); this.Activate(); ClearTrackInfo(); // very ugly, use config parser (json for example) would be nicer string username = "", password = ""; configuration.LoadConfigurationFile(); TransferConfig(); username = configuration.GetConfiguration("username"); password = configuration.GetConfiguration("password"); lang = new LanguageXML(configuration.GetConfiguration("language")); textBoxLink.Placeholder = lang.GetString("download/paste_uri"); downloader.Login(username, password); if (Clipboard.GetText().Contains("spotify")) { string CLIPBOARD_DIALOG = "Clipboard may contain one or more Spotify URLs. Use these?"; if (MessageBox.Show(CLIPBOARD_DIALOG, "Confirm", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes) { textBoxLink.Text = Clipboard.GetText(); FetchSongsFromUrl(textBoxLink.Text); } } }
public frmMain() { InitializeComponent(); configuration = new XmlConfiguration("config.xml"); configuration.LoadConfigurationFile(); downloader = new SpotifyDownloader(); downloader.OnLoginResult += OnLoginResult; downloader.OnDownloadComplete += downloader_OnDownloadComplete; downloader.OnDownloadProgress += downloader_OnDownloadProgress; }
public frmMain() { InitializeComponent(); configuration = new XmlConfiguration("config.xml"); configuration.LoadConfigurationFile(); downloader = new SpotifyDownloader(); downloader.OnLoginResult += OnLoginResult; downloader.OnDownloadComplete += downloader_OnDownloadComplete; downloader.OnDownloadProgress += downloader_OnDownloadProgress; }
private void frmMain_Shown(object sender, EventArgs e) { System.Threading.Thread.Sleep(200); this.Activate(); // very ugly, use config parser (json for example) would be nicer string username = "", password = ""; configuration.LoadConfigurationFile(); TransferConfig(); username = configuration.GetConfiguration("username"); password = configuration.GetConfiguration("password"); lang = new LanguageXML(configuration.GetConfiguration("language")); textBoxLink.Placeholder = lang.GetString("download/paste_uri"); downloader.Login(username, password); }