BrrrBayBay.PwmGUIControl.PwmChannelControl.applyValues C# (CSharp) Метод

applyValues() публичный Метод

Applies the user settings to the channelsettings object. This is only performed if the user settings are correct
public applyValues ( ) : System.Boolean
Результат System.Boolean
        public Boolean applyValues()
        {
            Boolean retVal = false;

            frequencyUnits = fUnitsBox.Text;
            dcUnits = dcUnitsBox.Text;

            RaiseSettingsChangedAllowed = false;

            // Check if both the frequency and returnvalues are correct
            retVal = recalculateFrequency();
            if (retVal) retVal = recalculateDutyCycle();

            if (retVal == true)
            {
                channelSettings.DutyCycleS = tmpDc;
                channelSettings.Enabled = tmpEnabled;
                channelSettings.Frequency = (int)tmpFrequency;
            }

            RaiseSettingsChangedAllowed = true;
            return retVal;
        }