private void EnableControls(bool enable = true) { if (TestOptionsGgroupBox.InvokeRequired) { EnableControlsDelegate d = new EnableControlsDelegate(EnableControls); this.Invoke(d, new object[] { enable }); return; } UpdateStatus(0, 0); TestOptionsGgroupBox.Enabled = enable; SaveOptionsButton.Enabled = enable; DefaultOptionsButton.Enabled = enable; WriteAndVerifyButton.Visible = enable; VerifyOnlyButton.Visible = enable; AbortButton.Visible = !enable; ProgressBar.Enabled = !enable; if (!enable) { WriteSpeedLabel.Text = PALCEHOLDER_VALUE; ReadSpeedLabel.Text = PALCEHOLDER_VALUE; } }
public void InitializeAdvancedSearch() { setProgress = new SetProgressDelegate(this.SetProgressValue); enableControls = new EnableControlsDelegate(this.EnableControls); showResults = new ShowResultsDelegate(this.ShowSearchResult); }
private void OnDiscoveryFinished(object sender, EventArgs e) { EnableControlsDelegate del = new EnableControlsDelegate(EnableControls); button1.Invoke(del, new object[] { true }); }