0
0
mirror of https://github.com/sp-tarkov/assembly-tool.git synced 2025-02-13 09:50:44 -05:00
2024-06-13 22:58:26 -04:00

33 lines
693 B
C#

namespace RemapperGUI.Utils;
internal static class GUI
{
/// <summary>
/// Returns the value of the count or null if disabled
/// </summary>
/// <param name="box"></param>
/// <returns></returns>
public static int? GetCount(this CheckBox box, NumericUpDown upDown)
{
if (box.Checked)
{
return (int?)upDown.Value;
}
return null;
}
public static bool? GetEnabled(this DomainUpDown domainUpDown)
{
if (domainUpDown.Text == "True")
{
return true;
}
else if (domainUpDown.Text == "False")
{
return false;
}
return null;
}
}