Раздел "Атрибуты" виджета:
Добавить в контекстное меню
Открыть:open
Закрыть:close
Раздел "Обработка" виджета:
добавить переменные st_open, st_close, com...
using Special.FLibSYS;
presets_qf=SYS.DAQ.JavaLikeCalc["presets"]["qf"];
presets_blinks=SYS.DAQ.JavaLikeCalc["presets"]["blinks"];
presets_global=SYS.DAQ.JavaLikeCalc["presets"]["global"];
//Nreg=Napp;
if( !Napp ){Nreg=0;}else{Nreg=Napp;}
Text1_text=Nreg;
mb_regs=SYS.DAQ.ModBus.mmmxModbusTCP_PLC.testABB;
Text2_text=mb_regs["reg"+Nreg].get();
//SYS.messInfo("BlckCalc","mb_reg="+"reg"+Nreg);
//SYS.messInfo("BlckCalc","N_reg="+Nreg);
Text4_color = presets_qf["color_deact"].get();
Text4_text = presets_qf["color_on"].get();
c2=presets_qf["color_on"].get();
Text4_text=presets_qf["color_on"].get();
//ElFigure1_c1=Text4_text;
if (presets_blinks["blink_alarm"].get())
{
ElFigure1_bordWdth = presets_qf["linewidth_norm"].get();
//ElFigure1_c1 = c2;//presets_qf["color_on"].get();
}
else
{
ElFigure1_bordWdth = presets_qf["linewidth_bold"].get();
//ElFigure1_c1 = presets_qf["color_off"].get();
}
using Special.FLibSYS;
//c1=(focus && c1=="#d3d3d3") ? "#00ddff" : "#d3d3d3";
//fillColor = "gray";
if( st_open != EVAL_BOOL && st_open ) {ElFigure1_c1 = "green";SYS.messInfo("command","close");}
if( st_close != EVAL_BOOL && st_close && !st_open ) ElFigure1_c1 = "red";
//> Events process
ev_rez = "";
off = 0;
while(true)
{
sval = strParse(event,0,"\n",off);
// messPut("Kran",1,"Event: "+sval);
if( sval == "" ) break;
else if( sval == "usr_open" ) { ElFigure1_c1 = "green"; }
else if( sval == "usr_close" ) { ElFigure1_c1 = "grey"; com = false; messPut("OP:user",2,"'"+shifr+"'. Команда : : : Закрыть"); }
else ev_rez+=sval+"\n";
}
event=ev_rez;