private void SetCheckboxFromString(CheckBox checkBox, string str)
{
str = str.Trim().ToLower();
switch (str)
{
case "true":
{
checkBox.CheckState = CheckState.Checked;
return;
}
case "false":
{
checkBox.CheckState = CheckState.Unchecked;
return;
}
default:
checkBox.CheckState = CheckState.Indeterminate;
return;
}
}