Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void updateTable(string tableName)
- {
- // con is an instance of my form to access progressbar
- con.progressBar1.Minimum = 1;
- con.progressBar1.Step = 1;
- string dbQuery = "select summet from someting"
- con.progressBar1.Maximum = address.Tables[0].Rows.Count;
- MessageBox.Show("progress bar max " + con.progressBar1.Maximum);
- foreach (DataRow LonLat in address.Tables[0].Rows)
- {
- con.progressBar1.PerformStep();
- MessageBox.Show(con.progressBar1.Value.ToString()); // this is incrementing
- //plus updating table
- }
- }
- Window.Dispatcher.BeginInvoke((Action)(() =>
- {
- con.progressBar1.PerformStep();
- }
- BackgroundWorker worker = new BackgroundWorker();
- worker.DoWork += (o, ea) =>
- {
- // your code goes here
- }
- worker.RunWorkerCompleted += (q, ea) =>
- {
- }
- worker.RunWorkerAsync();
Add Comment
Please, Sign In to add comment