Skip to content

Instantly share code, notes, and snippets.

@JoaoSE-Skyline
Last active March 15, 2024 13:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JoaoSE-Skyline/2250107c87f7df5661880f8224a16fc7 to your computer and use it in GitHub Desktop.
Save JoaoSE-Skyline/2250107c87f7df5661880f8224a16fc7 to your computer and use it in GitHub Desktop.
Dictionary<string, string> options = new Dictionary<string, string>();
options.Add("1", "Upload default configuration");
options.Add("2", "Upload custom configuration");
......
public static void AddOptions(this UIBlockDefinition checkBoxList, Dictionary<string, string> options)
{
foreach(var option in options)
{
checkBoxList.AddCheckBoxListOption(option.Key, option.Value);
}
}
public static Dictionary<string, bool> GetAllChecked(this UIResults uir, string destVar, Dictionary<string, string> options)
{
return options.ToDictionary(o => o.Key, o => uir.GetChecked(destVar, o.Key));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment