Была похожая задача.
Вот мое решение.
Add(MainForm,6407720,84,70) { Width=565 } Add(DatePicker,721072,532,203) { Left=115 Top=30 Width=130 Height=21 TabOrder=-1 Ctl3D=0 WinStyle=1 Hint="Открыть календарь" Point(doWidth) link(onChange,13420483:doConvert,[]) } Add(Edit,261028,539,126) { Left=115 Top=30 Width=100 Height=21 Ctl3D=1 Hint="Ввод даты" Text="" MaxLenField=10 ClearAfterEnter=1 Point(Position) Point(onKeyDown) Point(doWidth) Point(doPosition) Point(doFont) link(onChange,4261495:doWork2,[]) link(onEnter,4261495:doWork3,[(585,139)]) link(onKeyDown,2339969:doKeyDown,[]) } Add(HubEx,4261495,581,126) { link(onEvent,2339969:doInput,[]) } Add(HubEx,10349940,518,133) { link(onEvent,261028:doText2,[]) } Add(Hub,3251010,413,140) { link(onEvent1,12343263:doOperation,[]) link(onEvent2,721072:doWidth,[(445,153)(445,216)]) } Add(Math,12343263,462,140) { OpType=1 Op2=30 link(onResult,261028:doWidth,[]) } Add(Hub,4435396,308,133) { link(onEvent1,10349940:doWork2,[]) link(onEvent2,7547933:doWork2,[]) } Add(DateConvertor,12555827,357,140) { Mode=8 Format="dd.MM.yyyy" link(onResult,721072:doSetDate,[(402,146)(402,209)]) } Add(DateConvertor,13420483,574,203) { Mode=9 Format="dd.MM.yyyy" link(onResult,6219271:doCompare,[]) } Add(If_else,6219271,616,203) { Type=5 Op2=String() link(onTrue,261028:doText,[(674,209)(674,107)(530,107)(530,132)]) } Add(Hub,9285077,686,133) { link(onEvent1,14165998:doText,[]) link(onEvent2,7547933:doWork3,[(706,146)(706,244)(340,244)]) } Add(HubEx,7547933,336,140) { link(onEvent,12555827:doConvert,[]) } Add(MultiElementEx,2339969,616,126) { @Hint=#16:маска ввода даты| link(onText2,10349940:doWork1,[(662,132)(662,97)(522,97)]) link(onGutRezult,9285077:doEvent1,[]) link(onPosition,261028:doPosition,[(667,146)(667,189)(519,189)(519,153)]) link(onFont,261028:doFont,[(660,153)(660,179)(527,179)(527,160)]) link(Data,261028:Position,[(622,113)(592,113)(592,171)(552,171)]) } BEGIN_SDK Add(EditMultiEx,1081633,14,21) { WorkCount=#7:doInput|7:doReset|9:doKeyDown| EventCount=#7:onText2|11:onGutRezult|10:onPosition|6:onFont| DataCount=#4:Data| Width=860 Height=438 link(doInput,12803965:doEvent1,[(189,27)(189,69)]) link(doReset,15929343:doEvent1,[(60,34)(60,41)]) link(doKeyDown,8903723:doCompare,[(35,41)(35,258)]) } Add(Hub,12803965,203,63) { InCount=2 OutCount=8 link(onEvent1,3467017:doWork2,[(257,69)(257,62)]) link(onEvent2,233965:doClear,[]) link(onEvent3,4062207:doEnum,[]) link(onEvent4,7490749:doEnum,[(255,90)(255,167)]) link(onEvent5,4072989:doCompare,[(255,97)(255,244)]) link(onEvent6,16392028:doData,[(255,104)(255,293)]) link(onEvent7,16306630:doEvent,[(255,111)(255,328)]) link(onEvent8,10146454:doCompare,[(255,118)(255,405)]) } Add(Str_Enum,4062207,294,77) { Delimiter="" To=10 OnlyDivGroup=1 link(onEnum,14752671:doCompare,[]) } Add(StrMask,14752671,343,77) { Mask="#" link(onTrue,233965:doStrCat,[(388,90)(388,69)]) } Add(StrCat,233965,413,63) { Point(doClear) link(Str1,7380689:Var3,[(419,51)(405,51)]) } Add(StrCat,4424312,784,49) { Point(doClear) link(Str1,14918047:Var1,[(790,30)(778,30)(778,89)]) } Add(DoData,16392028,784,287) { link(onEventData,1081633:onText2,[(829,293)(829,27)]) link(Data,3114304:Var2,[]) } Add(If_else,8903723,105,252) { Type=5 Op2=Integer(8) link(onTrue,4516473:doWork1,[]) link(onFalse,4516473:doWork2,[]) } Add(ChanelToIndex,4516473,154,252) { link(onIndex,13320449:doValue,[]) } Add(Memory,13320449,203,252) { } Add(Str_Enum,7490749,294,161) { Delimiter="" OnlyDivGroup=1 link(onEnum,1377888:doEvent1,[]) link(String,11839973:Var2,[]) } Add(GetDataEx,7380689,399,119) { Angle=1 link(Data,233965:Result,[(419,124)]) } Add(If_else,12909225,483,168) { Op2=Integer(2) link(onTrue,4326720:doEvent1,[]) link(onFalse,8274391:doCompare,[]) link(Op1,3409719:Var2,[]) } Add(GetDataEx,14918047,784,84) { link(Data,4424312:Result,[]) } Add(For,15662196,343,238) { End=4 link(onEvent,10346049:doData,[]) link(Start,1347130:Var2,[]) } Add(DoData,10346049,399,238) { Data=String( ) link(onEventData,8481896:doEvent1,[]) } Add(If_else,12141159,483,245) { Op2=Integer(2) link(onTrue,4326720:doEvent3,[(577,251)(577,188)]) link(onFalse,7253235:doCompare,[]) link(Op1,2006219:Var2,[]) } Add(If_else,7253235,532,252) { Op2=Integer(4) link(onTrue,4326720:doEvent4,[(590,258)(590,195)]) link(Op1,2006219:Var3,[(538,222)]) } Add(GetDataEx,2006219,483,217) { Angle=3 link(Data,15662196:Position,[(389,222)(389,283)(349,283)]) } Add(If_else,7044096,350,322) { Op2=Integer(2) link(onTrue,13159679:doEvent1,[]) link(onFalse,14426155:doCompare,[]) link(Op1,5692967:Var2,[]) } Add(If_else,14426155,406,329) { Op2=Integer(3) link(onTrue,13159679:doEvent2,[]) link(onFalse,9789227:doCompare,[]) link(Op1,10344292:Var2,[]) } Add(GetDataEx,5692967,350,301) { Angle=3 link(Data,1081633:Data,[(20,306)]) } Add(IndexToChanel,16306630,294,322) { Count=1 Point(Index) link(onEvent1,7044096:doCompare,[]) link(Index,13320449:Value,[(300,316)(209,316)]) } Add(Math,12621925,609,322) { Op2=1 link(onResult,2886541:doWork3,[(837,328)]) link(Op1,10806779:Var3,[(615,306)]) } Add(GetDataEx,10344292,406,301) { Angle=3 link(Data,5692967:Var3,[]) } Add(DoData,12234526,651,168) { Data=String(.) link(onEventData,15189750:doEvent2,[]) } Add(If_else,9789227,462,336) { Op2=Integer(5) link(onTrue,13159679:doEvent3,[]) link(onFalse,3834635:doCompare,[]) link(Op1,11994705:Var2,[]) } Add(If_else,3834635,518,343) { Op2=Integer(6) link(onTrue,13159679:doEvent4,[]) link(Op1,10806779:Var2,[]) } Add(GetDataEx,11994705,462,301) { Angle=3 link(Data,10344292:Var3,[]) } Add(GetDataEx,10806779,518,301) { Angle=3 link(Data,11994705:Var3,[]) } Add(Hub,1377888,448,161) { link(onEvent1,15189750:doEvent1,[]) link(onEvent2,12909225:doCompare,[]) } Add(If_else,8274391,532,175) { Op2=Integer(4) link(onTrue,4326720:doEvent2,[]) link(Op1,3409719:Var3,[(538,145)]) } Add(If_else,4072989,294,238) { Type=1 Op2=Integer(5) link(onTrue,15662196:doFor,[]) link(Op1,15484514:Var2,[]) } Add(Hub,4326720,616,168) { InCount=4 OutCount=1 link(onEvent1,12234526:doData,[]) } Add(Hub,15189750,728,161) { InCount=3 OutCount=1 link(onEvent1,4424312:doStrCat,[(749,167)(749,55)]) } Add(Hub,8481896,448,238) { link(onEvent1,15189750:doEvent3,[(694,244)(694,181)]) link(onEvent2,12141159:doCompare,[]) } Add(GetDataEx,15484514,294,210) { link(Data,7490749:NumSubStr,[]) } Add(GetDataEx,1347130,343,210) { Angle=3 link(Data,15484514:Var3,[]) } Add(GetDataEx,3409719,483,140) { Angle=3 link(Data,1347130:Var1,[(349,145)]) } Add(Hub,13159679,574,322) { InCount=4 OutCount=1 link(onEvent1,12621925:doOperation,[]) } Add(Hub,15929343,105,35) { link(onEvent1,11416857:doData,[]) link(onEvent2,12803965:doEvent2,[(126,48)(126,76)]) } Add(DoData,11416857,140,35) { Data=Integer(0) link(onEventData,2886541:doWork2,[]) } Add(HubEx,2886541,833,35) { link(onEvent,1081633:onPosition,[]) } Add(DateConvertor,5461464,350,406) { Mode=8 Format="dd.MM.yyyy" Point(Data) link(onResult,5372633:doConvert,[]) link(Data,10970425:Var1,[(356,383)]) } Add(GetDataEx,3114304,784,266) { link(Data,14918047:Var2,[]) } Add(DateConvertor,5372633,399,406) { Mode=9 Format="dd.MM.yyyy" Point(Data) link(onResult,3555773:doCompare,[]) } Add(If_else,3555773,448,406) { Type=5 Op2=String() link(onTrue,4864256:doEvent2,[]) link(onFalse,5717193:doFont,[]) } Add(Font,5717193,532,413) { Font=[MS Sans Serif,8,0,255,1] link(onFont,5794994:doEvent2,[]) } Add(Font,2872068,581,406) { link(onFont,5794994:doEvent1,[]) } Add(DoData,12076524,672,399) { link(onEventData,1081633:onGutRezult,[(844,405)(844,34)]) link(Data,10970425:Var2,[]) } Add(Hub,4864256,504,399) { InCount=2 link(onEvent1,12076524:doData,[]) link(onEvent2,2872068:doFont,[]) } Add(If_else,10146454,273,399) { Op2=String() link(onTrue,4445699:doEvent1,[(313,405)(313,398)]) link(onFalse,5461464:doConvert,[]) link(Op1,11839973:Var1,[(279,124)]) } Add(GetDataEx,11839973,294,119) { Angle=1 link(Data,7380689:Var1,[]) } Add(Hub,5794994,637,406) { InCount=2 OutCount=1 link(onEvent1,1081633:onFont,[(852,412)(852,48)]) } Add(GetDataEx,10970425,672,378) { link(Data,3114304:Var1,[(678,271)]) } Add(Hub,4445699,322,392) { link(onEvent1,3467017:doWork3,[(760,398)]) link(onEvent2,4864256:doEvent1,[]) } Add(HubEx,3467017,756,56) { link(onEvent,4424312:doClear,[]) } END_SDK Add(Button,16323730,175,133) { Left=15 Top=5 Width=80 Caption="Установить" link(onClick,14108317:doData,[]) } Add(Button,9220958,168,42) { Left=15 Top=30 Width=80 Caption="Очистить" link(onClick,2339969:doReset,[(602,48)(602,139)]) } Add(Label,14165998,749,133) { Left=280 Top=35 Width=56 Height=17 Caption="Результат" } Add(Edit,11830178,231,70) { Left=115 Top=5 Width=100 Text="01.06.1974" } Add(DoData,14108317,231,133) { link(onEventData,4435396:doEvent1,[]) link(Data,11830178:Text,[]) } Add(StyleXP,6930373,84,119) { }
|