Tad писал(а):
А дату где берёшь ?С нижней точки DatePicker. Вот набросок редактирующй формы, ни Х не оптимизированный (не до нее пока), но работает
Add(ChildFormPoly,5998039,679,189)
{
Childrens=#4:Edit|
Selected="Edit"
}
BEGIN_SDK
Add(EditPolyMulti,10078456,21,21)
{
WorkCount=#5:##add|8:##delete|
EventCount=#7:onClose|9:onWriteDB|
Width=461
Height=354
Point(##add)
Point(##delete)
}
Add(MainForm,11589570,35,105)
{
Left=35
Top=105
}
END_SDK
BEGIN_SDK
Add(EditPolyMulti,8941815,21,21)
{
WorkCount=#5:##add|8:##delete|
EventCount=#7:onClose|9:onWriteDB|
Width=993
Height=627
Point(##add)
Point(##delete)
link(##add,10614683:doEvent1,[(42,27)(42,195)])
}
Add(Edit,13514003,343,126)
{
Left=145
Top=35
Width=385
Font=[Tahoma,10,0,0,204]
Text=""
Point(doSetFocus)
Point(doPosition)
Point(doSelectAll)
link(onChange,1060674:doWork2,[])
}
Add(Edit,2475573,231,203)
{
Left=145
Top=60
Width=385
Font=[Tahoma,10,0,0,204]
Text=""
link(onChange,4877394:doWork2,[])
}
Add(Edit,7075765,273,210)
{
Left=145
Top=85
Width=385
Font=[Tahoma,10,0,0,204]
Text=""
link(onChange,9291315:doWork2,[])
}
Add(ComboBox,3296535,196,245)
{
Left=145
Top=110
Width=120
Height=21
Text=""
Point(doSelectString)
link(onClick,762495:doWork2,[])
}
Add(Edit,8290103,315,224)
{
Left=410
Top=110
Width=75
Text=""
Alignment=2
MaxLenField=3
link(onChange,6293103:doWork2,[(377,230)(377,321)])
}
Add(DatePicker,5246488,273,350)
{
Left=145
Top=135
Width=120
Height=21
Font=[Tahoma,10,0,0,204]
Point(DateTime)
link(onChange,9779811:doWork2,[])
}
Add(DatePicker,4737300,231,385)
{
Left=410
Top=135
Width=120
Height=21
Font=[Tahoma,10,0,0,204]
Point(DateTime)
link(onChange,11439994:doWork2,[])
}
Add(CheckBox,13318605,266,420)
{
Left=180
Top=195
Width=170
Font=[Tahoma,10,1,0,204]
Caption="Отслеживать объект"
Point(onClick)
link(onClick,14803193:doWork2,[])
}
Add(MainForm,11235354,770,581)
{
Left=35
Top=105
Width=540
Height=280
Visible=1
Caption="Edit"
BorderStyle=4
Position=1
Point(Close)
Point(doShowModal)
Point(onClose)
link(Close,3142370:GetData,[])
}
Add(Label,2523484,455,196)
{
Left=10
Top=10
Width=520
Height=17
Font=[Tahoma,10,1,0,204]
TabOrder=-1
Caption=""
AutoSize=1
Alignment=2
}
Add(Label,4887433,133,42)
{
Left=10
Top=35
Width=130
Height=17
Font=[Tahoma,10,1,0,204]
TabOrder=-1
Caption="Название:"
AutoSize=1
Alignment=1
}
Add(Label,11545055,175,42)
{
Left=10
Top=60
Width=130
Height=17
Font=[Tahoma,10,1,0,204]
TabOrder=-1
Caption="Адрес:"
AutoSize=1
Alignment=1
}
Add(Label,6951634,217,42)
{
Left=10
Top=85
Width=130
Height=17
Font=[Tahoma,10,1,0,204]
TabOrder=-1
Caption="Тип:"
AutoSize=1
Alignment=1
}
Add(Label,11857127,259,42)
{
Left=10
Top=110
Width=130
Height=17
Font=[Tahoma,10,1,0,204]
TabOrder=-1
Caption="Направление:"
AutoSize=1
Alignment=1
}
Add(Label,10956325,301,42)
{
Left=275
Top=110
Width=130
Height=17
Font=[Tahoma,10,1,0,204]
TabOrder=-1
Caption="Период:"
AutoSize=1
Alignment=1
}
Add(Label,16466781,343,42)
{
Left=10
Top=135
Width=130
Height=17
Font=[Tahoma,10,1,0,204]
TabOrder=-1
Caption="Предыдущий рег.:"
AutoSize=1
Alignment=1
}
Add(Label,7981193,385,42)
{
Left=275
Top=135
Width=130
Height=17
Font=[Tahoma,10,1,0,204]
TabOrder=-1
Caption="Следующий рег.:"
AutoSize=1
Alignment=1
}
Add(EventFromData,3142370,770,462)
{
link(onEvent,4111839:doEvent1,[])
}
Add(MT_MultiData,3674117,112,189)
{
From=1
Count=11
link(onData1,3195643:doValue,[])
link(onData2,15542672:doStrCat,[])
link(onData3,5012884:doEvent1,[(198,209)(198,139)])
link(onData4,2475573:doText2,[])
link(onData5,7075765:doText2,[])
link(onData6,3296535:doSelectString,[(170,230)(170,293)])
link(onData7,8290103:doText2,[])
link(onData8,12522789:doConvert,[(160,244)(160,356)])
link(onData9,5107005:doConvert,[(160,251)(160,391)])
link(onData10,16684134:doConvert,[(160,258)(160,426)])
link(onData11,14826970:doConvert,[(160,265)(160,475)])
}
Add(StrCat,15542672,413,196)
{
Str1="Объект № "
link(onStrCat,2523484:doText,[])
}
Add(Hub,10614683,56,189)
{
OutCount=3
link(onEvent1,3674117:doSeparateMT,[])
link(onEvent2,10560395:doWork2,[(96,202)(96,552)])
link(onEvent3,11235354:doShowModal,[(88,209)(88,615)])
}
Add(DoData,4073787,721,462)
{
Data=Integer(0)
link(onEventData,3142370:doData,[])
}
Add(Hub,4111839,819,462)
{
link(onEvent1,4073787:doData,[(845,468)(845,456)(709,456)(709,468)])
link(onEvent2,270740:doWork2,[])
}
Add(DateConvertor,12522789,175,350)
{
Mode=8
Format="dd-MM-yyyy"
link(onResult,5246488:doSetDate,[])
}
Add(DateConvertor,5107005,175,385)
{
Mode=8
Format="dd-MM-yyyy"
link(onResult,4737300:doSetDate,[])
}
Add(Label,4738102,427,42)
{
Left=490
Top=110
Width=36
Height=20
Font=[Tahoma,10,1,0,204]
TabOrder=-1
Caption="дней"
Alignment=1
}
Add(ToolBar,4901262,532,546)
{
Left=180
Top=225
Width=170
Height=22
Font=[Arial,8,1,0,204]
TabOrder=-1
Ctl3D=0
Caption=0
Wrapable=1
Buttons=['Применить=Применить настройки'=[ZIP3604000078DA73F235636100033320D600620128666450804840E591C1FFFFFF698299CBD829D22BB6489B6C3328D10FD263743A854171AD131893620648ADC3CD623006B1493503A61FA69E143340F2BE4F1BC018A6161406D657F2C0FE21C60D2035E8EA407C52CCC0652E35CC00850DB96680C2023D7CC8710335CCA0246F501B030018BC85DD],'Выход=Завершить работу с настройками канала'=[ZIP3604000078DA95D3D92B44511C07F0AFF20778F5E681E28922E5C18B076FFE02911ACB20CB6CD63046B876862C638D57C523E1C55A86889946D76C12B2A4C95286B973FDEE314A9A6339F5ED3C9CF3F9D6AF7B4F46566A24D84AA5C453A2428940CCC741E8FCEB9265991B4B61218A93537EBC13CE2859A6ACA8D57FF69F6EBBA414879423753136288AFF3CFB9EEFDEADD3C351A981BDA212F6B272EC9494311F9C9D43606111AFAB6BF06F6DB384F3DEEA1A9C1AAA20EA0D10B53AEC956B984FDB2A40DC810A097B2A445BB3B9FEA2A111DEBA7A786AEBE0A1AE43AD81F98C4D3592F68B906C2D42AC358FEB6F4C2DB86832E29C7A2E8DCD38D657319FBE9E8F04AB0A89BBF988D9CDE57A5FBB80EB6613EE8647F0E672E344E8647EE96C1EA5CE0EE4D88DC8B4E9B8FEB9BB07F76DEDF08D5920395D10435E7E3EA13B5E8A1B77928DEB5F07CC78EAEDC34357379EA8CB49B3285E7AB4D11D0FC5C57A783E38320AFFE0105ECC83F0F79BE16D6D0DE33D5C2F8F4F40A28E00CDAF749D0B1DFFF3D333902DE390697E65BFA219FEE3955CD3FC41C54F4EE1B6AF9FF937DF11A4809322B23D9CFFDAB3A8D1C241DF4114843FFFFFBCF7F4DBFB7B07D02E31F6]]
link(onClick,1636266:doEvent,[])
}
Add(IndexToChanel,1636266,581,546)
{
link(onEvent1,15568695:doEvent1,[(625,552)(625,538)])
link(onEvent2,149813:doEvent1,[])
}
Add(Hub,5012884,252,133)
{
OutCount=4
link(onEvent1,13514003:doText2,[])
link(onEvent2,13514003:doSetFocus,[])
link(onEvent3,14095820:doData,[])
link(onEvent4,13514003:doSelectAll,[])
}
Add(DoData,14095820,287,147)
{
Data=Integer(256)
link(onEventData,13514003:doPosition,[])
}
Add(HubEx,1060674,392,126)
{
link(onEvent,597902:doData,[])
}
Add(HubEx,4877394,392,203)
{
Angle=3
link(onEvent,1060674:doWork3,[])
}
Add(HubEx,9291315,392,210)
{
Angle=3
link(onEvent,4877394:doWork3,[])
}
Add(HubEx,762495,392,252)
{
Angle=3
link(onEvent,9291315:doWork3,[])
}
Add(HubEx,6293103,392,315)
{
Angle=3
link(onEvent,762495:doWork3,[])
}
Add(HubEx,9779811,392,350)
{
Angle=3
link(onEvent,6293103:doWork3,[])
}
Add(HubEx,11439994,392,385)
{
Angle=3
link(onEvent,9779811:doWork3,[])
}
Add(DoData,597902,413,126)
{
Data=Integer(0)
link(onEventData,4770749:doEvent1,[])
}
Add(DoData,2490666,448,553)
{
Data=Integer(0)
link(onEventData,4901262:doDisable,[])
}
Add(Hub,15568695,637,532)
{
link(onEvent1,7667117:doEvent,[(663,538)(663,436)(569,436)(569,335)])
link(onEvent2,10560395:doWork1,[(674,545)(674,513)(389,513)])
}
Add(HubEx,10560395,385,546)
{
link(onEvent,784456:doEvent1,[])
}
Add(Switch,679829,581,112)
{
DataOn=Integer(1)
DataOff=Integer(0)
Point(doOn)
Point(State)
}
Add(Hub,4770749,455,126)
{
link(onEvent1,679829:doOn,[])
link(onEvent2,4901262:doEnable,[(503,139)(503,552)])
}
Add(Hub,784456,406,546)
{
link(onEvent1,679829:doReset,[(490,552)(490,125)])
link(onEvent2,2490666:doData,[])
}
Add(Memory,3195643,742,189)
{
}
Add(FormatStr,6011578,742,343)
{
DataCount=10
Mask="UPDATE Objects\r\nSET\r\n Name = '%2',\r\n Address = '%3',\r\n Type = '%4',\r\n Direct = '%5',\r\n Period = %6,\r\n Previouse = %7,\r\n Next = %8,\r\n Status = %9,\r\n Importance = %10\r\nWHERE\r\n Id = %1"
link(onFString,9917876:doCharset,[])
link(Str1,3195643:Value,[])
link(Str2,13514003:Text,[(755,253)(349,253)])
link(Str3,2475573:Text,[(762,289)(237,289)])
link(Str4,7075765:Text,[(769,293)(279,293)])
link(Str5,3296535:String,[(776,320)(209,320)])
link(Str6,8290103:Text,[(783,299)(321,299)])
link(Str7,3463213:GetData,[])
link(Str8,3699093:GetData,[])
link(Str9,13318605:Checked,[(804,331)(472,331)(472,464)(272,464)])
link(Str10,931368:Checked,[(811,331)(496,331)(496,513)(272,513)])
}
Add(IndexToChanel,7667117,581,329)
{
Point(Index)
link(onEvent2,5825808:doMessage,[])
link(Index,679829:State,[])
}
Add(Message,5825808,623,336)
{
Message="Сохранить изменения?"
Point(onOK)
link(onOK,6011578:doString,[])
}
Add(EventFromData,3463213,784,238)
{
link(onEvent,15534629:doOperation,[])
}
Add(Math,15534629,833,238)
{
OpType=37
Op2=1
ResultType=0
link(onResult,3463213:doData,[(877,244)(877,232)(772,232)(772,244)])
link(Op1,5246488:DateTime,[(839,226)(538,226)(538,394)(279,394)])
}
Add(EventFromData,3699093,791,280)
{
link(onEvent,5106345:doOperation,[])
}
Add(Math,5106345,840,280)
{
OpType=37
Op2=1
ResultType=0
link(onResult,3699093:doData,[(884,286)(884,274)(779,274)(779,286)])
link(Op1,4737300:DateTime,[(846,268)(520,268)(520,429)(237,429)])
}
Add(Hub,149813,637,553)
{
link(onEvent1,11235354:doClose,[(711,559)(711,608)])
link(onEvent2,270740:doWork3,[(879,566)])
}
Add(HubEx,270740,875,469)
{
Angle=3
link(onEvent,8941815:onClose,[(879,27)])
}
Add(Charset,9917876,833,343)
{
Type=6
link(onCharset,10240582:doExec,[])
}
Add(DSC_Exec,10240582,896,343)
{
DSManager="parent.db"
link(onExec,8941815:onWriteDB,[(971,349)(971,34)])
}
Add(CheckBox,931368,266,469)
{
Left=180
Top=170
Width=170
Font=[Tahoma,10,1,0,204]
Caption="Важный объект"
Point(onClick)
link(onClick,14803193:doWork3,[(396,482)])
}
Add(ConvertorEx,16684134,175,420)
{
Mode=1
link(onResult,13318605:doCheck,[])
}
Add(ConvertorEx,14826970,175,469)
{
Mode=1
link(onResult,931368:doCheck,[])
}
Add(HubEx,14803193,392,427)
{
Angle=3
link(onEvent,11439994:doWork3,[])
}
END_SDK