private void applyChanges(Boolean forceAll)
{
foreach (KeyValuePair<int, PwmChannelControl> kvp in channelControls)
{
if ((changedStates[kvp.Key] == true) || forceAll)
{
kvp.Value.applyValues();
changedStates[kvp.Key] = false;
if (ControlMode == PwmGeneratorModes.Asynchronous)
{
connector.applyChannelSettings(kvp.Key);
}
}
}
if (ControlMode == PwmGeneratorModes.Synchronous)
{
connector.SynchronousFrequency = synchronousPwmFrequency;
connector.applyChannelSettings();
}
applyButton.Enabled = false;
}