private void ControlsToData()
{
if (HasData())
{
if (_environmentalElements == null)
_environmentalElements = new EnvironmentalElements();
_environmentalElements.Altitude = altitude.Limit;
_environmentalElements.Humidity = humidity.Limit;
_environmentalElements.Shock = shock.Limit;
_environmentalElements.Temperature = temperature.Limit;
_environmentalElements.Vibration = environmentalElementsVibrationControl.Vibration;
}
else
{
_environmentalElements = null;
}
}