Тогда прийдется наверное так.
Add(MainForm,10452067,231,217) { Width=580 Height=572 Color=16777215 BorderStyle=1 Position=1 Point(onPaint) Point(Width) Point(Height) link(onCreate,5036761:doWork1,[]) link(onPaint,13105597:doValue,[]) } Add(MultiElementEx,13955934,441,252) { link(onEvent5,10461321:FirstDay,[(485,258)(485,181)]) link(onEvent6,16023199:doFor,[]) link(onEvent7,705410:doCompare,[]) link(Bitmap,5018142:getVar,[]) } BEGIN_SDK Add(EditMultiEx,14557913,21,21) { WorkCount=#5:doFor| EventCount=#8:onEvent5|8:onEvent6|8:onEvent7| VarCount=#8:Position|4:Var3| DataCount=#6:Bitmap| Width=384 Height=151 link(doFor,8088057:doEnum,[(21,104)]) link(Position,8109426:Var1,[(27,142)]) link(Var3,13695372:Result,[(251,172)]) } Add(StrList,15854652,35,35) { @Hint=#16:Названия месяцев| Strings=#6:Январь|7:Февраль|4:Март|6:Апрель|3:Май|4:Июнь|4:Июль|6:Август|8:Сентябрь|7:Октябрь|6:Ноябрь|7:Декабрь| } Add(GlobalVar,4075127,203,28) { Name="MonthDX" Data=Integer(150) } Add(GlobalVar,1683346,252,49) { Name="MonthDY" Data=Integer(135) } Add(Img_Text,4462864,301,98) { DrawSource=2 Font=[MS Sans Serif,12,1,255,1] Text="Привет" Point(Y) Point(X) link(Bitmap,14557913:Bitmap,[(307,21)]) link(Text,8088057:Item,[(314,86)(290,86)(290,150)(55,150)]) link(X,10250770:Result,[(328,77)(283,77)(283,143)(202,143)]) } Add(MathParse,10250770,196,98) { @Hint=#12:Вычисление Х| MathStr="%1 mod 3 * %2 + 40" link(onResult,13695372:doCalc,[]) link(X2,4075127:Var,[]) } Add(ArrayEnum,8088057,49,98) { link(onItem,10285818:doData,[]) link(Array,15854652:Array,[]) } Add(Hub,12816700,147,98) { OutCount=4 link(onEvent1,10250770:doCalc,[]) link(onEvent2,14557913:onEvent5,[(344,111)(344,27)]) link(onEvent3,14557913:onEvent6,[(352,118)(352,34)]) link(onEvent4,14557913:onEvent7,[(364,125)(364,41)]) } Add(MathParse,13695372,245,98) { @Hint=#12:Вычисление Y| MathStr="%1 div 3 * %2" link(onResult,4462864:doDraw,[]) link(X1,3027878:Var3,[(251,86)]) link(X2,1683346:Var,[]) } Add(GetDataEx,8109426,49,133) { link(Data,8088057:Index,[]) } Add(DoData,10285818,98,98) { link(onEventData,12816700:doEvent1,[]) link(Data,3027878:Var2,[]) } Add(GetDataEx,3027878,91,77) { Angle=3 link(Data,8109426:Var3,[(89,86)(89,142)]) } END_SDK Add(MultiElementEx,16023199,518,259) { @Hint=#20:Печать названий дней| link(X3,13955934:Var3,[(524,246)(497,246)(497,295)(454,295)]) link(Bitmap,12382035:getVar,[]) link(X1,10154595:getVar,[]) } BEGIN_SDK Add(EditMultiEx,960457,21,21) { WorkCount=#5:doFor| VarCount=#8:Position| DataCount=#2:X3|6:Bitmap|2:X1| Width=356 Height=263 link(doFor,15168151:doEnum,[(21,111)]) link(Position,5039922:Var1,[(27,149)]) } Add(StrList,11365246,56,49) { @Hint=#28:Список названий дней недели | Strings=#2:Пн|2:Вт|2:Ср|2:Чт|2:Пт|2:Сб|2:Вс| } Add(GlobalVar,15848507,189,42) { Name="DayDY" Data=Integer(15) } Add(GlobalVar,9429041,203,63) { Name="MonthH" Data=Integer(20) } Add(MathParse,13367576,126,105) { @Hint=#12:Вычисление Х| MathStr="%1 mod 3 * %2 + 5" link(onResult,3987141:doCalc,[]) link(X1,960457:X1,[(132,21)]) link(X2,11260849:Var,[]) } Add(MathParse,3987141,182,105) { DataCount=4 MathStr="%1 mod 7 * %2 + %3 + %4" link(onResult,15547895:doCompare,[(226,111)(226,160)(86,160)(86,209)]) link(X1,5039922:Var3,[(188,94)(113,94)(113,149)]) link(X2,15848507:Var,[]) link(X3,960457:X3,[(202,36)(27,36)]) link(X4,9429041:Var,[]) } Add(Img_Text,12399398,245,105) { DrawSource=2 Font=[Courier,8,0,16711680,204] Point(Y) Point(X) Point(doFont) link(Bitmap,4275305:Var2,[]) link(Text,9774419:Var3,[(258,85)(292,85)(292,156)]) link(X,11868239:Var3,[(272,93)(283,93)(283,149)]) } Add(ArrayEnum,15168151,70,105) { link(onItem,13367576:doCalc,[]) link(Array,11365246:Array,[]) } Add(GetDataEx,5039922,70,140) { link(Data,15168151:Index,[]) } Add(GlobalVar,11260849,133,63) { Name="MonthDX" Data=Integer(150) } Add(Img_Text,260959,294,210) { DrawSource=2 Font=[Courier,8,0,255,204] Point(Y) Point(X) Point(doFont) link(Bitmap,4275305:Var3,[(300,44)]) link(Text,9774419:Var2,[(307,185)(167,185)]) link(Y,3987141:Result,[(314,174)(188,174)]) link(X,11868239:Var2,[(321,168)(216,168)]) } Add(GetDataEx,4275305,238,35) { link(Data,960457:Bitmap,[(251,30)(34,30)]) } Add(GetDataEx,11868239,203,140) { Angle=3 link(Data,13367576:Result,[(132,149)]) } Add(GetDataEx,9774419,154,147) { Angle=3 link(Data,15168151:Item,[(76,156)]) } Add(If_else,15547895,98,203) { Type=5 Op2=Integer(6) link(onTrue,12399398:doDraw,[(234,209)(234,111)]) link(onFalse,260959:doDraw,[]) link(Op1,5039922:Var2,[(104,178)(83,178)]) } END_SDK Add(FormatStr,5479317,175,217) { Mask="Календарь на %1-й год." link(onFString,10452067:doCaption,[]) link(Str1,7170063:getVar,[]) } Add(LineBreakEx,7170063,175,182) { Caption="W_Year" Type=2 } Add(MultiElementEx,705410,609,266) { @Hint=#19:Печать чисел месяца| link(Bitmap,9444561:getVar,[]) link(Data,12178162:getVar,[]) } BEGIN_SDK Add(EditMultiEx,1390549,21,21) { WorkCount=#9:doCompare| DataCount=#6:Bitmap|4:Data| Width=755 Height=312 link(doCompare,14635507:doCompare,[(21,153)]) } Add(GlobalVar,16450382,308,70) { Name="DayDX" Data=Integer(20) } Add(StrList,5790042,189,91) { @Hint=#16:Названия месяцев| Strings=#2:31|2:28|2:31|2:30|2:31|2:30|2:31|2:31|2:30|2:31|2:30|2:31|2:29| } Add(For,1651522,252,154) { Start=1 InData=0 link(onEvent,10629540:doCalc,[]) } Add(ArrayRW,8740689,203,154) { link(onRead,1651522:doFor,[]) link(Array,5790042:Array,[]) } Add(If_else,7724961,84,161) { @Hint=#22:Если не высокосный год| Type=5 Op2=Integer(1) link(onTrue,14090576:doWork3,[(130,167)]) link(onFalse,15422474:doData,[]) link(Op1,9554240:Var,[]) } Add(DoData,15422474,133,168) { Data=Integer(12) link(onEventData,11541037:doWork3,[(179,174)]) } Add(HubEx,11541037,175,147) { link(onEvent,8740689:doRead,[]) } Add(GlobalVar,9554240,84,112) { Name="LeapYear" } Add(Img_Text,10031858,595,217) { DrawSource=2 Font=[Courier,10,0,0,204] Point(Y) Point(X) link(onDraw,16105824:doWork2,[]) link(Bitmap,11562297:Var2,[]) link(Y,16101173:Var2,[]) link(X,3558433:Var2,[]) } Add(MathParse,10629540,301,154) { DataCount=5 MathStr="(%1 div 7 * %2) + (%3 mod 3 * %4) + %5 +10" link(onResult,8048449:doCalc,[]) link(X1,10358289:Var2,[]) link(X2,16450382:Var,[]) link(X3,3015870:Var2,[]) link(X4,4531473:Var,[]) link(X5,12447479:Var,[]) } Add(MathParse,8048449,378,154) { DataCount=5 MathStr="( %1 mod 7 ) * %2 + (%3 div 3 )* %4 + %5" link(onResult,11318913:doCalc,[(428,160)(428,272)]) link(X1,10358289:Var3,[(384,142)]) link(X2,10891721:Var,[]) link(X3,3015870:Var3,[(398,135)]) link(X4,11110742:Var,[]) link(X5,4733996:Var,[]) } Add(HubEx,14090576,126,147) { link(onEvent,11541037:doWork2,[]) } Add(GlobalVar,4531473,322,91) { Name="MonthDX" Data=Integer(150) } Add(GlobalVar,12447479,329,112) { Name="DayDX" Data=Integer(20) } Add(GlobalVar,11365643,301,49) { Name="FirstDay" } Add(Convertor,14022728,490,266) { SymbolFill=" " link(onResult,14124293:doCompare,[]) link(Data,1651522:Position,[(496,204)(258,204)]) } Add(GlobalVar,10891721,385,49) { Name="DayDY" Data=Integer(15) } Add(GlobalVar,11110742,399,70) { Name="MonthDY" Data=Integer(135) } Add(GlobalVar,4733996,406,91) { Name="MonthH" Data=Integer(20) } Add(Math,3143886,700,217) { Op2=1 ResultType=0 link(onResult,14789831:doValue,[(744,223)(744,209)(688,209)(688,195)]) link(Op1,14789831:Var,[]) } Add(GlobalVar,14789831,700,189) { Name="FirstDay" } Add(GetDataEx,10358289,294,133) { link(Data,11365643:Var,[]) } Add(GetDataEx,3015870,308,126) { Angle=3 link(Data,2482092:Var3,[]) } Add(If_else,14635507,35,154) { @Hint=#15:Если не февраль| Type=5 Op2=Integer(1) link(onTrue,14090576:doWork2,[]) link(onFalse,7724961:doCompare,[]) link(Op1,2482092:Var2,[]) } Add(GetDataEx,2482092,28,126) { Angle=3 link(Data,1390549:Data,[(34,135)]) } Add(Img_Text,11808414,637,273) { DrawSource=2 Font=[Courier,10,0,255,204] Point(Y) Point(X) link(onDraw,16105824:doWork3,[(683,279)]) link(Bitmap,11562297:Var1,[(643,93)]) link(Y,16101173:Var3,[(657,191)]) link(X,3558433:Var1,[(664,181)(622,181)]) } Add(If_else,14124293,539,266) { Type=5 Op2=Integer(0) link(onTrue,10031858:doDraw,[(583,272)(583,223)]) link(onFalse,11808414:doDraw,[]) link(Op1,11318913:Result,[(545,254)(530,254)(530,309)(447,309)]) } Add(GetDataEx,11562297,588,84) { link(Data,1390549:Bitmap,[(601,54)(27,54)]) } Add(GlobalVar,5300033,441,238) { Name="FirstDay" } Add(MathParse,11318913,441,266) { DataCount=1 MathStr="(%1+1) mod 7" link(onResult,14022728:doConvert,[]) link(X1,5300033:Var,[]) } Add(GetDataEx,3558433,609,189) { Angle=3 link(Data,10629540:Result,[(307,198)]) } Add(GetDataEx,16101173,602,182) { Angle=3 link(Data,8048449:Result,[(384,191)]) } Add(HubEx,16105824,679,210) { link(onEvent,3143886:doOperation,[]) } END_SDK Add(LineBreakEx,12178162,616,231) { Caption="W_Month" Type=2 } Add(Hub,10611969,378,238) { OutCount=3 link(onEvent1,5479317:doString,[(422,244)(422,174)(163,174)(163,223)]) link(onEvent2,10461321:LeapYear,[(430,251)(430,174)]) link(onEvent3,13955934:doFor,[]) } Add(LineBreakEx,11383682,280,308) { Caption="W_Year" Type=3 link(_Data,5036761:Var1,[]) } Add(ChildGroupBox,5036761,280,231) { } BEGIN_SDK Add(EditMulti,14916205,21,21) { WorkCount=1 VarCount=1 Width=230 Height=95 link(doWork1,13875363:doFor,[(93,27)(93,55)]) link(Var1,13984710:EditText,[(181,116)]) } Add(GroupBox,1812660,42,49) { Left=460 Top=20 Width=94 Height=74 Color=-16777197 Caption="Выбор года" Point(doVisible) } Add(ComboBox,13984710,154,49) { Left=10 Top=30 Width=75 Height=21 Text="2008" DataType=1 Point(EditText) } Add(For,13875363,105,49) { Start=1950 End=2050 link(onEvent,13984710:doAdd,[]) } END_SDK Add(LineBreakEx,15867331,518,119) { Caption="W_Year" Type=2 } Add(InlineCode,10461321,518,168) { @Hint=#12:Определение:|19:1. Высокосного года|35:2. Дня недели для 1-го числа месяца| WorkPoints=#8:LeapYear|8:FirstDay| EventPoints=#3:ev1|3:ev2| DataPoints=#5:rYear|6:rMonth| Code=#15:unit HiAsmUnit;|0:|9:interface|0:|21:uses kol,Share,Debug;|0:|4:type|28: THiAsmClass = class(TDebug)|10: private|0:|9: public|19: rYear:THI_Event;|20: rMonth:THI_Event;|21: ev1,ev2:THI_event;|51: procedure FirstDay(var _Data:TData; Index:Word);|51: procedure LeapYear(var _Data:TData; Index:Word);|5: end;|0:|14:implementation|0:|31:procedure THiAsmClass.firstDay;|3:var|24: mYear,mmonth,d:integer;|14: ss:TDateTime;|5:begin|36: mYear := ReadInteger(_Data,rYear);|40: mmonth := ReadInteger(_Data,rMonth); |34: EncodeDate(mYear,mmonth+1,1,ss);|22: d:=DayOfWeek(ss)-1; |26: if d < 0 then inc(d, 7);|21: _hi_OnEvent(ev2,d);|0:|4:end;|0:|31:procedure THiAsmClass.LeapYear;|20:var mYear,N:integer;|5:begin|36: mYear := ReadInteger(_Data,rYear);|29: N:= ord(IsLeapYear(myear));|21: _hi_OnEvent(ev1,N); |6:end; |4:end.| link(ev1,16012046:doValue,[(580,174)(580,160)]) link(ev2,12506770:doValue,[]) link(rYear,15867331:getVar,[]) link(rMonth,2391732:getVar,[]) } Add(LineBreakEx,7005018,518,308) { Caption="W_Day" Type=3 link(_Data,16023199:Position,[]) } Add(GlobalVar,12506770,609,175) { Name="FirstDay" Data=Integer(1) } Add(LineBreakEx,9444561,609,210) { Caption="obHandle" Type=2 } Add(LineBreakEx,12382035,525,210) { Caption="obHandle" Type=2 } Add(LineBreakEx,2391732,525,140) { Caption="W_Month" Type=2 } Add(LineBreakEx,5018142,441,210) { Caption="obHandle" Type=2 } Add(GlobalVar,16012046,609,154) { Name="LeapYear" } Add(LineBreakEx,10154595,532,231) { Caption="W_Month" Type=2 } Add(LineBreakEx,273268,329,287) { Caption="obHandle" Type=3 link(_Data,13105597:Value,[]) } Add(LineBreakEx,1618988,441,308) { Caption="W_Month" Type=3 link(_Data,13955934:Position,[]) } Add(Memory,13105597,329,238) { link(onData,10611969:doEvent1,[]) } Add(Label,16708556,280,189) { Left=245 Top=360 Transparent=0 Caption="" }
Почему не создало code_XXXX.txt тайна сие великая
ПЕРЕЗАЛИЛ
Еще осталось подключить список ПРАЗДНИКОВ
andrestudio, выложи список в формате номер месяца/число ( 11/9)
|