private void displayLoggingPercent(float percent_complete) { if (this.gyroCalStatusText.InvokeRequired) { displayLoggingPercentCallback d = new displayLoggingPercentCallback(displayLoggingPercent); this.Invoke(d, new object[] { percent_complete }); } else { if (percent_complete == 100) { dataProgressBar.Value = (int)percent_complete; gyroCalStatusText.Text = "Done."; computegyroCalButton.Enabled = true; startDataCollectionButton.Enabled = false; stopDataCollectionButton.Enabled = false; writeToFileButton.Enabled = true; } else { dataProgressBar.Value = (int)percent_complete; gyroCalStatusText.Text = "Collecting Data: " + percent_complete.ToString() + " %"; } } }
private void displayLoggingPercent(float percent_complete) { if (this.accCalStatusText.InvokeRequired) { displayLoggingPercentCallback d = new displayLoggingPercentCallback(displayLoggingPercent); this.Invoke(d, new object[] { percent_complete }); } else { if (percent_complete == 100) { dataProgressBar.Value = (int)percent_complete; accCalStatusText.Text = "Done."; computeaccCalButton.Enabled = true; startDataCollectionButton.Enabled = false; stopDataCollectionButton.Enabled = false; writeToFileButton.Enabled = true; } else { dataProgressBar.Value = (int)percent_complete; accCalStatusText.Text = "Collecting Data: " + percent_complete.ToString() + " %"; } } }