Represents a switch defined in the model interface layer.
For a list of all members of this type, see Checkbox Members.
System.Object
iseesystems.iseeNET.Input
iseesystems.iseeNET.Checkbox
Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.
A switch is an on/off or true/false input to the model. The ithink/STELLA switch is expressed as a checkbox here.
C# Example:
...
private Checkbox hireNewCEO;
public void Init()
{
this.hireNewCEO = this.Simulation.GetCheckbox("hire_new_CEO");
}
public void Update()
{
this.checkboxControl.Text = this.hireNewCEO.Name;
if(this.hireNewCEO.ResetAfterRunStep)
{
this.checkboxControl.Checked = Convert.ToBoolean(this.hireNewCEO.InitialValue);
}
}
public void UpdateInputs
{
if(this.checkboxControl.Checked)
{
this.hireNewCEO.CurrentValue = 1;
}
else
{
this.hireNewCEO.CurrentValue = 0;
}
}
VB.NET Example: ...
Private hireNewCEO as Checkbox
Public Sub Init()
Me.hireNewCEO = Me.Simulation.GetCheckbox("hire_new_CEO")
End Sub
Public Sub Update()
Me.checkboxControl.Text = Me.hireNewCEO.Name
If Me.hireNewCEO.ResetAfterRunStep Then
Me.checkboxControl.Checked = Convert.ToBoolean(Me.hireNewCEO.InitialValue)
End If
End Sub
Public Sub UpdateInputs
If Me.checkboxControl.Checked Then
Me.hireNewCEO.CurrentValue = 1
Else
Me.hireNewCEO.CurrentValue = 0
End If
End Sub
Namespace: iseesystems.iseeNET
Assembly: iseesystems.iseeNET.Simulation (in iseesystems.iseeNET.Simulation.dll)