Allow MaxValue and MinValue of TUI.Slider to be equal

This commit is contained in:
JFronny 2020-06-12 12:25:12 +02:00
parent a70f4f4393
commit 70fa52a59a
1 changed files with 2 additions and 2 deletions

View File

@ -53,7 +53,7 @@ namespace CC_Functions.Commandline.TUI
get => _maxValue;
set
{
if (value > MinValue && value >= Value)
if (value >= MinValue && value >= Value)
_maxValue = value;
else
throw new ArgumentOutOfRangeException(
@ -70,7 +70,7 @@ namespace CC_Functions.Commandline.TUI
get => _minValue;
set
{
if (value < MaxValue && value <= Value)
if (value <= MaxValue && value <= Value)
_minValue = value;
else
throw new ArgumentOutOfRangeException(