<?xml version="1.0" encoding="UTF-8"?>
<object class="root" name="root" title="Маршрут на основе SEQD">

    <parametr name="rootName" title="Название">Маршрут №1: Название</parametr>
    <parametr name="rootID" title="ID маршрута">S01</parametr>

    <object class="VisPanel" name="PanelMarshrut">
        <property name="objectName" variable="">PanelMarshrut_[[[rootID]]]</property>
        <property name="pos">10,10</property>
        <property name="size">480x94</property>
        <property name="shadow">Sunken</property>
        <property name="shape">Box</property>
        <property name="color">#eeeeee</property>

        <object class="VisLabel" name="LabelName">
            <property name="text" variable="">[[[rootName]]]</property>
            <property name="pos">12,4</property>
            <property name="size">379x23</property>
            <property name="font">Times New Roman,13,bold</property>
            <property name="textColor">#4c4c4c</property>
            <property name="backgroundColor">#eeeeee</property>
            <property name="autoFillBackground">true</property>
            <property name="shadow">Plain</property>
            <property name="shape">NoFrame</property>
            <property name="alignment">[AlignLeft, AlignVCenter]</property>
        </object>

        <object class="VisLabel" name="LabelState">
            <property name="text">Выключен</property>
            <property name="pos">12,32</property>
            <property name="size">455x23</property>
            <property name="font">Times New Roman,13,bold</property>
            <property name="textColor">#4c4c4c</property>
            <property name="backgroundColor">#eeeeee</property>
            <property name="autoFillBackground">true</property>
            <property name="shadow">Raised</property>
            <property name="shape">Box</property>
            <property name="alignment">[AlignHCenter, AlignVCenter]</property>
            <property name="script">
state = obj.getVar(0);

switch (state) {
case 0:
    lbl.text = &quot;Выключен&quot;;
    break;
case 1:
    lbl.text = &quot;Ожидание разрешения запуска...&quot;;
    break;
case 2:
    lbl.text = &quot;Готов к старту. Нажмите СТАРТ&quot;;
    break;
case 3:
    lbl.text = &quot;Запуск...&quot;;
    break;
case 4:
    lbl.text = &quot;Работает&quot;;
    break;
case 5:
    lbl.text = &quot;Останов...&quot;;
    break;
case 6:
    lbl.text = &quot;Приостановлен&quot;;
    break;
default:
    lbl.text = &quot;?&quot;;
}

if (state &gt;0) {
    obj.setBackgroundColor(0x00FF00);
} else {
    obj.setBackgroundColor(0xCCCCCC);
}
            </property>
            <property name="eqVarSet">S01/eqvar_State</property>
            <property name="eqParameters">S01/eqpar</property>
        </object>

        <object class="VisButton" name="ButtonStart">
            <property name="pos">12,60</property>
            <property name="size">94x25</property>
            <property name="textSelected">запуск...</property>
            <property name="textUnselected">Старт</property>
            <property name="equipment">S01/eqbtn_Start</property>
        </object>

        <object class="VisButton" name="ButtonStop">
            <property name="pos">112,60</property>
            <property name="size">94x25</property>
            <property name="textSelected">останов...</property>
            <property name="textUnselected">Стоп</property>
            <property name="equipment">S01/eqbtn_Stop</property>
        </object>

        <object class="VisButton" name="ButtonAlarmStop">
            <property name="pos">324,60</property>
            <property name="size">142x25</property>
            <property name="textSelected">останов...</property>
            <property name="textUnselected">Экстренный стоп</property>
            <property name="equipment">S01/eqbtn_Emrg</property>
        </object>
        
    </object>

    <object class="EquipmentGroup" name="S01">
        <property name="objectName" variable="">[[[rootID]]]</property>
        <property name="tagPath"></property>
        <property name="tagRoot" variable="">[[[rootID]]]</property>
        <property name="dataProvider"></property>

        <object class="EqButton" name="eqbtn_Start">
            <property name="objectName" variable="">eqbtn_Start_[[[rootID]]]</property>
            <property name="tagName">;SEQD_^_BtnStart</property>
        </object>

        <object class="EqButton" name="eqbtn_Stop">
            <property name="objectName" variable="">eqbtn_Stop_[[[rootID]]]</property>
            <property name="tagName">;SEQD_^_BtnStop</property>
        </object>

        <object class="EqButton" name="eqbtn_Emrg">
            <property name="objectName" variable="">eqbtn_Emrg_[[[rootID]]]</property>
            <property name="tagName">;SEQD_^_BtnEmrg</property>
        </object>

        <object class="EqVarSet" name="eqvar_State">
            <property name="objectName" variable="">eqvar_State_[[[rootID]]]</property>
            <property name="varNames">SEQD_^_Sost</property>
        </object>

        <object class="EqParameters" name="eqpar">
            <property name="objectName" variable="">eqpar_[[[rootID]]]</property>
        </object>
        
    </object>


</object>
