Вверх ↑
Ответов: 1536
Рейтинг: 176
#1: 2014-10-16 14:06:32 ЛС | профиль | цитата
Gunnman, вот схема, где можно на лету, меняя время колёсиком мыши, проверять работу программы.
Add(MainForm,7764541,70,196)
{
Width=636
Height=273
link(onCreate,7556037:doEvent1,[])
}
Add(DateConvertor,10925915,301,161)
{
Mode=17
Format="yyyy-MM-dd HH:mm:ss"
Point(Data)
link(onResult,8943334:doValue,[])
link(Data,1385911:Var2,[])
}
Add(Edit,9008527,301,105)
{
Left=110
Top=60
Width=205
Height=30
Font=[Consolas,14,0,0,0]
Text="2014-10-11 07:00:00"
Point(onMouseWheel)
Point(Position)
link(onMouseWheel,16039733:doWork1,[(356,125)(356,79)(207,79)(207,111)])
}
Add(Edit,3804103,637,105)
{
Left=110
Top=100
Width=205
Height=30
Font=[Consolas,14,0,0,0]
Text="2014-10-12 03:00:00"
Point(Position)
Point(onMouseWheel)
link(onMouseWheel,12305518:doWork1,[(687,125)(687,79)(533,79)(533,111)])
}
Add(Edit,3698074,469,105)
{
Left=340
Top=60
Width=205
Height=30
Font=[Consolas,14,0,0,0]
Text="2014-10-12 00:00:00"
Point(Position)
Point(onMouseWheel)
link(onMouseWheel,8511667:doWork1,[(522,125)(522,78)(374,78)(374,111)])
}
Add(Edit,7439302,805,105)
{
Left=340
Top=100
Width=205
Height=30
Font=[Consolas,14,0,0,0]
Text="2014-10-12 05:50:00"
Point(Position)
Point(onMouseWheel)
link(onMouseWheel,11733101:doWork1,[(854,125)(854,79)(702,79)(702,111)])
}
Add(MathParse,6523429,245,350)
{
DataCount=5
MathStr="(((%5>%2)and(%5<%3))*1)+
(((%5>%4)and(%5<(%1+86400)))*2)+
(((%5>=%1)and(%5<=%2))*3)+
(((%5>=%3)and(%5<=%4))*4)+
((%5>(%1+86400))*5)"
link(onResult,2618875:doCompare,[])
link(X1,7186291:Var,[])
link(X2,14928589:Var,[])
link(X3,11631333:Var,[])
link(X4,6098928:Var,[])
link(X5,8758393:Var1,[(279,341)])
}
Add(DateConvertor,13518142,469,161)
{
Mode=17
Format="yyyy-MM-dd HH:mm:ss"
Point(Data)
link(onResult,1804631:doValue,[])
link(Data,12035375:Var2,[])
}
Add(DateConvertor,10362442,637,161)
{
Mode=17
Format="yyyy-MM-dd HH:mm:ss"
Point(Data)
link(onResult,13720332:doValue,[])
link(Data,12374633:Var2,[])
}
Add(DateConvertor,12857620,805,161)
{
Mode=17
Format="yyyy-MM-dd HH:mm:ss"
Point(Data)
link(onResult,9302451:doValue,[])
link(Data,8621251:Var2,[])
}
Add(Hub,10501248,203,252)
{
OutCount=3
link(onEvent1,10925915:doConvert,[(241,258)(241,167)])
link(onEvent2,14888266:doWork2,[])
link(onEvent3,6523429:doCalc,[(231,272)(231,356)])
}
Add(StrList,16646576,413,350)
{
Strings=#50:Текущее время меньше, чем установлено в графике!;0|51:"ПЕРЕСМЕНКА" - 1-ая смена сменяется 2-ой.;(%3-1)-%5|55:"ПЕРЕСМЕНКА" - 2-ая смена сменяется 1-ой.;(%1+86399)-%5|46:Период рабочего времени: 1-ая смена.;(%2-1)-%5|46:Период рабочего времени: 2-ая смена.;(%4-1)-%5|
Point(doGetString)
Point(onGetString)
link(onGetString,9179008:doSplit,[])
}
Add(Label,2657564,511,357)
{
Left=15
Top=145
Width=148
Height=28
Font=[Consolas,16,1,0,204]
Caption=" "
}
Add(DateConvertor,537955,567,504)
{
Mode=16
Format="yyyy-MM-dd HH:mm:ss"
Point(Data)
link(onResult,7538393:doEvent,[])
}
Add(If_else,2618875,308,350)
{
Type=1
Op2=Integer(5)
link(onTrue,16646576:doGetString,[(376,356)(376,398)])
link(onFalse,12735089:doCalc,[(355,363)(355,510)])
}
Add(Math,8451864,525,504)
{
PColor(Op2,16711850)
link(onResult,537955:doConvert,[])
link(Op1,1994995:Var,[(531,492)(512,492)(512,548)(475,548)])
link(Op2,12735089:Result,[(538,486)(411,486)(411,548)(370,548)])
}
Add(GetIndexData,1994995,469,504)
{
Count=4
link(onIndex,8451864:doOperation,[])
link(Data1,13413776:Var2,[])
link(Data2,3735568:Var,[])
link(Data3,7969276:Var,[])
link(Data4,7593320:Var,[])
}
Add(For,10633371,420,504)
{
End=3
link(onEvent,1994995:doIndex,[])
}
Add(IndexToChanel,7538393,616,504)
{
Count=4
Point(Index)
link(onEvent1,14239842:In,[])
link(onEvent2,16155886:In,[])
link(onEvent3,11006013:In,[])
link(onEvent4,10589484:In,[])
link(Index,10633371:Position,[(622,492)(607,492)(607,555)(426,555)])
}
Add(GetDataEx,8758393,364,336)
{
link(Data,14888266:Var1,[])
}
Add(HubEx,15266554,147,252)
{
link(onEvent,10501248:doEvent1,[])
}
Add(GlobalVar,8943334,350,161)
{
Name="1"
link(onValue,13518142:doConvert,[])
}
Add(GlobalVar,13720332,686,161)
{
Name="3"
link(onValue,12857620:doConvert,[])
}
Add(GlobalVar,1804631,518,161)
{
Name="2"
link(onValue,10362442:doConvert,[])
}
Add(GlobalVar,9302451,854,161)
{
Name="4"
}
Add(GlobalVar,6098928,266,322)
{
Name="4"
}
Add(GlobalVar,7593320,490,462)
{
Name="4"
}
Add(GlobalVar,3735568,476,434)
{
Name="2"
}
Add(GlobalVar,7969276,483,448)
{
Name="3"
}
Add(GlobalVar,14928589,252,294)
{
Name="2"
}
Add(GlobalVar,11631333,259,308)
{
Name="3"
}
Add(GlobalVar,7186291,245,280)
{
Name="1"
}
Add(GlobalVar,4948637,469,420)
{
Name="1"
}
Add(LineBreak,6151920,259,112)
{
Caption="1"
link(Out,9008527:doText2,[])
Primary=[14239842,406,392]
}
Add(LineBreak,12212267,427,112)
{
Caption="2"
link(Out,3698074:doText2,[])
Primary=[16155886,266,399]
}
Add(LineBreak,10921139,595,112)
{
Caption="3"
link(Out,3804103:doText2,[])
Primary=[11006013,70,406]
}
Add(LineBreak,15031121,763,112)
{
Caption="4"
link(Out,7439302:doText2,[])
Primary=[10589484,-70,413]
}
Add(Hub,1055105,567,364)
{
link(onEvent1,9427663:doMathStr,[])
link(onEvent2,9427663:doCalc,[(591,377)(591,363)])
}
Add(MathParse,9427663,602,357)
{
DataCount=5
MathStr=""
Point(doMathStr)
link(onResult,7685883:doConvert,[])
link(X1,2223920:Var,[])
link(X2,9789118:Var,[])
link(X3,7023187:Var,[])
link(X4,3050062:Var,[])
link(X5,8758393:Var3,[(636,341)])
}
Add(DateConvertor,7685883,658,357)
{
Mode=16
Format="Осталось времени: HH:mm:ss"
Point(Data)
link(onResult,8007688:doText,[])
}
Add(Label,8007688,707,357)
{
Left=15
Top=185
Width=148
Height=28
Font=[Consolas,16,1,0,204]
Caption=" "
}
Add(GlobalVar,3050062,623,315)
{
Name="4"
}
Add(GlobalVar,9789118,609,287)
{
Name="2"
}
Add(GlobalVar,7023187,616,301)
{
Name="3"
}
Add(GlobalVar,2223920,602,273)
{
Name="1"
}
Add(GetDataEx,13413776,469,469)
{
link(Data,4948637:Var,[])
}
Add(MathParse,12735089,364,504)
{
MathStr="trunc(%1-%2,86400)"
link(onResult,10633371:doFor,[])
link(X1,8758393:Var2,[])
link(X2,13413776:Var1,[(377,474)])
}
Add(GetDataEx,1385911,301,140)
{
link(Data,9008527:Text,[])
}
Add(MultiElement,16039733,217,105)
{
@Hint=#101:установи курсор в нужное место Edit-а и крути колёсиком мыши. И так везде. На год и месяц я не делал.|
link(onEvent1,9008527:doText,[])
link(Data1,9008527:Position,[(223,86)(348,86)(348,147)(314,147)])
link(Data2,1385911:Var1,[(230,92)(256,92)(256,145)])
AddHint(-49,-80,196,39,@Hint)
}
BEGIN_SDK
Add(EditMulti,13922277,21,21)
{
EventCount=1
WorkCount=1
DataCount=2
Width=265
Height=116
link(doWork1,13686583:doCalc,[(45,27)(45,76)])
}
Add(DateConvertor,15045434,224,70)
{
Mode=16
Format="yyyy-MM-dd HH:mm:ss"
Point(Data)
link(onResult,13922277:onEvent1,[(271,76)(271,27)])
}
Add(DateConvertor,10349720,119,70)
{
Mode=17
Format="yyyy-MM-dd HH:mm:ss"
Point(Data)
link(onResult,14927298:doOperation,[])
link(Data,13922277:Data2,[(125,39)(34,39)])
}
Add(Math,14927298,175,70)
{
link(onResult,15045434:doConvert,[])
link(Op2,13686583:Result,[(188,58)(161,58)(161,117)(76,117)])
}
Add(MathParse,13686583,70,70)
{
MathStr="(((%1>=0)and(%1<=10)and(%2=120))*86400)+
(((%1>=0)and(%1<=10)and(%2=(-120)))*(-86400))+
(((%1>=11)and(%1<=13)and(%2=120))*3600)+
(((%1>=11)and(%1<=13)and(%2=(-120)))*(-3600))+
(((%1>=14)and(%1<=16)and(%2=120))*60)+
(((%1>=14)and(%1<=16)and(%2=(-120)))*(-60))+
(((%1>=17)and(%2=120))*1)+
(((%1>=17)and(%2=(-120)))*(-1))"
link(onResult,10349720:doConvert,[])
link(X1,13922277:Data1,[(76,46)(27,46)])
}
END_SDK
Add(MultiElement,8511667,385,105)
{
link(onEvent1,3698074:doText,[])
link(Data1,3698074:Position,[(391,88)(511,88)(511,149)(482,149)])
link(Data2,12035375:Var1,[(398,95)(424,95)(424,145)])
}
BEGIN_SDK
Add(EditMulti,870010,21,21)
{
EventCount=1
WorkCount=1
DataCount=2
Width=265
Height=116
link(doWork1,4639866:doCalc,[(45,27)(45,76)])
}
Add(DateConvertor,2282113,224,70)
{
Mode=16
Format="yyyy-MM-dd HH:mm:ss"
Point(Data)
link(onResult,870010:onEvent1,[(271,76)(271,27)])
}
Add(DateConvertor,14606230,119,70)
{
Mode=17
Format="yyyy-MM-dd HH:mm:ss"
Point(Data)
link(onResult,8029635:doOperation,[])
link(Data,870010:Data2,[(125,39)(34,39)])
}
Add(Math,8029635,175,70)
{
link(onResult,2282113:doConvert,[])
link(Op2,4639866:Result,[(188,58)(161,58)(161,117)(76,117)])
}
Add(MathParse,4639866,70,70)
{
MathStr="(((%1>=0)and(%1<=10)and(%2=120))*86400)+
(((%1>=0)and(%1<=10)and(%2=(-120)))*(-86400))+
(((%1>=11)and(%1<=13)and(%2=120))*3600)+
(((%1>=11)and(%1<=13)and(%2=(-120)))*(-3600))+
(((%1>=14)and(%1<=16)and(%2=120))*60)+
(((%1>=14)and(%1<=16)and(%2=(-120)))*(-60))+
(((%1>=17)and(%2=120))*1)+
(((%1>=17)and(%2=(-120)))*(-1))"
link(onResult,14606230:doConvert,[])
link(X1,870010:Data1,[(76,46)(27,46)])
}
END_SDK
Add(GetDataEx,12035375,469,140)
{
link(Data,3698074:Text,[])
}
Add(MultiElement,12305518,546,105)
{
link(onEvent1,3804103:doText,[])
link(Data1,3804103:Position,[(552,88)(678,88)(678,149)(650,149)])
link(Data2,12374633:Var1,[(559,94)(588,94)(588,145)])
}
BEGIN_SDK
Add(EditMulti,11426157,21,21)
{
EventCount=1
WorkCount=1
DataCount=2
Width=265
Height=116
link(doWork1,9290303:doCalc,[(45,27)(45,76)])
}
Add(DateConvertor,6424478,224,70)
{
Mode=16
Format="yyyy-MM-dd HH:mm:ss"
Point(Data)
link(onResult,11426157:onEvent1,[(271,76)(271,27)])
}
Add(DateConvertor,2464007,119,70)
{
Mode=17
Format="yyyy-MM-dd HH:mm:ss"
Point(Data)
link(onResult,12653655:doOperation,[])
link(Data,11426157:Data2,[(125,39)(34,39)])
}
Add(Math,12653655,175,70)
{
link(onResult,6424478:doConvert,[])
link(Op2,9290303:Result,[(188,58)(159,58)(159,116)(76,116)])
}
Add(MathParse,9290303,70,70)
{
MathStr="(((%1>=0)and(%1<=10)and(%2=120))*86400)+
(((%1>=0)and(%1<=10)and(%2=(-120)))*(-86400))+
(((%1>=11)and(%1<=13)and(%2=120))*3600)+
(((%1>=11)and(%1<=13)and(%2=(-120)))*(-3600))+
(((%1>=14)and(%1<=16)and(%2=120))*60)+
(((%1>=14)and(%1<=16)and(%2=(-120)))*(-60))+
(((%1>=17)and(%2=120))*1)+
(((%1>=17)and(%2=(-120)))*(-1))"
link(onResult,2464007:doConvert,[])
link(X1,11426157:Data1,[(76,46)(27,46)])
}
END_SDK
Add(GetDataEx,12374633,637,140)
{
link(Data,3804103:Text,[])
}
Add(MultiElement,11733101,714,105)
{
link(onEvent1,7439302:doText,[])
link(Data1,7439302:Position,[(720,90)(845,90)(845,149)(818,149)])
link(Data2,8621251:Var1,[(727,95)(755,95)(755,145)])
}
BEGIN_SDK
Add(EditMulti,1153820,21,21)
{
EventCount=1
WorkCount=1
DataCount=2
Width=265
Height=116
link(doWork1,10445681:doCalc,[(45,27)(45,76)])
}
Add(DateConvertor,7182956,224,70)
{
Mode=16
Format="yyyy-MM-dd HH:mm:ss"
Point(Data)
link(onResult,1153820:onEvent1,[(271,76)(271,27)])
}
Add(DateConvertor,4287213,119,70)
{
Mode=17
Format="yyyy-MM-dd HH:mm:ss"
Point(Data)
link(onResult,7696693:doOperation,[])
link(Data,1153820:Data2,[(125,39)(34,39)])
}
Add(Math,7696693,175,70)
{
link(onResult,7182956:doConvert,[])
link(Op2,10445681:Result,[(188,58)(160,58)(160,116)(76,116)])
}
Add(MathParse,10445681,70,70)
{
MathStr="(((%1>=0)and(%1<=10)and(%2=120))*86400)+
(((%1>=0)and(%1<=10)and(%2=(-120)))*(-86400))+
(((%1>=11)and(%1<=13)and(%2=120))*3600)+
(((%1>=11)and(%1<=13)and(%2=(-120)))*(-3600))+
(((%1>=14)and(%1<=16)and(%2=120))*60)+
(((%1>=14)and(%1<=16)and(%2=(-120)))*(-60))+
(((%1>=17)and(%2=120))*1)+
(((%1>=17)and(%2=(-120)))*(-1))"
link(onResult,4287213:doConvert,[])
link(X1,1153820:Data1,[(76,46)(27,46)])
}
END_SDK
Add(GetDataEx,8621251,805,140)
{
link(Data,7439302:Text,[])
}
Add(Edit,1878423,427,252)
{
Left=230
Top=10
Width=185
Height=25
Font=[Consolas,12,0,0,0]
Text="2014-10-11 06:59:55"
Point(onMouseWheel)
Point(Position)
PColor(onMouseWheel,16755200)
link(onMouseWheel,14888266:doWork1,[(472,272)(472,228)(352,228)(352,258)])
}
Add(MultiElement,14888266,364,252)
{
link(onEvent1,1453289:doWork2,[])
link(Data1,1878423:Position,[(370,235)(477,235)(477,291)(440,291)])
link(Data2,1878423:Text,[(377,240)(407,240)(407,291)(433,291)])
}
BEGIN_SDK
Add(EditMulti,13857883,21,21)
{
EventCount=1
WorkCount=2
DataCount=2
VarCount=1
Width=363
Height=221
link(doWork1,8804284:doCalc,[(45,27)(45,125)])
link(doWork2,6260750:doConvert,[(37,34)(37,188)])
link(Var1,6260750:Result,[(27,228)(160,228)])
}
Add(DateConvertor,7892937,287,119)
{
Mode=16
Format="yyyy-MM-dd HH:mm:ss"
Point(Data)
link(onResult,13857883:onEvent1,[(327,125)(327,27)])
}
Add(DateConvertor,13506931,119,119)
{
Mode=17
Format="yyyy-MM-dd HH:mm:ss"
Point(Data)
Point(Result)
link(onResult,7224409:doOperation,[])
link(Data,9537174:Var2,[])
}
Add(Math,7224409,210,119)
{
PColor(Op2,16755285)
link(onResult,12219036:doWork2,[])
link(Op2,8804284:Result,[(223,105)(185,105)(185,162)(76,162)])
}
Add(MathParse,8804284,70,119)
{
MathStr="(((%1>=0)and(%1<=10)and(%2=120))*86400)+
(((%1>=0)and(%1<=10)and(%2=(-120)))*(-86400))+
(((%1>=11)and(%1<=13)and(%2=120))*3600)+
(((%1>=11)and(%1<=13)and(%2=(-120)))*(-3600))+
(((%1>=14)and(%1<=16)and(%2=120))*60)+
(((%1>=14)and(%1<=16)and(%2=(-120)))*(-60))+
(((%1>=17)and(%2=120))*1)+
(((%1>=17)and(%2=(-120)))*(-1))"
link(onResult,13506931:doConvert,[])
link(X1,13857883:Data1,[(76,46)(27,46)])
}
Add(Math,5935448,210,182)
{
Op2=1
link(onResult,12219036:doWork3,[(263,188)])
}
Add(HubEx,12219036,259,119)
{
link(onEvent,7892937:doConvert,[])
}
Add(DateConvertor,6260750,154,182)
{
Mode=17
Format="yyyy-MM-dd HH:mm:ss"
Point(Data)
Point(Result)
link(onResult,5935448:doOperation,[])
link(Data,9537174:Var3,[(160,103)])
}
Add(GetDataEx,9537174,119,98)
{
link(Data,13857883:Data2,[(125,39)(34,39)])
}
END_SDK
Add(Label,9720067,70,98)
{
Left=325
Top=60
Width=10
Height=28
Font=[MS Sans Serif,14,0,0,1]
Caption="-"
}
Add(Label,1535483,77,105)
{
Left=325
Top=100
Width=10
Height=28
Font=[MS Sans Serif,14,0,0,1]
Caption="-"
}
Add(Label,3924639,84,112)
{
Left=10
Top=70
Width=97
Height=17
Font=[Consolas,9,0,0,0]
Caption="Первая смена:"
}
Add(Label,11076403,91,119)
{
Left=10
Top=110
Width=100
Height=17
Font=[Consolas,9,0,0,0]
Caption="Вторая смена:"
}
Add(Label,10361591,98,126)
{
Left=120
Top=15
Width=102
Height=19
Font=[Consolas,10,0,0,0]
Caption="Текущее время:"
}
Add(Time,436736,168,161)
{
Time_Date=1
Point(DateTime)
}
Add(DateConvertor,12261307,175,210)
{
Mode=9
Format="yyyy-MM-dd HH:mm:ss"
Point(Data)
link(onResult,1453289:doWork1,[(417,216)])
link(Data,436736:DateTime,[])
}
Add(Hub,7556037,119,210)
{
link(onEvent1,12261307:doConvert,[])
link(onEvent2,15266554:doWork1,[(151,223)])
}
Add(HubEx,1453289,413,252)
{
link(onEvent,1878423:doText,[])
}
Add(MultiStrData,9179008,462,357)
{
link(onPart1,2657564:doText,[])
link(onPart2,1055105:doEvent1,[])
}
Add(Timer,12507629,70,252)
{
link(onTimer,15266554:doWork2,[])
}
карма: 1
Не так страшна ошибка, как опасность её не заметить.

0