Tad писал(а):
Вот немного почистил. Ну и я немного внёс лепту
Add(Button,3618221,91,378)
{
Left=70
Top=440
Width=145
Height=30
Font=[MS Sans Serif,10,1,0,1]
Hint="Диаграмма расходов"
HintManager="mg1"
Caption="Диаграмма"
link(onClick,11316966:doWork1,[])
}
Add(ChildForm,11316966,147,378)
{
}
BEGIN_SDK
Add(EditMulti,13953119,28,14)
{
WorkCount=1
Width=657
Height=571
link(doWork1,4296901:doShowModal,[(38,20)(38,153)])
}
Add(MainForm,4296901,56,119)
{
Left=100
Top=100
Width=1010
Height=735
Font=[MS Sans Serif,8,1,255,1]
Visible=1
Caption="Диаграмма"
Point(doShowModal)
Point(onShow)
Point(onHide)
link(onShow,4508677:doString,[(107,146)(107,69)])
link(onHide,13607343:doClear,[(107,153)(107,426)])
}
Add(PaintBox,13607343,511,413)
{
Left=150
Top=45
Width=645
Height=450
Color=-16777200
Visible=1
Point(Width)
Point(Height)
Point(doVisible)
link(onBeforeDraw,3010226:doAdd,[(621,419)(621,575)(443,575)(443,531)])
}
Add(MT_AddData,3010226,455,525)
{
Count=5
link(onAdd,10381908:doDraw,[])
link(Data1,4638877:Text,[])
link(Data2,161840:Text,[])
link(Data3,4261413:Text,[])
link(Data4,7530391:Text,[])
link(Data5,15532178:Text,[])
}
Add(Img_Diagram,10381908,511,525)
{
Point2AsOffset=0
Style=1
Color=16777215
BgColor=32768
BgColors=[]
Font=[MS Sans Serif,8,1,16777215,1]
Items=#7:Питание|9:Транспорт|7:Платежи|4:Дети|15:Бытовые расходы|
TitleMask="%per%%, %name%"
LegendSize=165
Point(Point1)
Point(Point2)
link(Bitmap,13607343:Bitmap,[])
link(Point1,834122:Point,[])
link(Point2,8882345:Point,[(531,517)(573,517)])
}
Add(PointXY,834122,518,476)
{
}
Add(PointXY,8882345,567,476)
{
link(X,13607343:Width,[(573,460)(524,460)])
link(Y,13607343:Height,[(580,453)(531,453)])
}
Add(VBoxLayout,15800660,567,525)
{
Name="vert"
Space=7
Padding=7
}
Add(Hub,15469082,210,259)
{
OutCount=4
link(onEvent1,7548298:doEnum,[(252,265)(252,195)])
link(onEvent2,15183503:doConvert,[])
link(onEvent3,13607343:doRefresh,[(253,279)(253,419)])
link(onEvent4,13607343:doVisible,[(242,286)(242,433)])
}
Add(Label,8400673,539,70)
{
Left=350
Top=520
Width=84
Height=24
Font=[MS Sans Serif,10,0,0,1]
Caption="Питание:"
}
Add(Label,1049092,546,77)
{
Left=350
Top=545
Width=88
Height=24
Font=[MS Sans Serif,10,0,0,1]
Caption="Транспорт:"
}
Add(Label,10158694,553,84)
{
Left=350
Top=570
Width=77
Height=24
Font=[MS Sans Serif,10,0,0,1]
Caption="Платежи:"
}
Add(Label,2047510,560,91)
{
Left=350
Top=595
Width=47
Height=24
Font=[MS Sans Serif,10,0,0,1]
Caption="Дети:"
}
Add(Label,10459480,567,98)
{
Left=350
Top=620
Width=77
Height=24
Font=[MS Sans Serif,10,0,0,1]
Caption="Бытовые:"
}
Add(Edit,4638877,455,154)
{
Left=450
Top=520
Width=100
Font=[MS Sans Serif,8,1,0,1]
Name="Продукты"
Text=""
ReadOnly=0
}
Add(Edit,15532178,483,322)
{
Left=450
Top=620
Width=100
Font=[MS Sans Serif,8,1,0,1]
Name="Бытовые"
Text=""
ReadOnly=0
}
Add(Edit,7530391,476,280)
{
Left=450
Top=595
Width=100
Font=[MS Sans Serif,8,1,0,1]
Name="Дети"
Text=""
ReadOnly=0
}
Add(Edit,4261413,469,238)
{
Left=450
Top=570
Width=100
Font=[MS Sans Serif,8,1,0,1]
Name="Платежи"
Text=""
ReadOnly=0
}
Add(Edit,161840,462,196)
{
Left=450
Top=545
Width=100
Font=[MS Sans Serif,8,1,0,1]
Name="Транспорт"
Text=""
ReadOnly=0
}
Add(Label,12610629,574,105)
{
Left=350
Top=645
Width=67
Height=24
Font=[MS Sans Serif,10,1,0,1]
Caption="ИТОГО:"
}
Add(Edit,7148018,490,364)
{
Left=450
Top=645
Width=100
Font=[MS Sans Serif,8,1,0,1]
Name="Бытовые"
Text=""
ReadOnly=0
}
Add(Label,13153641,581,112)
{
Left=325
Top=15
Width=105
Height=24
Font=[MS Sans Serif,10,1,0,1]
Caption="Расходы за "
}
Add(Label,16027626,308,266)
{
Left=425
Top=15
Width=4
Height=4
Font=[MS Sans Serif,10,1,0,1]
Caption=""
}
Add(DateConvertor,15183503,266,266)
{
Mode=9
Format="MMMM yyyy г."
Point(Data)
link(onResult,16027626:doText,[])
link(Data,12408671:Var,[])
}
Add(GlobalVar,12408671,266,238)
{
Name="datreal"
}
Add(DSC_Query,8431856,210,63)
{
DSManager="parent.db1"
link(onQuery,12425362:doCompare,[])
}
Add(FormatStr,4508677,154,63)
{
DataCount=1
Mask="SELECT SUM (price) FROM domcalc WHERE mont=%1"
link(onFString,8431856:doQuery,[])
link(Str1,8315201:Var,[])
}
Add(GlobalVar,8315201,154,35)
{
Name="mont"
}
Add(If_else,12425362,266,63)
{
Type=2
Op2=Integer(0)
link(onTrue,15469082:doEvent1,[(309,69)(309,109)(163,109)(163,265)])
link(onFalse,8817309:doEvent1,[])
}
Add(Message,3342437,357,112)
{
Caption="Диаграмма расходов"
Icon=3
link(onMessage,4296901:doClose,[(424,118)(424,27)(48,27)(48,146)])
link(Message,4161709:Result,[])
}
Add(DateConvertor,4161709,357,70)
{
Mode=9
Format="Нет расходов за MMMM yyyy г."
Point(Result)
Point(Data)
link(Data,3251647:Var,[])
}
Add(GlobalVar,3251647,357,42)
{
Name="datreal"
}
Add(Hub,8817309,322,70)
{
link(onEvent1,4161709:doConvert,[])
link(onEvent2,3342437:doMessage,[(346,83)(346,118)])
}
Add(StrList,1380083,252,133)
{
Strings=#57:SELECT SUM (price) FROM domcalc WHERE article<3 AND mont=|71:SELECT SUM (price) FROM domcalc WHERE article>3 AND article<7 AND mont=|72:SELECT SUM (price) FROM domcalc WHERE article>7 AND article<11 AND mont=|73:SELECT SUM (price) FROM domcalc WHERE article>11 AND article<16 AND mont=|58:SELECT SUM (price) FROM domcalc WHERE article>16 AND mont=|43:SELECT SUM (price) FROM domcalc WHERE mont=|
}
Add(StrCat,9564208,308,189)
{
link(onStrCat,1007134:doQuery,[])
link(Str2,11323247:Var,[])
}
Add(GlobalVar,11323247,315,161)
{
Name="mont"
}
Add(DSC_Query,1007134,350,189)
{
DSManager="parent.db1"
link(onQuery,11406285:doEvent,[])
}
Add(IndexToChanel,11406285,399,189)
{
Count=6
Point(Index)
link(onEvent1,4638877:doText,[(443,195)(443,160)])
link(onEvent2,161840:doText,[])
link(Index,7548298:Index,[(405,170)(389,170)(389,227)(279,227)])
link(onEvent3,4261413:doText,[(443,209)(443,244)])
link(onEvent4,7530391:doText,[(443,216)(443,286)])
link(onEvent5,15532178:doText,[(443,223)(443,328)])
link(onEvent6,7148018:doText,[(443,230)(443,370)])
}
Add(ArrayEnum,7548298,266,189)
{
link(onItem,9564208:doStrCat,[])
link(Array,1380083:Array,[])
}
END_SDK
Add(Button,5866040,91,441)
{
Left=70
Top=475
Width=145
Height=30
Font=[MS Sans Serif,10,1,0,1]
Hint="Таблица расходов"
HintManager="mg1"
Caption="Таблица"
link(onClick,11948771:doWork1,[])
}
Add(ChildForm,11948771,147,441)
{
}
BEGIN_SDK
Add(EditMulti,7543651,7,7)
{
WorkCount=1
Width=706
Height=361
link(doWork1,6559911:doShowModal,[(31,13)(31,167)])
}
Add(MainForm,6559911,56,133)
{
Left=100
Top=100
Width=1010
Height=735
Font=[MS Sans Serif,8,1,255,1]
Visible=1
Caption="Диаграмма"
Point(doShowModal)
Point(onShow)
link(onShow,7607566:doEvent1,[])
}
Add(PaintBox,10371683,280,168)
{
Left=240
Top=5
Width=340
Height=675
Color=-16777200
Point(Width)
Point(Height)
Point(doVisible)
link(onBeforeDraw,15527375:doEvent1,[])
}
Add(DSC_Query,15736465,231,63)
{
DSManager="parent.db1"
link(onQuery,10526629:doCompare,[])
}
Add(FormatStr,10802668,175,63)
{
DataCount=1
Mask="SELECT SUM (price) FROM domcalc WHERE mont=%1"
link(onFString,15736465:doQuery,[])
link(Str1,3393413:Var,[])
}
Add(GlobalVar,3393413,175,35)
{
Name="mont"
}
Add(If_else,10526629,280,63)
{
Type=2
Op2=Integer(0)
link(onFalse,7399800:doEvent1,[])
}
Add(Message,10356988,357,112)
{
Caption="Таблица расходов"
Icon=3
link(onMessage,6559911:doClose,[(424,118)(424,21)(44,21)(44,160)])
link(Message,10476338:Result,[])
}
Add(DateConvertor,10476338,357,70)
{
Mode=9
Format="Нет расходов за MMMM yyyy г."
Point(Result)
Point(Data)
link(Data,6006874:Var2,[])
}
Add(GlobalVar,4423387,357,35)
{
Name="datreal"
}
Add(Hub,7399800,329,70)
{
link(onEvent1,10476338:doConvert,[])
link(onEvent2,10356988:doMessage,[(350,83)(350,118)])
}
Add(Button,7266768,154,273)
{
Left=45
Top=120
Width=150
Height=40
Caption="Печать"
link(onClick,14064070:doEvent1,[])
}
Add(DocumentTemplate,10034443,434,252)
{
DrawSource=2
Name="MainPage"
Point(doDrawSource)
link(Bitmap,10371683:Bitmap,[(440,232)(286,232)])
}
BEGIN_SDK
Add(Print_Shape,962265,44,8)
{
X=47
Y=11
Width=274
Height=39
Type=2
BackStyle=0
}
Add(Print_Text,16619233,56,12)
{
X=59
Y=15
Width=85
Height=26
Text="Отчёт за "
Font=[MS Sans Serif,10,1,0,1]
Horizontal=0
}
Add(Print_Text,11893277,147,14)
{
Name="time"
X=150
Y=17
Width=162
Text="месяц, год"
Font=[MS Sans Serif,10,1,0,1]
Vertical=1
Horizontal=0
}
Add(Print_Table,16097453,42,49)
{
Name="table"
X=45
Y=52
Width=280
Height=388
Columns=#18:Наименование|200|0|8:Сумма|80|
RowHeight=20
HeadFont=[MS Sans Serif,10,1,0,1]
CellFont=[MS Sans Serif,10,0,0,1]
Cells=#8:Продукты|14:Кафе, ресторан|7:Топливо|10:Ремонт а/м|22:Общественный транспорт|20:Коммунальные платежи|24:Налоги, сборы, страховки|13:Пожертвования|18:Кружки, муз. школа|8:Гимназия|16:Школьное питание|17:Карманные расходы|13:Одежда, обувь|9:Лекарства|25:Мебель, инструменты и др.|7:Питомцы|7:Подарки|22:Прочие бытовые расходы|
Left=5
}
Add(Print_Text,15554118,98,595)
{
X=101
Y=598
Width=106
Text="Итого:"
Font=[MS Sans Serif,10,1,0,1]
}
Add(Print_Text,11461456,224,595)
{
Name="summ"
X=227
Y=598
Width=92
Font=[MS Sans Serif,12,1,0,1]
}
Add(Print_Table,15599558,42,441)
{
Name="table2"
X=45
Y=444
Width=280
Height=129
Columns=#18:Наименование|200|0|8:Сумма|80|
RowHeight=25
HeadFont=[MS Sans Serif,10,1,0,1]
Visible=1
CellFont=[MS Sans Serif,12,1,0,1]
Cells=#7:Питание|9:Транспорт|16:Платежи и налоги|4:Дети|15:Бытовые расходы|
Left=5
}
END_SDK
Add(PC_Text,8750585,644,168)
{
ItemName="time"
Document="MainPage"
}
Add(Hub,15527375,343,168)
{
InCount=2
OutCount=5
link(onEvent1,12316111:doConvert,[])
link(onEvent2,10089169:doWork1,[])
link(onEvent3,2918118:doWork1,[])
link(onEvent4,14945601:doString,[])
link(onEvent5,13697224:doData,[(371,202)(371,258)])
}
Add(DateConvertor,12316111,602,168)
{
Mode=9
Format="MMMM yyyy г."
Point(Data)
link(onResult,8750585:doText,[])
link(Data,6006874:Var3,[(608,61)])
}
Add(DoData,13697224,392,252)
{
link(onEventData,10034443:doDraw,[])
}
Add(Hub,14064070,203,273)
{
link(onEvent1,16392781:doWork3,[])
link(onEvent2,13470018:doPrint,[])
}
Add(Printer,13470018,231,280)
{
link(onPrint,15527375:doEvent2,[(328,286)(328,181)])
}
Add(GetDataEx,6006874,357,56)
{
link(Data,4423387:Var,[])
}
Add(DSC_Query,10016676,427,189)
{
DSManager="parent.db1"
link(onQuery,5756958:doText,[])
}
Add(FormatStr,14945601,385,189)
{
DataCount=1
Mask="SELECT SUM (price) FROM domcalc WHERE mont=%1"
link(onFString,10016676:doQuery,[])
link(Str1,16464244:Var,[])
}
Add(GlobalVar,16464244,385,154)
{
Name="mont"
}
Add(PC_Text,5756958,469,189)
{
ItemName="summ"
Document="MainPage"
}
Add(MultiElement,10089169,553,175)
{
}
BEGIN_SDK
Add(EditMulti,871763,21,21)
{
WorkCount=1
Width=363
Height=130
link(doWork1,2184506:doEnum,[(56,27)(56,90)])
}
Add(DSC_Query,1899911,203,84)
{
DSManager="parent.parent.db1"
link(onQuery,8589522:doValue,[])
}
Add(PC_TableSetCell,7449278,308,84)
{
ItemName="table"
Document="parent.MainPage"
Col=1
link(Text,8589522:Value1,[(314,67)(249,67)(249,131)(265,131)])
link(Row,8589522:Value2,[(328,65)(349,65)(349,129)(272,129)])
}
Add(StrList,5594787,77,28)
{
Strings=#1:1|1:2|1:4|1:5|1:6|1:8|1:9|2:10|2:12|2:13|2:14|2:15|2:17|2:18|2:19|2:20|2:21|2:22|0:|
}
Add(ArrayEnum,2184506,91,84)
{
link(onItem,4411089:doString,[])
link(Array,5594787:Array,[])
}
Add(FormatStr,4411089,154,84)
{
DataCount=3
Mask="SELECT SUM (price), %1 FROM domcalc WHERE article=%2 AND mont=%3"
link(onFString,1899911:doQuery,[])
link(Str1,2184506:Index,[(160,72)(132,72)(132,128)(104,128)])
link(Str3,12618233:Var,[])
}
Add(GlobalVar,12618233,168,49)
{
Name="mont"
}
Add(MT_MultiMem,8589522,259,84)
{
link(onData,7449278:doText,[])
}
END_SDK
Add(MultiElement,2918118,511,182)
{
}
BEGIN_SDK
Add(EditMulti,9470458,21,21)
{
WorkCount=1
Width=482
Height=186
link(doWork1,6738452:doEnum,[(56,27)(56,111)])
}
Add(PC_TableSetCell,9391291,280,105)
{
ItemName="table2"
Document="parent.MainPage"
Col=1
}
Add(PC_TableSetCell,15805383,322,112)
{
ItemName="table2"
Document="parent.MainPage"
Col=1
Row=1
}
Add(PC_TableSetCell,4575239,364,119)
{
ItemName="table2"
Document="parent.MainPage"
Col=1
Row=2
}
Add(PC_TableSetCell,13337183,406,126)
{
ItemName="table2"
Document="parent.MainPage"
Col=1
Row=3
}
Add(PC_TableSetCell,14598007,448,133)
{
ItemName="table2"
Document="parent.MainPage"
Col=1
Row=4
}
Add(StrList,15128802,77,49)
{
Strings=#57:SELECT SUM (price) FROM domcalc WHERE article<3 AND mont=|71:SELECT SUM (price) FROM domcalc WHERE article>3 AND article<7 AND mont=|72:SELECT SUM (price) FROM domcalc WHERE article>7 AND article<11 AND mont=|73:SELECT SUM (price) FROM domcalc WHERE article>11 AND article<16 AND mont=|58:SELECT SUM (price) FROM domcalc WHERE article>16 AND mont=|
}
Add(StrCat,10997452,133,105)
{
link(onStrCat,10839664:doQuery,[])
link(Str2,9731684:Var,[])
}
Add(GlobalVar,9731684,140,77)
{
Name="mont"
}
Add(DSC_Query,10839664,175,105)
{
DSManager="parent.parent.db1"
link(onQuery,12820749:doEvent,[])
}
Add(IndexToChanel,12820749,224,105)
{
Count=5
Point(Index)
link(onEvent1,9391291:doText,[])
link(onEvent2,15805383:doText,[])
link(onEvent3,4575239:doText,[])
link(onEvent4,13337183:doText,[])
link(onEvent5,14598007:doText,[])
link(Index,6738452:Index,[(230,86)(214,86)(214,143)(104,143)])
}
Add(ArrayEnum,6738452,91,105)
{
link(onItem,10997452:doStrCat,[])
link(Array,15128802:Array,[])
}
END_SDK
Add(Hub,7607566,105,154)
{
OutCount=3
link(onEvent1,10802668:doString,[(147,160)(147,69)])
link(onEvent2,16392781:doWork1,[(235,167)(235,265)])
link(onEvent3,10371683:doRefresh,[])
}
Add(ChanelToIndex,16392781,280,259)
{
Count=3
link(onIndex,10034443:doDrawSource,[])
}
END_SDK