# <H1 align="center">Module «Condition»</h1> 

<p> The modules described in this part do nothing by themselves, they should be used together with other modules. The described modules (except «Break»), in addition to the usual «Note» field, have a few more parameters that are required to fill out, but there is no separate settings window.
<p> Module «Condition» module allows you to perform certain actions depending on the specified condition. The condition itself doesn't matter as long as it comes down to «True» or «False».</p> 

## Module interface
<p> Module consists of the fields «Note» and «Condition». Actions that must be performed when the value of the condition is «True», are added to the «THEN» section, if the value is «False» - to the «ELSE» section. Actions are added to the module by dragging them from the menu or another place in the workspace.
<H1 align="center">![Screenshot](img/condition_1.png)</h1> 
<p> The «Note» field is designed for robot creators to leave notes/comments.  
<p> The «Condition» field is filled according to the rules of the C# programming language. For users unfamiliar with this language, help is offered in the form of a «Constructor of conditions»,  accessible by clicking the button ![Screenshot](img/condition_2.png) to the right of the condition. 
## Constructor of conditions 
<p> Constructor of conditions allows creating conditions in accordance with the syntax of the C # language.
<H1 align="center">![Screenshot](img/condition_3.png)</h1>
### Adding 
<p> In order to make a condition, it is necessary to fill in both operands, select the type of operands (rows or numbers), select the operator between them from the proposed one and click on the «Add» button:
<H1 align="center">![Screenshot](img/condition_4.png)</h1>
<H1 align="center">![Screenshot](img/condition_5.png)</h1>
<p> The list of operations for rows and for numbers is different, so first select the type of operands, and only then the operation.
### Binding
<p> You can bind multiple conditions with logical «AND» or logical «OR».  
<p> This is done as follows - holding the Shift key selects several conditions that must be connected by one operator, then the button with the corresponding logical operator is pressed:
<H1 align="center">![Screenshot](img/condition_6.png)</h1>
<H1 align="center">![Screenshot](img/condition_7.png)</h1>
<p> The «||» symbol means logical OR, the «&&» symbol means logical AND.
### Unbinding
<p> Conditions that consist of several simple conditions, meaning, those that use a logical AND or OR, can be disconnected by clicking on the «Unbind» button. Disconnection is done by logical operators.
<H1 align="center">![Screenshot](img/condition_8.png)</h1>
<H1 align="center">![Screenshot](img/condition_9.png)</h1>
### Saving
<p> To save the condition, press the «Save» button. The final condition is inserted to the «Condition» field of the conditional module:
<H1 align="center">![Screenshot](img/condition_10.png)</h1>
<H1 align="center">![Screenshot](img/condition_11.png)</h1>
<p> Finished module will look like this:
<H1 align="center">![Screenshot](img/condition_12.png)</h1>
### Minimize
<p> To reduce occupied workspace you can click the «Minimize» button to minimize actions included in this module.
<H1 align="center">![Screenshot](img/condition_13.png)</h1>
<p> You can also change the size of sections «THEN» and «ELSE» up to completely minimizing one of them, for example, if one of them is not being used.
<H1 align="center">![Screenshot](img/condition_14.png)</h1>
<H1 align="center">![Screenshot](img/condition_15.png)</h1>
