Вверх ↑
Ответов: 322
Рейтинг: 8
#1: 2017-11-17 14:16:17 ЛС | профиль | цитата
Собрал из предложенных кусков программу (это примерно то что нужно мне).
Проблема в том, что если загружаются тяжёлые картинки (более 4 метров), программа подвисает.
Возможно ли поправить данную программу, для работы с любыми картинками и количеством без подвисаний?

Add(MainForm,2953706,70,140)
{
Width=516
Height=469
}
Add(Image,7975942,945,175)
{
Left=35
Top=365
Width=85
Height=65
link(onClick,14168276:doData,[])
}
Add(Image,16651437,945,224)
{
Left=120
Top=365
Width=85
Height=65
link(onClick,2095453:doData,[])
}
Add(Image,688805,945,280)
{
Left=210
Top=365
Width=85
Height=65
link(onClick,1734674:doData,[])
}
Add(Image,12463613,945,336)
{
Left=300
Top=365
Width=85
Height=65
link(onClick,421664:doData,[])
}
Add(Img_Loader,12787684,896,175)
{
link(onLoad,7975942:doLoad,[])
}
Add(FileSearch,2629711,238,77)
{
SubDir=1
link(onSearch,11342127:doCompare,[])
}
Add(StrMask,11342127,287,77)
{
Mask="*.jpg"
link(onFalse,8264849:doCompare,[])
link(onTrue,715656:doWork2,[(330,90)(330,118)])
}
Add(StrMask,8264849,336,77)
{
Mask="*.png"
link(onFalse,11212944:doCompare,[])
link(onTrue,715656:doWork1,[(375,90)])
}
Add(StrMask,11212944,385,77)
{
Mask="*.bmp"
link(onFalse,3744750:doCompare,[])
link(onTrue,11659713:doWork1,[(424,90)])
}
Add(StrMask,3744750,434,77)
{
Mask="*.ico"
link(onTrue,5406705:doWork2,[])
}
Add(Hub,15644038,210,70)
{
OutCount=4
link(onEvent1,16253885:doClear,[(424,76)(424,55)])
link(onEvent2,2629711:doSearch,[])
link(onEvent3,15413539:doCompare,[(388,90)(388,111)])
link(onEvent4,10149431:doEvent2,[(336,97)(336,181)])
}
Add(Browse,9986803,105,70)
{
link(onBrowse,6456784:doText,[])
}
Add(Button,6523879,63,70)
{
Left=15
Caption="Каталог"
link(onClick,9986803:doBrowse,[])
}
Add(Edit,6456784,147,70)
{
Left=80
Width=330
Text=""
link(onChange,15194384:doWork2,[])
link(onEnter,15194384:doWork3,[(193,83)])
}
Add(HubEx,15194384,189,70)
{
link(onEvent,15644038:doEvent1,[])
}
Add(HubEx,5406705,483,84)
{
link(onEvent,16253885:doAdd,[(556,90)(556,48)])
}
Add(HubEx,11659713,420,112)
{
link(onEvent,5406705:doWork1,[(487,118)])
}
Add(HubEx,715656,371,112)
{
link(onEvent,11659713:doWork2,[])
}
Add(ArrayRW,7569232,637,168)
{
link(onRead,9047615:doValue,[(691,174)(691,90)])
link(Array,16253885:Array,[])
}
Add(Button,8546077,315,168)
{
Left=5
Top=380
Width=20
Height=35
Font=[MS Sans Serif,14,1,0,1]
Caption="‹"
link(onClick,14711995:doWork1,[])
}
Add(Button,6923064,315,210)
{
Left=475
Top=380
Width=20
Height=35
Font=[MS Sans Serif,14,1,0,1]
Caption="›"
link(onClick,14711995:doWork2,[(373,216)(373,181)])
}
Add(StrList,16253885,623,42)
{
}
Add(MultiElement,14711995,399,168)
{
link(onEvent1,10149431:doEvent1,[])
link(Data1,14994518:Var,[])
}
BEGIN_SDK
Add(EditMulti,3901157,21,21)
{
EventCount=1
WorkCount=2
DataCount=1
VarCount=1
Width=601
Height=417
link(doWork1,9816943:doOperation,[(73,27)(73,160)])
link(doWork2,7793795:doOperation,[(73,34)(73,223)])
link(Var1,10863678:Value,[(27,282)(524,282)])
}
Add(Math,9816943,126,154)
{
Op2=1
ResultType=0
link(onResult,3221505:doEvent1,[])
link(Op1,5934117:Var1,[(132,142)(115,142)(115,198)])
}
Add(Math,7793795,126,217)
{
OpType=1
Op2=1
ResultType=0
link(onResult,3221505:doEvent3,[(174,223)(174,174)])
link(Op1,5934117:Var2,[])
}
Add(Memory,5625805,217,154)
{
Default=Integer(-1)
link(onData,3694001:doCompare,[])
}
Add(If_else,3694001,259,154)
{
Type=2
link(onTrue,6057581:doOperation,[])
link(onFalse,16067037:doCompare,[])
link(Op2,7730525:Var2,[])
}
Add(Math,6057581,392,154)
{
OpType=1
Op2=1
ResultType=0
link(onResult,3221505:doEvent2,[(444,160)(444,204)(170,204)(170,167)])
link(Op1,7730525:Var3,[(398,88)])
}
Add(Hub,3221505,189,154)
{
InCount=4
OutCount=1
link(onEvent1,5625805:doValue,[])
}
Add(GetDataEx,5934117,126,193)
{
Angle=1
link(Data,5625805:Value,[(223,198)])
}
Add(If_else,16067037,308,161)
{
Type=1
Op2=Integer(0)
link(onTrue,3840909:doOperation,[(370,167)(370,216)])
link(onFalse,10863678:doValue,[(481,174)(481,27)])
}
Add(Math,3840909,392,210)
{
Op2=1
ResultType=0
link(onResult,3221505:doEvent4,[(443,216)(443,245)(177,245)(177,181)])
}
Add(GetDataEx,7730525,266,83)
{
Angle=3
link(Data,3901157:Data1,[(27,88)])
}
Add(Memory,10863678,518,21)
{
Default=Integer(0)
link(onData,3901157:onEvent1,[])
}
END_SDK
Add(IndexToChanel,5696865,700,175)
{
Count=5
Point(Data)
link(onEvent1,548991:doData,[])
link(onEvent2,11713903:doData,[(753,188)(753,230)])
link(onEvent3,4482040:doData,[(749,195)(749,286)])
link(onEvent4,9154069:doData,[(744,202)(744,342)])
link(onEvent5,9278803:doData,[(740,209)(740,398)])
}
Add(For,4892732,483,168)
{
End=4
link(onEvent,4710981:doEvent1,[])
link(End,11122176:Value,[])
}
Add(LineBreak,1657583,630,133)
{
Type=1
link(Data,13745623:Var2,[])
Primary=[14994518,-231,7]
}
Add(Hub,4710981,532,168)
{
link(onEvent1,15429747:doOperation,[])
link(onEvent2,5696865:doEvent,[])
}
Add(Math,15429747,581,168)
{
ResultType=0
link(onResult,7569232:doRead,[])
link(Op1,4892732:Position,[(587,156)(526,156)(526,207)(489,207)])
link(Op2,14711995:Var1,[(594,152)(500,152)(500,212)(405,212)])
}
Add(MT_Memory,9047615,721,84)
{
}
Add(DoData,548991,777,175)
{
link(onEventData,12148793:doValue,[])
link(Data,586400:Var3,[(783,145)])
}
Add(Image,1542487,945,392)
{
Left=385
Top=365
Width=85
Height=65
link(onClick,10470908:doData,[])
}
Add(Img_Loader,16345459,896,224)
{
link(onLoad,16651437:doLoad,[])
}
Add(DoData,11713903,777,224)
{
link(onEventData,8614558:doValue,[])
link(Data,586400:Var2,[(783,213)(776,213)])
}
Add(GetDataEx,586400,770,140)
{
Angle=3
link(Data,6653820:Var3,[])
}
Add(Img_Loader,5563112,896,280)
{
link(onLoad,688805:doLoad,[])
}
Add(DoData,4482040,777,280)
{
link(onEventData,2501918:doValue,[])
link(Data,6653820:Var2,[(783,265)(769,265)])
}
Add(GetDataEx,6653820,763,140)
{
Angle=3
link(Data,14459783:Var3,[])
}
Add(Img_Loader,8396818,896,336)
{
link(onLoad,12463613:doLoad,[])
}
Add(DoData,9154069,777,336)
{
link(onEventData,10598959:doValue,[])
link(Data,14459783:Var2,[(783,323)(762,323)])
}
Add(GetDataEx,14459783,756,140)
{
Angle=3
link(Data,2767177:Var3,[])
}
Add(Img_Loader,7662515,896,392)
{
link(onLoad,1542487:doLoad,[])
}
Add(DoData,9278803,777,392)
{
link(onEventData,1922667:doValue,[])
link(Data,2767177:Var2,[(783,377)(755,377)])
}
Add(GetDataEx,2767177,749,140)
{
Angle=3
link(Data,9047615:Value,[(727,145)])
}
Add(MT_Memory,12148793,833,175)
{
link(onData,12787684:doLoad,[])
}
Add(MT_Memory,8614558,833,224)
{
link(onData,16345459:doLoad,[])
}
Add(MT_Memory,2501918,833,280)
{
link(onData,5563112:doLoad,[])
}
Add(MT_Memory,10598959,833,336)
{
link(onData,8396818:doLoad,[])
}
Add(MT_Memory,1922667,833,392)
{
link(onData,7662515:doLoad,[])
}
Add(PaintBox,14075813,427,301)
{
Left=5
Top=25
Width=460
Height=340
Color=16777215
ClearBeforeDraw=0
Point(onMouseDown)
Point(onMouseMove)
Point(MouseX)
Point(MouseY)
link(onBeforeDraw,8191459:In,[])
link(onMouseDown,8845434:In,[(475,314)(475,328)])
link(onMouseMove,5742295:In,[(471,321)(471,349)])
}
Add(Img_UseOffset,9173318,462,609)
{
link(AddTransform,683094:Var,[])
link(X,929447:Var2,[])
link(Y,14804783:Var1,[(482,572)])
}
Add(Math,401840,469,476)
{
OpType=1
link(onResult,8830839:doOperation,[])
link(Op1,14746427:Var2,[])
link(Op2,12308577:Value,[])
}
Add(Math,8830839,532,476)
{
OpType=1
link(onResult,7746369:doWork3,[(575,482)(575,465)(438,465)])
link(Op1,12309971:Var2,[])
link(Op2,971548:Value,[])
}
Add(Hub,12605675,399,476)
{
OutCount=3
link(onEvent1,401840:doOperation,[])
link(onEvent2,8365796:doOperation,[(441,489)(441,531)])
link(onEvent3,6943504:doWork3,[(417,496)])
}
Add(Memory,12308577,476,427)
{
Point(Data)
link(onData,971548:doValue,[])
link(Data,14746427:Var3,[(482,411)])
}
Add(Memory,971548,539,427)
{
Point(Data)
link(Data,12309971:Var3,[(545,411)])
}
Add(IndexToChanel,12858463,357,476)
{
Count=1
link(onEvent1,12605675:doEvent1,[])
}
Add(IndexToChanel,1721923,357,427)
{
Count=1
link(onEvent1,7746369:doWork2,[])
}
Add(Math,8365796,469,525)
{
link(onResult,11032244:doOperation,[])
link(Op1,401840:Result,[])
link(Op2,929447:Var3,[(482,513)(507,513)(507,565)])
}
Add(Math,11032244,532,525)
{
link(Op1,8830839:Result,[])
link(Op2,14804783:Var3,[(545,513)(569,513)(569,572)])
}
Add(GetDataEx,929447,469,560)
{
link(Data,8365796:Result,[])
}
Add(GetDataEx,14804783,532,567)
{
link(Data,11032244:Result,[])
}
Add(HubEx,7746369,434,427)
{
link(onEvent,12308577:doValue,[])
}
Add(LineBreak,2156720,294,427)
{
Caption="mDown"
link(Out,1721923:doEvent,[])
Primary=[8845434,196,-105]
}
Add(LineBreak,13823500,294,476)
{
Caption="mMove"
link(Out,12858463:doEvent,[])
Primary=[5742295,189,-133]
}
Add(Bitmap,15551347,175,273)
{
Point(Width)
Point(Height)
}
Add(Img_Bmp,44008,448,700)
{
Point(Transform)
link(Bitmap,3081980:Var,[])
link(SourceBitmap,14323944:Var,[])
link(Transform,9173318:Transform,[])
}
Add(GetDataEx,14746427,469,406)
{
link(Data,14075813:MouseX,[(475,404)(440,404)])
}
Add(GetDataEx,12309971,532,406)
{
link(Data,14075813:MouseY,[(538,397)(447,397)])
}
Add(LineBreak,11865018,399,700)
{
Caption="draw"
link(Out,44008:doDraw,[])
Primary=[8191459,84,-399]
}
Add(Img_Loader,6103738,56,273)
{
link(onLoad,5630692:doEvent1,[])
}
Add(Hub,5630692,105,273)
{
link(onEvent1,15551347:doLoad,[])
link(onEvent2,10814420:In,[])
}
Add(HubEx,5985134,413,350)
{
Angle=3
link(onEvent,14075813:doRefresh,[(417,307)])
}
Add(Img_UseScale,7686788,315,609)
{
link(X,10278308:Var2,[])
link(Y,10278308:Var3,[(335,600)])
}
Add(Math,904991,322,553)
{
OpType=3
Op2=10
Default=1
link(onResult,14774566:In,[])
}
Add(CounterEx,12454032,273,553)
{
Default=10
Point(doPrev)
link(onNext,904991:doOperation,[])
}
Add(HubEx,6943504,413,371)
{
Angle=3
link(onEvent,5985134:doWork3,[])
}
Add(GetDataEx,10278308,322,595)
{
link(Data,904991:Result,[])
}
Add(LineBreak,12926612,315,651)
{
Type=1
link(Data,7686788:Transform,[])
Primary=[683094,147,-70]
}
Add(LineBreak,10888474,427,350)
{
Type=1
link(Data,14075813:Bitmap,[])
Primary=[3081980,21,301]
}
Add(LineBreak,12402442,175,322)
{
Type=1
link(Data,15551347:Bitmap,[])
Primary=[14323944,280,350]
}
Add(LineBreak,6098785,378,378)
{
link(Out,6943504:doWork1,[(425,384)(425,377)])
Primary=[14774566,-14,175]
}
Add(LineBreak,408134,371,350)
{
link(Out,5985134:doWork2,[])
Primary=[10814420,-238,-70]
}
Add(DoData,14168276,1001,175)
{
link(onEventData,5865616:doEvent1,[])
link(Data,12148793:Value,[(1007,163)(923,163)(923,219)(839,219)])
}
Add(Hub,5865616,1064,175)
{
InCount=5
OutCount=1
link(onEvent1,678440:In,[])
}
Add(DoData,2095453,1001,224)
{
link(onEventData,5865616:doEvent2,[(1041,230)(1041,188)])
link(Data,8614558:Value,[(1007,212)(928,212)(928,268)(839,268)])
}
Add(DoData,1734674,1001,280)
{
link(onEventData,5865616:doEvent3,[(1045,286)(1045,195)])
link(Data,2501918:Value,[(1007,268)(931,268)(931,325)(839,325)])
}
Add(DoData,421664,1001,336)
{
link(onEventData,5865616:doEvent4,[(1049,342)(1049,202)])
link(Data,10598959:Value,[(1007,324)(934,324)(934,381)(839,381)])
}
Add(DoData,10470908,1001,392)
{
link(onEventData,5865616:doEvent5,[(1053,398)(1053,209)])
link(Data,1922667:Value,[(1007,380)(938,380)(938,434)(839,434)])
}
Add(LineBreak,10837701,7,273)
{
link(Out,6103738:doLoad,[])
Primary=[678440,1085,-98]
}
Add(Button,9322339,14,161)
{
Left=425
Caption="Выход"
link(onClick,2953706:doClose,[])
}
Add(Hub,10149431,448,168)
{
InCount=2
OutCount=1
link(onEvent1,4892732:doFor,[])
}
Add(Memory,11122176,490,119)
{
Default=Integer(4)
}
Add(If_else,15413539,553,105)
{
Type=3
Op2=Integer(4)
link(onTrue,10765933:doData,[])
link(Op1,13745623:Var1,[(559,96)])
}
Add(GetDataEx,13745623,630,91)
{
link(Data,16253885:Count,[])
}
Add(DoData,10765933,595,105)
{
link(onEventData,11122176:doValue,[(639,111)(639,118)(478,118)(478,125)])
link(Data,13745623:Var3,[(601,101)(645,101)(645,96)])
}
Add(Button,11002732,140,497)
{
Left=475
Top=95
Width=20
Height=90
Font=[MS Sans Serif,14,1,0,1]
Caption="+"
link(onClick,12454032:doNext,[(249,503)(249,559)])
}
Add(Button,12382933,140,595)
{
Left=475
Top=200
Width=20
Height=90
Font=[MS Sans Serif,14,1,0,1]
Caption="-"
link(onClick,12454032:doPrev,[(249,601)(249,566)])
}
Заранее всем спасибо.
карма: 0

0