Вверх ↑
Ответов: 16884
Рейтинг: 1239
#1: 2011-12-19 01:27:46 ЛС | профиль | цитата
Zn= (Trunc(DateReal на 1-е число месяца) mod 60) + 14
If Zn>=60 then Zn= Zn-60
------------ Дoбавленo в 01.27:
Add(MainForm,2953706,70,105)
{
Width=305
Height=148
link(onCreate,11524923:doWork2,[])
}
Add(ChildGroupBox,11524923,140,112)
{
}
BEGIN_SDK
Add(EditMulti,7641063,21,21)
{
EventCount=1
WorkCount=2
VarCount=1
Width=524
Height=389
HOffset=189
link(doWork1,11069262:doConvert,[])
link(doWork2,11954632:doEvent1,[(31,34)(31,160)])
link(Var1,435627:GetData,[])
}
Add(GroupBox,9149858,42,266)
{
Width=234
Height=45
Caption="--- Год ---------- Месяц ----------- День ----- Сброс "
}
Add(ComboBox,7898108,210,161)
{
Left=10
Top=15
Height=21
Text=""
Point(EditText)
Point(doSelect)
Point(doSelectString)
link(onClick,5434630:doEvent1,[(254,174)(254,157)(350,157)(350,167)])
}
Add(ComboBox,1714071,301,161)
{
Left=66
Top=15
Width=75
Height=21
Strings=#0:|6:января|7:февраля|5:марта|6:апреля|3:мая|4:июня|4:июля|7:августа|8:сентября|7:октября|6:ноября|7:декабря|0:|
Text=""
ReadOnly=0
Point(EditText)
Point(Index)
Point(doSelect)
link(onClick,5434630:doEvent2,[])
}
Add(ComboBox,12280000,448,273)
{
Left=143
Top=15
Width=45
Height=21
Text=""
ReadOnly=0
Point(EditText)
Point(doSelect)
}
Add(Button,12356002,42,203)
{
Left=190
Top=15
Width=35
TabOrder=-1
Caption="х"
Data=Integer(0)
link(onClick,10032148:doEvent1,[])
}
Add(InlineCode,14207354,315,273)
{
WorkPoints=#6:doTest|
EventPoints=#3:Day|4:Mess|
DataPoints=#4:Year|5:Month|
Code=#15:unit HiAsmUnit;|12:// Autor Tad|0:|9:interface|0:|21:uses kol,Share,Debug;|0:|4:type|28: THiAsmClass = class(TDebug)|10: private|0:|9: public|33: Month,Year,Day,Mess:THI_Event;|49: Procedure doTest(var _Data:TData; Index:Word);|0:|5: end;|0:|14:implementation|29:Procedure THiAsmClass.doTest;|24: var Y, M, i, d, f:word;|15: s:string; |15:Label brk; |5:begin|6: f:=0;|25: Y:=toIntegerEvent(Year);|23: If Y=0 then GOTO brk;|26: M:=toIntegerEvent(Month);|23: If M=0 then GOTO brk;|7: f:=1; |9: d := 31;|10: Case M of|41: 2: d := 28 + ord(IsLeapYear(Y));|20: 4,6,9,11: d := 30;|6: end; |19: for i:=1 to d do |9: begin|19: s:=int2Str(i);|28: If i<10 then s:='0'+s; |24: _hi_onEvent(day,s);|8: end;|26:brk: _hi_onEvent(Mess,f);|4:end;|4:end.|
link(Day,4559508:doEvent1,[])
link(Mess,7641063:onEvent1,[(362,286)(362,27)])
link(Year,5568946:Var3,[(321,257)])
link(Month,13961898:Var2,[])
}
Add(DateConvertor,11069262,126,21)
{
Point(Year)
Point(Month)
Point(Day)
link(onResult,15695536:doEvent1,[(170,27)(170,67)(43,67)(43,76)])
}
Add(Hub,10032148,133,203)
{
OutCount=4
link(onEvent1,7898108:doSelect,[])
link(onEvent2,8886608:doWork2,[(172,216)(172,223)])
link(onEvent3,3305590:doWork2,[(165,223)(165,251)])
link(onEvent4,9896636:doWork3,[(158,230)(158,295)(298,295)])
}
Add(Hub,5434630,357,161)
{
InCount=2
link(onEvent1,3305590:doWork1,[(389,167)])
link(onEvent2,9896636:doWork1,[(383,174)(383,226)(298,226)])
}
Add(HubEx,3305590,385,245)
{
link(onEvent,12280000:doClear,[(439,251)(439,286)])
}
Add(DoData,10532748,126,112)
{
link(onEventData,7898108:doSelectString,[(189,118)(189,216)])
link(Data,11069262:Year,[])
}
Add(DoData,342124,133,70)
{
link(onEventData,8886608:doWork1,[(179,76)])
link(Data,11069262:Month,[])
}
Add(DoData,16588820,406,315)
{
link(onEventData,12280000:doSelect,[])
link(Data,11069262:Day,[(412,63)(146,63)])
}
Add(HubEx,8886608,175,217)
{
link(onEvent,1714071:doSelect,[(288,223)(288,209)])
}
Add(Hub,15695536,56,70)
{
OutCount=3
link(onEvent1,342124:doData,[])
link(onEvent2,10532748:doData,[(112,83)(112,118)])
link(onEvent3,9896636:doWork2,[(105,90)(105,279)])
}
Add(Hub,4559508,378,273)
{
link(onEvent1,12280000:doAdd,[])
link(onEvent2,16588820:doData,[(399,286)(399,321)])
}
Add(For,14665532,126,161)
{
Start=1900
End=2100
link(onEvent,771734:doWork2,[])
}
Add(HubEx,9896636,294,273)
{
link(onEvent,14207354:doTest,[])
}
Add(Hub,11954632,42,154)
{
link(onEvent1,5957290:doData,[])
link(onEvent2,14665532:doFor,[])
}
Add(DoData,5957290,70,154)
{
Data=String()
link(onEventData,771734:doWork1,[(172,160)])
}
Add(HubEx,771734,168,161)
{
link(onEvent,7898108:doAdd,[])
}
Add(DateConvertor,8676298,308,350)
{
Mode=8
Format="yyyy-MM-dd"
Point(Data)
link(onResult,435627:doData,[(350,356)(350,389)(198,389)(198,356)])
}
Add(GetDataEx,5568946,259,252)
{
Angle=3
link(Data,7898108:EditText,[(230,257)])
}
Add(GetDataEx,13961898,322,231)
{
link(Data,1714071:Index,[])
}
Add(EventFromData,435627,210,350)
{
link(onEvent,15809865:doString,[])
}
Add(FormatStr,15809865,259,350)
{
DataCount=3
Mask="%1-%2-%3"
Point(FString)
link(onFString,8676298:doConvert,[])
link(Str1,5568946:Var2,[])
link(Str2,13961898:Var1,[(272,236)])
link(Str3,12280000:EditText,[(279,338)(468,338)])
}
END_SDK
Add(Button,2032775,70,175)
{
Left=5
Top=70
Caption="Счет"
link(onClick,4400874:doOperation,[])
}
Add(Label,9018408,406,175)
{
Left=225
Top=75
}
Add(Math,4400874,140,175)
{
OpType=8
ResultType=0
link(onResult,15261910:doOperation,[])
link(Op1,11524923:Var1,[])
link(Op2,1362054:Text,[(153,152)(188,152)])
}
Add(Edit,1362054,182,112)
{
Left=85
Top=70
Text="60"
}
Add(Math,15261910,189,175)
{
Op2=14
ResultType=0
link(onResult,12327865:doCompare,[])
}
Add(If_else,12327865,259,175)
{
Type=4
Op2=Integer(60)
link(onTrue,4033361:doOperation,[])
link(onFalse,14114298:doWork3,[(382,188)])
}
Add(Math,4033361,329,175)
{
OpType=1
Op2=60
ResultType=0
link(onResult,14114298:doWork2,[])
}
Add(HubEx,14114298,378,175)
{
link(onEvent,9018408:doText,[])
}


карма: 25
Немного терпения! Дежурный экстрасенс скоро свяжется с Вами!
2
Голосовали:nesco, 10755