private void mBW_ProgressChanged(object sender, ProgressChangedEventArgs e) { try { //MessageBox.Show("The current user state, and the second parameter passed to ReportProgress is: " + //e.UserState.ToString()+e.ProgressPercentage.ToString()); WorkerArgs args = new WorkerArgs(); args = (WorkerArgs)e.UserState; if (e.ProgressPercentage == 2) { MessageBox.Show(args.str); } int nrNetrimise = args.interger; labelScanariNetrimise.Text =("Scanari netrimise "+ nrNetrimise.ToString()); if (e.ProgressPercentage == 1) { if (args.boolean) //dc primim update la starea conexiuni : conectat/ deconectat : schimbam culoarea { labelScanariNetrimise.ForeColor = Color.White; //labelScanariNetrimise.Text = ("Scanari netrimise " + nrNetrimise.ToString()); labelScanariNetrimise.BackColor = Color.Blue; } else { labelScanariNetrimise.ForeColor = Color.White; //labelScanariNetrimise.Text = ("Scanari netrimise " + nrNetrimise.ToString()); labelScanariNetrimise.BackColor = Color.Red; } } if (nrNetrimise == 0) //la 0 scanari trimise: text negru pe fond alb { labelScanariNetrimise.ForeColor = Color.Black; labelScanariNetrimise.BackColor = Color.White; } } catch (Exception ex) { } }
private void updateTwitterBackgroundWorker_ProgressChanged(object sender, OpenNETCF.ComponentModel.ProgressChangedEventArgs e) { ; }
private void fetchDirectMessageBackgroundWorker_ProgressChanged(object sender, OpenNETCF.ComponentModel.ProgressChangedEventArgs e) { ; }