I have multiple check boxes on my GUI application that enables auto update for each object of the same type. So if the checkbox is checked, the isautoupdate property is set to true else set to false. I have a button that needs to enable/disable auto update on all checkboxes. How do I go about checking if isautoupdate property of all the objects is set to true or false.
my current implementation is using a foreach loop that iterates through each object and checks if the isautoupdate is set to true or false but I get a toggle effect where if some checkboxes are checked it will uncheck them and vise versa.
in .cs
foreach (MxL_GUI_ChannelSettingAndStatusItem item in theGUIManager.theDevice.channelCollection)
{
if (!item.IsAutoUpdated)
{
item.IsAutoUpdated = true;
}
else
{
item.IsAutoUpdated = false;
}
}