private void backgroundWorker_ProgressChanged(object sender, ProgressChangedEventArgs e)
{
// WorkerState state = (WorkerState)e.UserState;
bool complete = (bool)e.UserState;
if (complete)
{
SentRowsLbl.Text = "Sent rows: " + GCodes.CurrentLine.ToString();
}
else
{
if (GCodes.CurrentLine % 10 == 0)
SentRowsLbl.Text = "Sent rows: " + GCodes.CurrentLine.ToString();
}
SetGCodeRowCurrent();
worker_progress = true;
}