Вверх ↑
Ответов: 16512
Рейтинг: 1212
#1: 2018-12-17 11:01:35 ЛС | профиль | цитата
Add(MainForm,6229021,287,119)
{
Width=451
Height=128
Color=15780518
Caption="Температура в помещении"
BorderStyle=1
Position=1
Point(onClose)
Point(Close)
link(onCreate,7098561:doEvent1,[])
link(Close,11914673:Left,[(293,107)(271,107)(271,249)(293,249)])
}
Add(Hub,7098561,336,133)
{
OutCount=4
link(onEvent1,7935657:doOpen,[])
link(onEvent2,4937493:doEnumPorts,[(364,146)(364,153)])
link(onEvent3,2606397:doTimer,[(362,153)(362,269)(289,269)(289,342)])
link(onEvent4,10812135:doQuery,[(373,160)(373,398)])
}
Add(DS_SQLite,7935657,581,133)
{
Name="rt"
FileName="C:\\Room_temperature.db"
link(onOpen,1699441:doExec,[])
}
Add(DSC_Exec,1699441,623,133)
{
SQL="CREATE TABLE IF NOT EXISTS data(\r\n data REAL,\r\n t REAL);\r\n "
DSManager="rt"
}
Add(Label,7480715,539,147)
{
Left=60
Top=14
Width=83
Height=42
Color=15780518
Font=[MS Sans Serif,8,1,16711680,1]
WinStyle=4
Caption="COM-порт №°\r\n\r\nСкорость"
AutoSize=1
}
Add(If_else,2513173,511,224)
{
Type=5
Op2=String()
link(onTrue,8651886:doEvent1,[])
}
Add(ComboBox,7690426,497,147)
{
Left=125
Top=39
Width=75
Height=21
Color=15780518
Font=[MS Sans Serif,8,1,0,1]
WinStyle=4
Strings=#3:300|3:600|4:1200|4:2400|4:4800|4:9600|5:14400|5:19200|5:28800|5:38400|5:57600|6:115200|
Text="19200"
Point(EditText)
}
Add(ComboBox,8658105,434,147)
{
Left=150
Top=13
Width=50
Height=21
Color=15780518
Font=[MS Sans Serif,8,1,0,1]
WinStyle=4
Text=""
DataType=1
ReadOnly=0
DropDownCount=15
Point(EditText)
}
Add(Switch,7986566,378,203)
{
DataOn=String(255,СТОП)
DataOff=String(0,ПУСК)
Point(State)
Point(onOff)
Point(onOn)
link(onSwitch,11914673:doSplit,[(418,209)(418,197)(281,197)(281,202)])
link(onOff,6263210:doClose,[(429,216)(429,230)])
link(onOn,6263210:doOpen,[])
}
Add(COM,6263210,448,217)
{
BaudRate=15
link(onRead,2513173:doCompare,[])
link(Port,8658105:EditText,[])
link(BaudRate,7690426:EditText,[(461,205)(517,205)])
}
Add(EnumCOM,4937493,378,147)
{
OutType=0
link(onEnumPorts,8658105:doAdd,[])
}
Add(BlockFind,1696897,630,224)
{
IncludeBlock=1
StartBlock="T="
EndBlock="C"
link(onSearch,8017792:doValue,[])
}
Add(BitBtn,12852987,329,196)
{
Left=70
Top=66
Width=125
Color=0
Font=[MS Sans Serif,8,1,16777215,1]
Caption="Пуск"
Point(doColor)
link(onClick,7986566:doSwitch,[(369,202)(369,209)])
}
Add(StrPart,11914673,287,196)
{
Char=","
Point(Left)
link(onSplit,12852987:doCaption,[])
link(onPart,12852987:doColor,[])
}
Add(ChangeMon,9240330,728,224)
{
link(onData,3396857:doString,[])
}
Add(DSC_Exec,6082265,868,224)
{
DSManager="rt"
link(onExec,6263210:doRXClear,[(916,230)(916,385)(436,385)(436,237)])
link(onError,6229021:doCaption,[(927,237)(927,498)(275,498)(275,125)])
}
Add(FormatStr,3396857,784,224)
{
DataCount=1
Mask="INSERT INTO data values(julianday('now', 'localtime'), %1);"
link(onFString,12623585:doWork2,[])
}
Add(DoData,13091773,399,294)
{
Data=Integer(30)
link(onEventData,6263210:doRead,[(440,300)(440,251)])
}
Add(Memo,15265814,588,252)
{
Left=225
Top=15
Width=210
AddType=1
ScrollBars=2
}
Add(Hub,8651886,560,224)
{
link(onEvent1,1696897:doSearch,[])
link(onEvent2,15265814:doAdd,[(584,237)(584,258)])
}
Add(Memory,8017792,686,224)
{
link(onData,9240330:doData,[])
}
Add(HubEx,12623585,840,224)
{
link(onEvent,6082265:doExec,[])
}
Add(DSC_Query,10812135,602,392)
{
SQL="SELECT count() FROM data WHERE julianday(date('now','localtime')||' 00:00:00')=data;"
DSManager="rt"
link(onQuery,10911024:doEvent,[])
}
Add(IndexToChanel,10911024,644,392)
{
link(onEvent1,9251794:doString,[])
}
Add(FormatStr,9251794,686,392)
{
DataCount=1
Mask="INSERT INTO data values(cast(julianday('now', 'localtime') AS INTEGER)+0.5,%1);\r\n"
link(onFString,12623585:doWork3,[(844,398)])
link(Str1,8017792:Value,[])
}
Add(Timer,2606397,315,336)
{
Enable=1
link(onTimer,12753096:doQuery,[])
}
Add(DSC_Query,12753096,357,336)
{
SQL="SELECT (strftime('%M','now','localtime')*60 + strftime('%S', 'now','localtime')) % (15*60);"
DSManager="rt"
link(onQuery,11179669:doEvent,[])
}
Add(IndexToChanel,11179669,399,336)
{
Count=1
link(onEvent1,13091773:doData,[(443,342)(443,321)(387,321)(387,300)])
}

Часа на два я пропал.
карма: 23
Немного терпения! Дежурный экстрасенс скоро свяжется с Вами!
0
Редактировалось 1 раз(а), последний 2018-12-17 11:05:06