Skip to content
Snippets Groups Projects
Commit 32146ff6 authored by Антон Кудряшов's avatar Антон Кудряшов
Browse files

fixed check

parent 2493f6c8
No related branches found
No related tags found
No related merge requests found
...@@ -87,15 +87,15 @@ namespace WindStressPRM ...@@ -87,15 +87,15 @@ namespace WindStressPRM
this.IsON = false; this.IsON = false;
CheckValue(); CheckValue();
} }
public void CheckValue() public bool CheckValue()
{ {
bool checker = Identifier >= 0;
if (Identifier < 0) { if (Identifier < 0) {
throw new System.ArgumentOutOfRangeException("Identifier", Identifier, "Identifer expected to be more than 0"); throw new System.ArgumentOutOfRangeException("Identifier", Identifier, "Identifer expected to be more than 0");
} }
if (Voltage < 0 || Voltage > 1500) { if (Voltage < 0 || Voltage > 1500) {
throw new System.ArgumentOutOfRangeException("Voltage", Voltage, "Voltage expected to be in range (0,1500)"); throw new System.ArgumentOutOfRangeException("Voltage", Voltage, "Voltage expected to be in range (0,1500)");
} }
return true;
} }
/// <summary> /// <summary>
/// Gets attached lines list /// Gets attached lines list
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment