// </PROPERTIES> // <EVENT HANDLERS> /// <summary> /// Close compensation window that blocks the GUI /// </summary> private void CompensationClose() { if (compensationWindow != null) { compensationWindow.ForceClose(); compensationWindow = null; } }
/// <summary> /// Start performing compensation on short circuit /// </summary> /// <param name="sender">Short compensation button</param> /// <param name="e">Parameter</param> private void buttonCompensationShort_Click(object sender, RoutedEventArgs e) { if ((program.State is Ready) == false) { return; } compensationStarted = true; if (radioButtonCompensationAllFrequencies.IsChecked == true) { program.CompensateShort(Compensate.AllFrequencies); compensationWindow = new Compensation(); // all frequencies take 2 minuts, during which the instrument cannot be operated compensationWindow.ShowDialog(); } else { program.CompensateShort(Compensate.SingleFrequency); } }