private void ChangeLoggingControlStates() { bool clearDataWhenDisabled = true; bool isLoggingControlsEnabled = TargetConnection.IsTargetConnected && SimulationState.IsModelLoadedOnTarget; MainScreen.ChangeControlLoggingTimeCheckBoxState(isLoggingControlsEnabled, clearDataWhenDisabled); MainScreen.ChangeLoggingToggleButtonEnableState(!DataLogManager.IsTargetLoggingData, isLoggingControlsEnabled); // If the host loses connection to the speedgoat target, disable these controls regardless of the current state if (!isLoggingControlsEnabled) { MainScreen.ChangeLoggingTimeRichTextBoxState(isLoggingControlsEnabled, clearDataWhenDisabled); MainScreen.ChangeProgressBarState(isLoggingControlsEnabled); } }