85-250-61-54.bb.netvision писал(а):
Можно------------ Дoбавленo в 03.16:
Второй код также от Леонида поправил дядьку Tad, вернее вставил мультиэлемент от Tad сам уже
Add(MainForm,7071527,21,42)
{
Width=439
Height=302
}
Add(Time,15045631,91,84)
{
Point(DateTime)
}
Add(Edit,3974650,98,133)
{
Left=65
Top=35
Width=120
link(onChange,13113752:doEvent1,[])
link(Str,15045631:DateTime,[])
}
Add(Timer,15798354,42,133)
{
link(onTimer,3974650:doText,[])
}
Add(Label,9979472,91,42)
{
Left=15
Top=35
Width=40
Height=17
Caption="Сейчас"
}
Add(DateConvertor,5050267,175,182)
{
Point(Year)
Point(Month)
Point(Day)
Point(Hour)
Point(Minute)
Point(Second)
link(onResult,11981783:doConvert,[])
}
Add(Edit,1960085,238,133)
{
Left=190
Top=35
Width=105
link(onChange,14168219:doConvert,[])
}
Add(Edit,2757803,343,63)
{
Left=30
Top=70
Width=125
Text="22-09-2013 15:00:00"
}
Add(DateConvertor,14168219,294,133)
{
Mode=8
Point(Result)
link(onResult,13966383:doConvert,[])
}
Add(DateConvertor,13966383,343,133)
{
Mode=8
Point(Data)
Point(Result)
link(onResult,9082976:doOperation,[])
link(Data,2757803:Text,[])
}
Add(Label,7960756,98,35)
{
Left=10
Top=75
Width=17
Height=17
Caption="От"
}
Add(Label,11162798,105,28)
{
Left=95
Top=15
Width=58
Height=17
Caption="Дата Real"
}
Add(Label,6235425,112,21)
{
Left=210
Top=15
Width=58
Height=17
Caption="Дата FmtStr"
}
Add(Label,9840306,532,140)
{
Left=80
Top=135
Width=159
Height=19
Color=12639424
Font=[MS Sans Serif,8,0,255,1]
Caption=""
AutoSize=1
}
Add(Math,9082976,399,133)
{
OpType=1
link(onResult,11879575:doEvent1,[])
link(Op1,14168219:Result,[(405,124)(391,124)(391,173)(300,173)])
}
Add(DateConvertor,15268595,483,140)
{
Mode=9
link(onResult,9840306:doText,[])
}
Add(Hub,11879575,448,133)
{
link(onEvent1,7181467:doText,[(473,139)(473,97)])
link(onEvent2,15268595:doConvert,[])
}
Add(Label,7181467,532,91)
{
Left=80
Top=100
Width=160
Height=20
Color=12639424
AutoSize=1
}
Add(DateConvertor,11981783,336,182)
{
Point(Data)
Point(Year)
Point(Month)
Point(Day)
Point(Hour)
Point(Minute)
Point(Second)
link(onResult,15508543:doWork1,[(397,188)(397,365)(282,365)(282,286)])
link(Data,13966383:Result,[(342,174)(349,174)])
}
Add(Label,7278699,420,280)
{
Left=80
Top=175
Width=175
Height=57
Color=12639424
Font=[MS Sans Serif,8,0,16711680,1]
AutoSize=1
}
Add(Hub,13113752,140,133)
{
link(onEvent1,776530:doConvert,[])
link(onEvent2,5050267:doConvert,[(165,146)(165,188)])
}
Add(DateConvertor,776530,182,133)
{
Mode=9
link(onResult,1960085:doText,[])
}
Add(MultiElement,15508543,294,280)
{
@Hint=#35:Разность дат из набора целых (HInt)|
link(onEvent1,7278699:doText,[])
link(Data1,5050267:Year,[(300,252)(181,252)])
link(Data2,5050267:Month,[(307,247)(188,247)])
link(Data3,5050267:Day,[(314,242)(195,242)])
link(Data4,5050267:Hour,[(321,235)(202,235)])
link(Data5,5050267:Minute,[(328,230)(209,230)])
link(Data6,5050267:Second,[(335,225)(216,225)])
link(Data7,11981783:Year,[])
link(Data8,11981783:Month,[])
link(Data9,11981783:Day,[])
link(Data10,11981783:Hour,[])
link(Data11,11981783:Minute,[])
link(Data12,11981783:Second,[])
}
BEGIN_SDK
Add(EditMulti,11388328,21,21)
{
EventCount=1
WorkCount=1
DataCount=12
Width=517
Height=445
VOffset=100
link(doWork1,15492792:doCalc,[(32,127)(32,118)])
}
Add(MathParse,15492792,70,112)
{
MathStr="%1 - %2"
ResultType=0
link(onResult,4034126:doCalc,[])
link(X1,11388328:Data6,[(76,103)(62,103)])
link(X2,11388328:Data12,[(83,103)(104,103)])
}
Add(MathParse,4034126,119,112)
{
DataCount=3
MathStr="%1 - %2 - (%3<0)"
ResultType=0
link(onResult,9858961:doCalc,[])
link(X1,11388328:Data5,[(125,96)(55,96)])
link(X2,11388328:Data11,[(132,89)(97,89)])
}
Add(MathParse,9858961,168,112)
{
DataCount=3
MathStr="%1 - %2 - (%3<0)"
ResultType=0
link(onResult,14265988:doCalc,[])
link(X1,11388328:Data4,[(174,82)(48,82)])
link(X2,11388328:Data10,[(181,75)(90,75)])
}
Add(MathParse,14265988,217,112)
{
DataCount=3
MathStr="%1 - %2 - (%3<0)"
ResultType=0
link(onResult,10531960:doCalc,[])
link(X1,11388328:Data3,[(223,70)(41,70)])
link(X2,11388328:Data9,[(230,64)(83,64)])
}
Add(MathParse,10531960,273,112)
{
DataCount=3
MathStr="%1 - %2 - (%3<0)"
ResultType=0
link(onResult,3971648:doCalc,[])
link(X1,11388328:Data2,[(279,58)(34,58)])
link(X2,11388328:Data8,[(286,51)(76,51)])
}
Add(MathParse,3971648,329,112)
{
DataCount=3
MathStr="%1 - %2 - (%3<0)"
ResultType=0
link(onResult,2494265:doCalc,[(368,118)(368,153)(60,153)(60,167)])
link(X1,11388328:Data1,[(335,44)(27,44)])
link(X2,11388328:Data7,[(342,37)(69,37)])
}
Add(MathParse,2494265,70,161)
{
DataCount=1
MathStr="(%1 + 60) mod 60"
ResultType=0
link(onResult,1511602:doCalc,[])
link(X1,15492792:Result,[])
}
Add(FormatStr,9797754,196,420)
{
DataCount=6
Mask="%6 %5 %4 %3 %2 %1"
link(onFString,11388328:onEvent1,[(499,432)(499,127)])
link(Str1,9406819:Var,[(202,338)(76,338)])
link(Str2,10930018:Var,[(209,338)(125,338)])
link(Str3,15539660:Var,[(216,338)(174,338)])
link(Str4,3078774:Var,[])
link(Str5,9914236:Var,[(230,338)(279,338)])
link(Str6,12071010:Var,[(237,282)(335,282)])
}
Add(MathParse,1511602,119,161)
{
DataCount=1
MathStr="(%1 + 60) mod 60"
ResultType=0
link(onResult,4617103:doCalc,[])
link(X1,4034126:Result,[])
}
Add(MathParse,4617103,168,161)
{
DataCount=1
MathStr="(%1 + 24) mod 24"
ResultType=0
link(onResult,12733111:doCalc,[])
link(X1,9858961:Result,[])
}
Add(MathParse,12733111,217,161)
{
DataCount=1
MathStr="(%1 + 31) mod 31"
ResultType=0
link(onResult,10836643:doCalc,[])
link(X1,14265988:Result,[])
}
Add(MathParse,10836643,273,161)
{
DataCount=1
MathStr="(%1 + 12) mod 12"
ResultType=0
link(onResult,9406819:doConvert,[(318,167)(318,210)(58,210)(58,230)])
link(X1,10531960:Result,[])
}
Add(ConvertorEx,12071010,329,224)
{
Mode=14
Word_1="рiк"
Word_2="роки"
Word_5="рокiв"
link(onResult,9797754:doString,[(376,230)(376,311)(184,311)(184,426)])
link(Data,3971648:Result,[])
}
Add(ConvertorEx,3078774,217,224)
{
Mode=14
Word_1="день"
Word_2="днi"
Word_5="днiв"
link(onResult,9914236:doConvert,[])
link(Data,12733111:Result,[])
}
Add(ConvertorEx,9914236,273,224)
{
Mode=14
Word_1="мiсяць"
Word_2="мiсяцi"
Word_5="мiсяцiв"
link(onResult,12071010:doConvert,[])
link(Data,10836643:Result,[])
}
Add(ConvertorEx,15539660,168,224)
{
Mode=14
Word_1="година"
Word_2="години"
Word_5="годин"
link(onResult,3078774:doConvert,[])
link(Data,4617103:Result,[])
}
Add(ConvertorEx,10930018,119,224)
{
Mode=14
Word_1="хвилина"
Word_2="хвилини"
Word_5="хвилин"
link(onResult,15539660:doConvert,[])
link(Data,1511602:Result,[])
}
Add(ConvertorEx,9406819,70,224)
{
Mode=14
Word_1="секунда"
Word_2="секунди"
Word_5="секунд"
link(onResult,10930018:doConvert,[])
link(Data,2494265:Result,[])
}
END_SDK