public DataScrobble(object[] files, string username, string password, ScrobblerManager sm) { InitializeComponent(); this.files = files; this.username = username; this.password = password; this.sm = sm; }
private void initializeScrobbler() { StartTimer(); //StartMarqueeProgressBar(); client = new LastFmClient(); client.User = new LastFmUser(); client.User.Username = userLogin; client.User.Password = userPassword; LastFmLib.WebRequests.Handshake handshake = client.Login(); if (handshake.succeeded) { sm = client.GetScrobblerManager(); scrobblerInit = true; if (ok.InvokeRequired) { this.Invoke((MethodInvoker) delegate() { ok.Text = "Confirmed!"; optionsPopup.Show(new Point(this.Size.Width + this.Location.X, this.Location.Y + this.Size.Height / 3)); }); } else { ok.Text = "Cofirmed!"; } } else { if (ok.InvokeRequired) { this.Invoke((MethodInvoker) delegate() { ok.Text = "Failed!\n (" + handshake.errorMessage + ")"; ok.Size = new Size(ok.Size.Width, ok.Size.Height * 2); panel.Size = new Size(panel.Width, panel.Height + ok.Size.Height / 2); optionsPopup.Show(new Point(this.Size.Width + this.Location.X, this.Location.Y + this.Size.Height / 3)); }); } else { ok.Text = "Failed!"; } } StopTimer(); StopMarqueeProgressBar(); }
private void initializeScrobbler() { StartTimer(); //StartMarqueeProgressBar(); client = new LastFmClient(); client.User = new LastFmUser(); client.User.Username = userLogin; client.User.Password = userPassword; LastFmLib.WebRequests.Handshake handshake = client.Login(); if (handshake.succeeded) { sm = client.GetScrobblerManager(); scrobblerInit = true; if (ok.InvokeRequired) { this.Invoke((MethodInvoker)delegate() { ok.Text = "Confirmed!"; optionsPopup.Show(new Point(this.Size.Width + this.Location.X, this.Location.Y + this.Size.Height / 3)); }); } else ok.Text = "Cofirmed!"; } else { if (ok.InvokeRequired) { this.Invoke((MethodInvoker)delegate() { ok.Text = "Failed!\n (" + handshake.errorMessage + ")"; ok.Size = new Size(ok.Size.Width, ok.Size.Height * 2); panel.Size = new Size(panel.Width, panel.Height + ok.Size.Height / 2); optionsPopup.Show(new Point(this.Size.Width + this.Location.X, this.Location.Y + this.Size.Height / 3)); }); } else ok.Text = "Failed!"; } StopTimer(); StopMarqueeProgressBar(); }