Вверх ↑
Этот топик читают: Гость
Разработчик
Ответов: 26113
Рейтинг: 2126
#16: 2020-12-01 16:00:42 ЛС | профиль | цитата
Joiner писал(а):
Да, разобрался. Спасибо за помощь.

MST_Virtual самый быстрый метод для работы с таблицей неограниченного размера данных. Быстрее отображать уже ничего не сможет. Задержка будет уже не в отображении, а в поиске нужной стартовой строки в самих данных.
карма: 22

0
Ответов: 783
Рейтинг: 168
#17: 2020-12-01 16:58:15 ЛС | профиль | цитата
Joiner, собрал компактную схему с MST_Virtual. Кардинально сократить схему, по-моему, вряд ли удастся.
Add(MainForm,3063237,91,56)
{
Width=651
Height=550
link(onCreate,11085202:doWork1,[])
}
Add(StrList,4383086,469,63)
{
Point(EndIdx)
Point(doGetString)
Point(onGetString)
Point(StrToFind)
}
Add(ChildPanel,11085202,147,70)
{
link(onEvent2,8443177:doEvent1,[])
}
BEGIN_SDK
Add(EditMulti,7878121,21,21)
{
EventCount=2
WorkCount=1
VarCount=1
Width=790
Height=522
link(doWork1,12297484:doEvent1,[(46,27)(46,97)])
}
Add(Panel,13137533,56,35)
{
Width=635
Height=30
Align=2
}
Add(Button,294400,42,126)
{
Left=15
Top=5
Caption="New"
link(onClick,12836985:doEvent1,[])
}
Add(Edit,10340021,217,35)
{
Left=185
Top=5
Width=90
Text="20000"
DataType=2
}
Add(Label,13731098,168,35)
{
Left=125
Top=7
Width=61
Height=17
Caption="Кол. строк"
}
Add(Button,11871194,308,357)
{
Left=290
Top=5
Caption="View"
link(onClick,1896552:doData,[])
}
Add(LED,11063149,301,49)
{
Left=80
Top=5
Width=20
Height=20
ColorOff=65280
}
Add(Hub,12297484,91,91)
{
OutCount=4
link(onEvent1,3301899:doWork2,[(116,97)(116,83)])
link(onEvent2,3210884:doWork1,[])
link(onEvent4,14611930:doWork2,[])
}
Add(MultiElement,3210884,217,98)
{
link(onEvent1,2339098:doAdd,[])
link(onEvent2,11063149:doOff,[(284,111)(284,62)])
link(Data1,10340021:Text,[])
}
BEGIN_SDK
Add(EditMulti,90280,28,21)
{
EventCount=2
WorkCount=2
DataCount=1
Width=636
Height=158
VOffset=7
HOffset=28
link(doWork1,15240120:doEvent1,[])
link(doWork2,15286128:doFor,[(39,41)(39,55)])
}
Add(For,15286128,49,49)
{
@Hint=#18:Количество абзацев|
IncludeEnd=1
link(onEvent,9486001:doRandom,[])
link(onStop,90280:onEvent2,[(88,62)(88,158)(603,158)(603,41)])
link(End,90280:Data1,[])
}
Add(For,11842154,154,49)
{
@Hint=#29:Количество слов в предложении|
link(onEvent,5410569:doText,[])
link(onStop,15892992:doEvent1,[(193,62)(193,97)])
link(End,1516465:Var3,[(167,40)(146,40)(146,89)])
}
Add(Random,9486001,105,49)
{
Min=7
Max=15
link(onRandom,11842154:doFor,[])
}
Add(InlineCode,5410569,203,42)
{
WorkPoints=#7:doStart|6:doText|
EventPoints=#5:onRes|
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|23: onRes : THI_Event;|5: |52: procedure doStart(var _Data:TData; Index:Word); |50: procedure doText(var _Data:TData; Index:Word);|5: end;|0:|14:implementation|0:|30:procedure THiAsmClass.doStart;|6: begin|12: Randomize;|5: end;|0:|29:procedure THiAsmClass.doText;|15:var sss:string;|16: i,j:integer;|16: _Rnd:double;|5:BEGIN|11: sss:=' ';|24: j:=round(Random*12)+2;|19: for i:=0 to j do|9: begin|18: _Rnd:=Random;|42: if _Rnd<0.0003 then sss:=sss+'ё' else|42: if _Rnd<0.0007 then sss:=sss+'ъ' else|42: if _Rnd<0.0033 then sss:=sss+'ф' else|42: if _Rnd<0.0065 then sss:=sss+'э' else|42: if _Rnd<0.0101 then sss:=sss+'щ' else|42: if _Rnd<0.0149 then sss:=sss+'ц' else|42: if _Rnd<0.0213 then sss:=sss+'ю' else|42: if _Rnd<0.0286 then sss:=sss+'ш' else|41: if _Rnd<0.038 then sss:=sss+'ж' else|42: if _Rnd<0.0477 then sss:=sss+'х' else|42: if _Rnd<0.0598 then sss:=sss+'й' else|42: if _Rnd<0.0742 then sss:=sss+'ч' else|42: if _Rnd<0.0901 then sss:=sss+'б' else|42: if _Rnd<0.1066 then sss:=sss+'з' else|42: if _Rnd<0.1236 then sss:=sss+'г' else|41: if _Rnd<0.141 then sss:=sss+'ь' else|40: if _Rnd<0.16 then sss:=sss+'ы' else|42: if _Rnd<0.1801 then sss:=sss+'я' else|42: if _Rnd<0.2063 then sss:=sss+'у' else|42: if _Rnd<0.2344 then sss:=sss+'п' else|42: if _Rnd<0.2642 then sss:=sss+'д' else|42: if _Rnd<0.2963 then sss:=sss+'м' else|42: if _Rnd<0.3312 then sss:=sss+'к' else|42: if _Rnd<0.3752 then sss:=sss+'л' else|42: if _Rnd<0.4206 then sss:=sss+'в' else|42: if _Rnd<0.4679 then sss:=sss+'р' else|42: if _Rnd<0.5226 then sss:=sss+'с' else|42: if _Rnd<0.5852 then sss:=sss+'т' else|42: if _Rnd<0.6522 then sss:=sss+'н' else|42: if _Rnd<0.7257 then sss:=sss+'и' else|42: if _Rnd<0.8058 then sss:=sss+'а' else|42: if _Rnd<0.8903 then sss:=sss+'е' else|34: if _Rnd<1 then sss:=sss+'о'; |9: end;|25: _hi_onEvent(onRes,sss);|4:END;|0:|0:|4:end.|
link(onRes,15879034:doWork2,[])
}
Add(StrCat,13455235,308,42)
{
Point(doClear)
link(Str1,7063167:Var3,[(314,33)(328,33)(328,82)])
}
Add(Hub,15240120,70,28)
{
link(onEvent1,5410569:doStart,[(193,34)(193,48)])
link(onEvent2,9486001:doRandomize,[(95,41)(95,62)])
}
Add(DoData,7170534,308,98)
{
link(onEventData,16600547:doTrim,[])
link(Data,7063167:Var2,[])
}
Add(GetDataEx,7063167,308,77)
{
link(Data,13455235:Result,[])
}
Add(Hub,15892992,203,91)
{
OutCount=3
link(onEvent1,7526937:doData,[(242,97)(242,62)])
link(onEvent2,7170534:doData,[])
link(onEvent3,13455235:doClear,[(298,111)(298,55)])
}
Add(DoData,7526937,252,56)
{
Data=String(. )
link(onEventData,15879034:doWork3,[(291,62)])
}
Add(HubEx,15879034,287,42)
{
link(onEvent,13455235:doStrCat,[])
}
Add(StrCase,14266070,406,98)
{
Type=3
link(onModify,131368:doString,[])
}
Add(Trim,16600547,357,98)
{
Char=" "
Mode=4
link(onTrim,14266070:doModify,[])
}
Add(FormatStr,131368,469,98)
{
DataCount=3
Mask="%1;%2;%3"
link(onFString,90280:onEvent1,[(508,104)(508,34)])
link(Str1,15286128:Position,[(475,89)(461,89)(461,138)(55,138)])
link(Str3,1516465:Var2,[(489,82)(349,82)(349,124)(111,124)])
}
Add(GetDataEx,1516465,105,84)
{
link(Data,9486001:Random,[])
}
END_SDK
Add(Hub,12836985,91,126)
{
OutCount=3
link(onEvent1,3301899:doWork3,[(123,132)])
link(onEvent3,14611930:doWork3,[(130,146)])
}
Add(HubEx,3301899,119,77)
{
link(onEvent,16463242:doEvent1,[])
}
Add(StrList,2339098,371,98)
{
Point(doSave)
Point(onGetString)
Point(doGetString)
Point(Index)
link(onGetString,9145784:doAdd,[])
}
Add(DoData,1896552,371,357)
{
link(onEventData,11295191:doWork3,[(480,363)])
link(Data,2339098:Text,[])
}
Add(HubEx,14611930,126,112)
{
Angle=3
link(onEvent,3646847:doStart,[(130,111)])
}
Add(Hub,16463242,238,77)
{
link(onEvent1,11063149:doOn,[(291,83)(291,69)])
link(onEvent2,2339098:doClear,[(291,90)(291,111)])
}
Add(Thread,3646847,161,105)
{
Delay=20
FastStop=0
link(onExec,3210884:doWork2,[])
}
Add(Edit,12435698,42,189)
{
Left=475
Top=5
Width=90
Text="Поиск"
ClearAfterEnter=1
link(onEnter,9152135:doEvent1,[])
}
Add(ArrayFind,2459761,154,203)
{
Partial=0
link(onFind,3063742:doCompare,[])
link(Array,2339098:Array,[(160,187)(391,187)])
link(Index,5227215:Result,[(167,194)(258,194)(258,257)(307,257)])
link(Value,12435698:Text,[(174,180)(125,180)(125,236)(48,236)])
}
Add(StrList,9145784,434,105)
{
}
Add(Hub,11830510,266,203)
{
link(onEvent1,2339098:doGetString,[(291,209)(291,139)])
link(onEvent2,5227215:doOperation,[])
}
Add(Math,5227215,301,210)
{
Op2=1
ResultType=0
link(onResult,9525593:doWork3,[(361,216)(361,251)(130,251)])
}
Add(HubEx,9525593,126,203)
{
link(onEvent,2459761:doFind,[])
}
Add(If_else,3063742,210,203)
{
Type=5
Op2=Integer(-1)
link(onTrue,11830510:doEvent1,[])
link(onFalse,12969291:doData,[(249,216)(249,279)])
}
Add(DoData,12969291,434,273)
{
link(onEventData,11295191:doWork2,[])
link(Data,9145784:Text,[])
}
Add(HubEx,11295191,476,273)
{
Angle=3
link(onEvent,7878121:onEvent2,[(480,34)])
}
Add(Hub,9152135,91,196)
{
link(onEvent1,9145784:doClear,[(116,202)(116,174)(410,174)(410,118)])
link(onEvent2,9525593:doWork2,[])
}
END_SDK
Add(MST_Virtual,15555683,616,322)
{
MSTControl="MTStrTbl"
Point(doSetVirtIdx)
Point(VirtIdx)
Point(doInitPage)
link(VirtualData,8915826:GetData,[])
}
Add(MathParse,4883725,364,350)
{
MathStr="(%2 - sign(%1) * 3) * ((%2 - sign(%1) * 3) >= 0)"
ResultType=0
link(onResult,5531226:doCompare,[])
link(X2,15555683:CurVirtIdx,[(377,341)(454,341)(454,376)(622,376)])
}
Add(If_else,5531226,413,350)
{
Type=1
link(onTrue,7810322:doEvent2,[])
link(Op2,3982646:Result,[])
}
Add(EventFromData,8915826,616,217)
{
link(onEvent,9504609:doSeparateMT,[])
}
Add(MTStrTbl,7148080,98,322)
{
Top=30
Width=615
Height=450
Align=5
Name="MTStrTbl"
Columns=#4:1=50|5:2=500|4:3=59|
VirtualTab=0
Redaction=0
Point(PerPage)
Point(onMouseWheel)
Point(onResize)
link(onMouseWheel,11792436:doWork2,[])
link(onResize,4426873:doEvent1,[])
}
Add(ScrollBar,16623256,476,203)
{
Left=615
Top=30
Width=20
Height=481
Align=3
Kind=1
Point(doMax)
Point(doPage)
link(onPosition,7810322:doEvent1,[(529,209)(529,349)])
}
Add(Hub,7810322,539,343)
{
InCount=2
link(onEvent1,16623256:doPosition,[(564,349)(564,195)(466,195)(466,209)])
link(onEvent2,15555683:doSetVirtIdx,[])
}
Add(Hub,8443177,210,77)
{
OutCount=6
link(onEvent1,282946:doClear,[(438,83)(438,55)])
link(onEvent2,4383086:doText,[])
link(onEvent3,4841056:doEnum,[(459,97)(459,146)])
link(onEvent4,3982646:doOperation,[(403,104)(403,216)])
link(onEvent5,1849321:doWork1,[(263,111)])
link(onEvent6,11792436:doWork1,[(235,118)])
}
Add(MT_String,3044787,532,133)
{
link(onResult,9566642:doAdd,[])
}
Add(MT_Array,11072840,833,210)
{
}
Add(ArrayRW,8474984,833,259)
{
link(onRead,8915826:doData,[(872,265)(872,202)(606,202)(606,223)])
link(Array,11072840:Array,[])
}
Add(Hub,2250609,791,217)
{
link(onEvent1,11072840:doClear,[])
link(onEvent2,11072840:doLoad,[(816,230)(816,216)])
}
Add(MT_MTArray,282946,588,49)
{
}
Add(MT_MTArrayRW,9566642,588,119)
{
link(Array,8658213:Var2,[])
}
Add(ArrayEnum,4841056,483,140)
{
link(onItem,3044787:doMT,[])
link(Array,4383086:Array,[])
}
Add(MT_MTArrayRW,8098985,735,217)
{
link(onRead,2250609:doEvent1,[])
link(Array,8658213:Var3,[(741,89)])
}
Add(GetDataEx,8658213,588,84)
{
link(Data,282946:Array,[])
}
Add(MT_MultiData,9504609,672,217)
{
Count=3
link(onData1,8098985:doRead,[])
link(onData3,8474984:doRead,[(718,237)(718,265)])
}
Add(HubEx,11792436,231,350)
{
link(onEvent,4883725:doCalc,[])
}
Add(ChangeMon,11255964,245,434)
{
link(onData,15555683:doInitPage,[(599,440)(599,363)])
link(Data,2394025:Var2,[])
}
Add(Math,3982646,420,210)
{
OpType=1
link(onResult,16623256:doMax,[])
link(Op1,4383086:Count,[(426,131)(482,131)])
link(Op2,10991670:Var3,[(433,201)])
}
Add(GetDataEx,2394025,245,392)
{
Angle=3
link(Data,7148080:PerPage,[(132,397)])
}
Add(DoData,1295136,364,217)
{
link(onEventData,16623256:doPage,[])
link(Data,10991670:Var2,[])
}
Add(GetDataEx,10991670,364,196)
{
Angle=3
link(Data,2394025:Var1,[(251,201)])
}
Add(Hub,4426873,161,357)
{
link(onEvent1,11255964:doData,[(221,363)(221,440)])
link(onEvent2,1849321:doWork3,[(263,370)])
}
Add(HubEx,1849321,259,217)
{
link(onEvent,1295136:doData,[])
}


Редактировалось 4 раз(а), последний 2020-12-01 17:35:43
карма: 15

0
Разработчик
Ответов: 26113
Рейтинг: 2126
#18: 2020-12-01 17:17:02 ЛС | профиль | цитата
Gunta писал(а):
Joiner, собрал компактную схему с MST_Virtual. Кардинально сократить схему, по-моему, вряд ли удастся.

Позицию ползунка бокового скроллинга неплохо бы привязать к таблице.
карма: 22

0
Ответов: 783
Рейтинг: 168
#19: 2020-12-01 17:24:47 ЛС | профиль | цитата
nesco писал(а):
Позицию ползунка бокового скроллинга неплохо бы привязать к таблице.

Поправил схему постом выше.
карма: 15

0
Разработчик
Ответов: 26113
Рейтинг: 2126
#20: 2020-12-01 17:27:08 ЛС | профиль | цитата
Gunta писал(а):
Поправил схему постом выше.

Че-то я там исправленного ничего не нашел. Вот о чем я говорил

Схема


Add(MainForm,3063237,322,273)
{
Width=651
Height=550
link(onCreate,11085202:doWork1,[])
}
Add(StrList,4383086,560,280)
{
Point(EndIdx)
Point(doGetString)
Point(onGetString)
Point(StrToFind)
}
Add(ChildPanel,11085202,378,287)
{
link(onEvent2,8443177:doEvent1,[])
}
BEGIN_SDK
Add(EditMulti,7878121,21,21)
{
EventCount=2
WorkCount=1
VarCount=1
Width=790
Height=522
link(doWork1,12297484:doEvent1,[(46,27)(46,97)])
}
Add(Panel,13137533,56,35)
{
Width=635
Height=30
Align=2
}
Add(Button,294400,42,126)
{
Left=15
Top=5
Caption="New"
link(onClick,12836985:doEvent1,[])
}
Add(Edit,10340021,217,35)
{
Left=185
Top=5
Width=90
Text="20000"
DataType=2
}
Add(Label,13731098,168,35)
{
Left=125
Top=7
Width=61
Height=17
Caption="Кол. строк"
}
Add(Button,11871194,308,357)
{
Left=290
Top=5
Caption="View"
link(onClick,1896552:doData,[])
}
Add(LED,11063149,301,49)
{
Left=80
Top=5
Width=20
Height=20
ColorOff=65280
}
Add(Hub,12297484,91,91)
{
OutCount=4
link(onEvent1,3301899:doWork2,[(116,97)(116,83)])
link(onEvent2,3210884:doWork1,[])
link(onEvent4,14611930:doWork2,[])
}
Add(MultiElement,3210884,217,98)
{
link(onEvent1,2339098:doAdd,[])
link(onEvent2,11063149:doOff,[(284,111)(284,62)])
link(Data1,10340021:Text,[])
}
BEGIN_SDK
Add(EditMulti,90280,28,21)
{
EventCount=2
WorkCount=2
DataCount=1
Width=636
Height=158
VOffset=7
HOffset=28
link(doWork1,15240120:doEvent1,[])
link(doWork2,15286128:doFor,[(39,41)(39,55)])
}
Add(For,15286128,49,49)
{
@Hint=#18:Количество абзацев|
IncludeEnd=1
link(onEvent,9486001:doRandom,[])
link(onStop,90280:onEvent2,[(88,62)(88,158)(603,158)(603,41)])
link(End,90280:Data1,[])
}
Add(For,11842154,154,49)
{
@Hint=#29:Количество слов в предложении|
link(onEvent,5410569:doText,[])
link(onStop,15892992:doEvent1,[(193,62)(193,97)])
link(End,1516465:Var3,[(167,40)(146,40)(146,89)])
}
Add(Random,9486001,105,49)
{
Min=7
Max=15
link(onRandom,11842154:doFor,[])
}
Add(InlineCode,5410569,203,42)
{
WorkPoints=#7:doStart|6:doText|
EventPoints=#5:onRes|
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|23: onRes : THI_Event;|5: |52: procedure doStart(var _Data:TData; Index:Word); |50: procedure doText(var _Data:TData; Index:Word);|5: end;|0:|14:implementation|0:|30:procedure THiAsmClass.doStart;|6: begin|12: Randomize;|5: end;|0:|29:procedure THiAsmClass.doText;|15:var sss:string;|16: i,j:integer;|16: _Rnd:double;|5:BEGIN|11: sss:=' ';|24: j:=round(Random*12)+2;|19: for i:=0 to j do|9: begin|18: _Rnd:=Random;|42: if _Rnd<0.0003 then sss:=sss+'ё' else|42: if _Rnd<0.0007 then sss:=sss+'ъ' else|42: if _Rnd<0.0033 then sss:=sss+'ф' else|42: if _Rnd<0.0065 then sss:=sss+'э' else|42: if _Rnd<0.0101 then sss:=sss+'щ' else|42: if _Rnd<0.0149 then sss:=sss+'ц' else|42: if _Rnd<0.0213 then sss:=sss+'ю' else|42: if _Rnd<0.0286 then sss:=sss+'ш' else|41: if _Rnd<0.038 then sss:=sss+'ж' else|42: if _Rnd<0.0477 then sss:=sss+'х' else|42: if _Rnd<0.0598 then sss:=sss+'й' else|42: if _Rnd<0.0742 then sss:=sss+'ч' else|42: if _Rnd<0.0901 then sss:=sss+'б' else|42: if _Rnd<0.1066 then sss:=sss+'з' else|42: if _Rnd<0.1236 then sss:=sss+'г' else|41: if _Rnd<0.141 then sss:=sss+'ь' else|40: if _Rnd<0.16 then sss:=sss+'ы' else|42: if _Rnd<0.1801 then sss:=sss+'я' else|42: if _Rnd<0.2063 then sss:=sss+'у' else|42: if _Rnd<0.2344 then sss:=sss+'п' else|42: if _Rnd<0.2642 then sss:=sss+'д' else|42: if _Rnd<0.2963 then sss:=sss+'м' else|42: if _Rnd<0.3312 then sss:=sss+'к' else|42: if _Rnd<0.3752 then sss:=sss+'л' else|42: if _Rnd<0.4206 then sss:=sss+'в' else|42: if _Rnd<0.4679 then sss:=sss+'р' else|42: if _Rnd<0.5226 then sss:=sss+'с' else|42: if _Rnd<0.5852 then sss:=sss+'т' else|42: if _Rnd<0.6522 then sss:=sss+'н' else|42: if _Rnd<0.7257 then sss:=sss+'и' else|42: if _Rnd<0.8058 then sss:=sss+'а' else|42: if _Rnd<0.8903 then sss:=sss+'е' else|34: if _Rnd<1 then sss:=sss+'о'; |9: end;|25: _hi_onEvent(onRes,sss);|4:END;|0:|0:|4:end.|
link(onRes,15879034:doWork2,[])
}
Add(StrCat,13455235,308,42)
{
Point(doClear)
link(Str1,7063167:Var3,[(314,33)(328,33)(328,82)])
}
Add(Hub,15240120,70,28)
{
link(onEvent1,5410569:doStart,[(193,34)(193,48)])
link(onEvent2,9486001:doRandomize,[(95,41)(95,62)])
}
Add(DoData,7170534,308,98)
{
link(onEventData,16600547:doTrim,[])
link(Data,7063167:Var2,[])
}
Add(GetDataEx,7063167,308,77)
{
link(Data,13455235:Result,[])
}
Add(Hub,15892992,203,91)
{
OutCount=3
link(onEvent1,7526937:doData,[(242,97)(242,62)])
link(onEvent2,7170534:doData,[])
link(onEvent3,13455235:doClear,[(298,111)(298,55)])
}
Add(DoData,7526937,252,56)
{
Data=String(. )
link(onEventData,15879034:doWork3,[(291,62)])
}
Add(HubEx,15879034,287,42)
{
link(onEvent,13455235:doStrCat,[])
}
Add(StrCase,14266070,406,98)
{
Type=3
link(onModify,131368:doString,[])
}
Add(Trim,16600547,357,98)
{
Char=" "
Mode=4
link(onTrim,14266070:doModify,[])
}
Add(FormatStr,131368,469,98)
{
DataCount=3
Mask="%1;%2;%3"
link(onFString,90280:onEvent1,[(508,104)(508,34)])
link(Str1,15286128:Position,[(475,89)(461,89)(461,138)(55,138)])
link(Str3,1516465:Var2,[(489,82)(349,82)(349,124)(111,124)])
}
Add(GetDataEx,1516465,105,84)
{
link(Data,9486001:Random,[])
}
END_SDK
Add(Hub,12836985,91,126)
{
OutCount=3
link(onEvent1,3301899:doWork3,[(123,132)])
link(onEvent3,14611930:doWork3,[(130,146)])
}
Add(HubEx,3301899,119,77)
{
link(onEvent,16463242:doEvent1,[])
}
Add(StrList,2339098,371,98)
{
Point(doSave)
Point(onGetString)
Point(doGetString)
Point(Index)
link(onGetString,9145784:doAdd,[])
}
Add(DoData,1896552,371,357)
{
link(onEventData,11295191:doWork3,[(480,363)])
link(Data,2339098:Text,[])
}
Add(HubEx,14611930,126,112)
{
Angle=3
link(onEvent,3646847:doStart,[(130,111)])
}
Add(Hub,16463242,238,77)
{
link(onEvent1,11063149:doOn,[(291,83)(291,69)])
link(onEvent2,2339098:doClear,[(291,90)(291,111)])
}
Add(Thread,3646847,161,105)
{
Delay=20
FastStop=0
link(onExec,3210884:doWork2,[])
}
Add(Edit,12435698,42,189)
{
Left=475
Top=5
Width=90
Text="Поиск"
ClearAfterEnter=1
link(onEnter,9152135:doEvent1,[])
}
Add(ArrayFind,2459761,154,203)
{
Partial=0
link(onFind,3063742:doCompare,[])
link(Array,2339098:Array,[(160,187)(391,187)])
link(Index,5227215:Result,[(167,194)(258,194)(258,257)(307,257)])
link(Value,12435698:Text,[(174,180)(125,180)(125,236)(48,236)])
}
Add(StrList,9145784,434,105)
{
}
Add(Hub,11830510,266,203)
{
link(onEvent1,2339098:doGetString,[(291,209)(291,139)])
link(onEvent2,5227215:doOperation,[])
}
Add(Math,5227215,301,210)
{
Op2=1
ResultType=0
link(onResult,9525593:doWork3,[(361,216)(361,251)(130,251)])
}
Add(HubEx,9525593,126,203)
{
link(onEvent,2459761:doFind,[])
}
Add(If_else,3063742,210,203)
{
Type=5
Op2=Integer(-1)
link(onTrue,11830510:doEvent1,[])
link(onFalse,12969291:doData,[(249,216)(249,279)])
}
Add(DoData,12969291,434,273)
{
link(onEventData,11295191:doWork2,[])
link(Data,9145784:Text,[])
}
Add(HubEx,11295191,476,273)
{
Angle=3
link(onEvent,7878121:onEvent2,[(480,34)])
}
Add(Hub,9152135,91,196)
{
link(onEvent1,9145784:doClear,[(116,202)(116,174)(410,174)(410,118)])
link(onEvent2,9525593:doWork2,[])
}
END_SDK
Add(MST_Virtual,15555683,707,532)
{
MSTControl="MTStrTbl"
Point(doSetVirtIdx)
Point(VirtIdx)
Point(doInitPage)
link(VirtualData,8915826:GetData,[])
}
Add(MathParse,4883725,511,560)
{
MathStr="(%2 - sign(%1) * 3) * ((%2 - sign(%1) * 3) >= 0)"
ResultType=0
link(onResult,5531226:doCompare,[])
link(X2,15555683:CurVirtIdx,[(524,551)(552,551)(552,600)(713,600)])
}
Add(If_else,5531226,560,560)
{
Type=1
link(onTrue,7810322:doEvent2,[])
link(Op2,3982646:Result,[(573,544)(517,544)])
}
Add(EventFromData,8915826,707,434)
{
link(onEvent,9504609:doSeparateMT,[])
}
Add(MTStrTbl,7148080,399,532)
{
Top=30
Width=615
Height=450
Align=5
Name="MTStrTbl"
Columns=#4:1=50|5:2=500|4:3=59|
VirtualTab=0
Redaction=0
Point(PerPage)
Point(onMouseWheel)
Point(onResize)
link(onMouseWheel,11792436:doWork2,[])
link(onResize,11255964:doData,[(501,573)(501,629)])
}
Add(ScrollBar,16623256,560,420)
{
Left=615
Top=30
Width=20
Height=481
Align=3
Kind=1
Point(doMax)
Point(doPage)
link(onPosition,7810322:doEvent1,[(613,426)(613,559)])
}
Add(Hub,7810322,623,553)
{
InCount=2
link(onEvent1,16623256:doPosition,[(648,559)(648,412)(550,412)(550,426)])
link(onEvent2,15555683:doSetVirtIdx,[])
}
Add(Hub,8443177,441,294)
{
OutCount=5
link(onEvent1,282946:doClear,[(529,300)(529,272)])
link(onEvent2,4383086:doText,[])
link(onEvent3,4841056:doEnum,[(550,314)(550,363)])
link(onEvent4,3982646:doOperation,[(494,321)(494,433)])
link(onEvent5,11792436:doWork1,[(480,328)])
}
Add(MT_String,3044787,623,350)
{
link(onResult,9566642:doAdd,[])
}
Add(MT_Array,11072840,924,427)
{
}
Add(ArrayRW,8474984,924,476)
{
link(onRead,8915826:doData,[(963,482)(963,419)(697,419)(697,440)])
link(Array,11072840:Array,[])
}
Add(Hub,2250609,882,434)
{
link(onEvent1,11072840:doClear,[])
link(onEvent2,11072840:doLoad,[(907,447)(907,433)])
}
Add(MT_MTArray,282946,679,266)
{
}
Add(MT_MTArrayRW,9566642,679,336)
{
link(Array,8658213:Var2,[])
}
Add(ArrayEnum,4841056,574,357)
{
link(onItem,3044787:doMT,[])
link(Array,4383086:Array,[])
}
Add(MT_MTArrayRW,8098985,826,434)
{
link(onRead,2250609:doEvent1,[])
link(Array,8658213:Var3,[(832,306)])
}
Add(GetDataEx,8658213,679,301)
{
link(Data,282946:Array,[])
}
Add(MT_MultiData,9504609,763,434)
{
Count=3
link(onData1,8098985:doRead,[])
link(onData3,8474984:doRead,[(809,454)(809,482)])
}
Add(HubEx,11792436,476,560)
{
link(onEvent,4883725:doCalc,[])
}
Add(ChangeMon,11255964,560,623)
{
link(onData,15555683:doInitPage,[(690,629)(690,573)])
link(Data,15555683:PerPage,[(566,614)(727,614)])
}
Add(Math,3982646,511,427)
{
OpType=1
link(onResult,16623256:doMax,[])
link(Op1,4383086:Count,[(517,348)(573,348)])
link(Op2,7148080:PerPage,[(524,418)(489,418)(489,593)(433,593)])
}

карма: 22

0
Ответов: 783
Рейтинг: 168
#21: 2020-12-01 17:30:56 ЛС | профиль | цитата
nesco, это первый вариант. Вот исправленный.
Add(MainForm,3063237,91,56)
{
Width=651
Height=550
link(onCreate,11085202:doWork1,[])
}
Add(StrList,4383086,469,63)
{
Point(EndIdx)
Point(doGetString)
Point(onGetString)
Point(StrToFind)
}
Add(ChildPanel,11085202,147,70)
{
link(onEvent2,8443177:doEvent1,[])
}
BEGIN_SDK
Add(EditMulti,7878121,21,21)
{
EventCount=2
WorkCount=1
VarCount=1
Width=790
Height=522
link(doWork1,12297484:doEvent1,[(46,27)(46,97)])
}
Add(Panel,13137533,56,35)
{
Width=635
Height=30
Align=2
}
Add(Button,294400,42,126)
{
Left=15
Top=5
Caption="New"
link(onClick,12836985:doEvent1,[])
}
Add(Edit,10340021,217,35)
{
Left=185
Top=5
Width=90
Text="20000"
DataType=2
}
Add(Label,13731098,168,35)
{
Left=125
Top=7
Width=61
Height=17
Caption="Кол. строк"
}
Add(Button,11871194,308,357)
{
Left=290
Top=5
Caption="View"
link(onClick,1896552:doData,[])
}
Add(LED,11063149,301,49)
{
Left=80
Top=5
Width=20
Height=20
ColorOff=65280
}
Add(Hub,12297484,91,91)
{
OutCount=4
link(onEvent1,3301899:doWork2,[(116,97)(116,83)])
link(onEvent2,3210884:doWork1,[])
link(onEvent4,14611930:doWork2,[])
}
Add(MultiElement,3210884,217,98)
{
link(onEvent1,2339098:doAdd,[])
link(onEvent2,11063149:doOff,[(284,111)(284,62)])
link(Data1,10340021:Text,[])
}
BEGIN_SDK
Add(EditMulti,90280,28,21)
{
EventCount=2
WorkCount=2
DataCount=1
Width=636
Height=158
VOffset=7
HOffset=28
link(doWork1,15240120:doEvent1,[])
link(doWork2,15286128:doFor,[(39,41)(39,55)])
}
Add(For,15286128,49,49)
{
@Hint=#18:Количество абзацев|
IncludeEnd=1
link(onEvent,9486001:doRandom,[])
link(onStop,90280:onEvent2,[(88,62)(88,158)(603,158)(603,41)])
link(End,90280:Data1,[])
}
Add(For,11842154,154,49)
{
@Hint=#29:Количество слов в предложении|
link(onEvent,5410569:doText,[])
link(onStop,15892992:doEvent1,[(193,62)(193,97)])
link(End,1516465:Var3,[(167,40)(146,40)(146,89)])
}
Add(Random,9486001,105,49)
{
Min=7
Max=15
link(onRandom,11842154:doFor,[])
}
Add(InlineCode,5410569,203,42)
{
WorkPoints=#7:doStart|6:doText|
EventPoints=#5:onRes|
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|23: onRes : THI_Event;|5: |52: procedure doStart(var _Data:TData; Index:Word); |50: procedure doText(var _Data:TData; Index:Word);|5: end;|0:|14:implementation|0:|30:procedure THiAsmClass.doStart;|6: begin|12: Randomize;|5: end;|0:|29:procedure THiAsmClass.doText;|15:var sss:string;|16: i,j:integer;|16: _Rnd:double;|5:BEGIN|11: sss:=' ';|24: j:=round(Random*12)+2;|19: for i:=0 to j do|9: begin|18: _Rnd:=Random;|42: if _Rnd<0.0003 then sss:=sss+'ё' else|42: if _Rnd<0.0007 then sss:=sss+'ъ' else|42: if _Rnd<0.0033 then sss:=sss+'ф' else|42: if _Rnd<0.0065 then sss:=sss+'э' else|42: if _Rnd<0.0101 then sss:=sss+'щ' else|42: if _Rnd<0.0149 then sss:=sss+'ц' else|42: if _Rnd<0.0213 then sss:=sss+'ю' else|42: if _Rnd<0.0286 then sss:=sss+'ш' else|41: if _Rnd<0.038 then sss:=sss+'ж' else|42: if _Rnd<0.0477 then sss:=sss+'х' else|42: if _Rnd<0.0598 then sss:=sss+'й' else|42: if _Rnd<0.0742 then sss:=sss+'ч' else|42: if _Rnd<0.0901 then sss:=sss+'б' else|42: if _Rnd<0.1066 then sss:=sss+'з' else|42: if _Rnd<0.1236 then sss:=sss+'г' else|41: if _Rnd<0.141 then sss:=sss+'ь' else|40: if _Rnd<0.16 then sss:=sss+'ы' else|42: if _Rnd<0.1801 then sss:=sss+'я' else|42: if _Rnd<0.2063 then sss:=sss+'у' else|42: if _Rnd<0.2344 then sss:=sss+'п' else|42: if _Rnd<0.2642 then sss:=sss+'д' else|42: if _Rnd<0.2963 then sss:=sss+'м' else|42: if _Rnd<0.3312 then sss:=sss+'к' else|42: if _Rnd<0.3752 then sss:=sss+'л' else|42: if _Rnd<0.4206 then sss:=sss+'в' else|42: if _Rnd<0.4679 then sss:=sss+'р' else|42: if _Rnd<0.5226 then sss:=sss+'с' else|42: if _Rnd<0.5852 then sss:=sss+'т' else|42: if _Rnd<0.6522 then sss:=sss+'н' else|42: if _Rnd<0.7257 then sss:=sss+'и' else|42: if _Rnd<0.8058 then sss:=sss+'а' else|42: if _Rnd<0.8903 then sss:=sss+'е' else|34: if _Rnd<1 then sss:=sss+'о'; |9: end;|25: _hi_onEvent(onRes,sss);|4:END;|0:|0:|4:end.|
link(onRes,15879034:doWork2,[])
}
Add(StrCat,13455235,308,42)
{
Point(doClear)
link(Str1,7063167:Var3,[(314,33)(328,33)(328,82)])
}
Add(Hub,15240120,70,28)
{
link(onEvent1,5410569:doStart,[(193,34)(193,48)])
link(onEvent2,9486001:doRandomize,[(95,41)(95,62)])
}
Add(DoData,7170534,308,98)
{
link(onEventData,16600547:doTrim,[])
link(Data,7063167:Var2,[])
}
Add(GetDataEx,7063167,308,77)
{
link(Data,13455235:Result,[])
}
Add(Hub,15892992,203,91)
{
OutCount=3
link(onEvent1,7526937:doData,[(242,97)(242,62)])
link(onEvent2,7170534:doData,[])
link(onEvent3,13455235:doClear,[(298,111)(298,55)])
}
Add(DoData,7526937,252,56)
{
Data=String(. )
link(onEventData,15879034:doWork3,[(291,62)])
}
Add(HubEx,15879034,287,42)
{
link(onEvent,13455235:doStrCat,[])
}
Add(StrCase,14266070,406,98)
{
Type=3
link(onModify,131368:doString,[])
}
Add(Trim,16600547,357,98)
{
Char=" "
Mode=4
link(onTrim,14266070:doModify,[])
}
Add(FormatStr,131368,469,98)
{
DataCount=3
Mask="%1;%2;%3"
link(onFString,90280:onEvent1,[(508,104)(508,34)])
link(Str1,15286128:Position,[(475,89)(461,89)(461,138)(55,138)])
link(Str3,1516465:Var2,[(489,82)(349,82)(349,124)(111,124)])
}
Add(GetDataEx,1516465,105,84)
{
link(Data,9486001:Random,[])
}
END_SDK
Add(Hub,12836985,91,126)
{
OutCount=3
link(onEvent1,3301899:doWork3,[(123,132)])
link(onEvent3,14611930:doWork3,[(130,146)])
}
Add(HubEx,3301899,119,77)
{
link(onEvent,16463242:doEvent1,[])
}
Add(StrList,2339098,371,98)
{
Point(doSave)
Point(onGetString)
Point(doGetString)
Point(Index)
link(onGetString,9145784:doAdd,[])
}
Add(DoData,1896552,371,357)
{
link(onEventData,11295191:doWork3,[(480,363)])
link(Data,2339098:Text,[])
}
Add(HubEx,14611930,126,112)
{
Angle=3
link(onEvent,3646847:doStart,[(130,111)])
}
Add(Hub,16463242,238,77)
{
link(onEvent1,11063149:doOn,[(291,83)(291,69)])
link(onEvent2,2339098:doClear,[(291,90)(291,111)])
}
Add(Thread,3646847,161,105)
{
Delay=20
FastStop=0
link(onExec,3210884:doWork2,[])
}
Add(Edit,12435698,42,189)
{
Left=475
Top=5
Width=90
Text="Поиск"
ClearAfterEnter=1
link(onEnter,9152135:doEvent1,[])
}
Add(ArrayFind,2459761,154,203)
{
Partial=0
link(onFind,3063742:doCompare,[])
link(Array,2339098:Array,[(160,187)(391,187)])
link(Index,5227215:Result,[(167,194)(258,194)(258,257)(307,257)])
link(Value,12435698:Text,[(174,180)(125,180)(125,236)(48,236)])
}
Add(StrList,9145784,434,105)
{
}
Add(Hub,11830510,266,203)
{
link(onEvent1,2339098:doGetString,[(291,209)(291,139)])
link(onEvent2,5227215:doOperation,[])
}
Add(Math,5227215,301,210)
{
Op2=1
ResultType=0
link(onResult,9525593:doWork3,[(361,216)(361,251)(130,251)])
}
Add(HubEx,9525593,126,203)
{
link(onEvent,2459761:doFind,[])
}
Add(If_else,3063742,210,203)
{
Type=5
Op2=Integer(-1)
link(onTrue,11830510:doEvent1,[])
link(onFalse,12969291:doData,[(249,216)(249,279)])
}
Add(DoData,12969291,434,273)
{
link(onEventData,11295191:doWork2,[])
link(Data,9145784:Text,[])
}
Add(HubEx,11295191,476,273)
{
Angle=3
link(onEvent,7878121:onEvent2,[(480,34)])
}
Add(Hub,9152135,91,196)
{
link(onEvent1,9145784:doClear,[(116,202)(116,174)(410,174)(410,118)])
link(onEvent2,9525593:doWork2,[])
}
END_SDK
Add(MST_Virtual,15555683,616,322)
{
MSTControl="MTStrTbl"
Point(doSetVirtIdx)
Point(VirtIdx)
Point(doInitPage)
link(VirtualData,8915826:GetData,[])
}
Add(MathParse,4883725,364,350)
{
MathStr="(%2 - sign(%1) * 3) * ((%2 - sign(%1) * 3) >= 0)"
ResultType=0
link(onResult,5531226:doCompare,[])
link(X2,15555683:CurVirtIdx,[(377,341)(454,341)(454,376)(622,376)])
}
Add(If_else,5531226,413,350)
{
Type=1
link(onTrue,7810322:doEvent2,[])
link(Op2,3982646:Result,[])
}
Add(EventFromData,8915826,616,217)
{
link(onEvent,9504609:doSeparateMT,[])
}
Add(MTStrTbl,7148080,154,322)
{
Top=30
Width=615
Height=450
Align=5
Name="MTStrTbl"
Columns=#4:1=50|5:2=500|4:3=59|
VirtualTab=0
Redaction=0
Point(PerPage)
Point(onMouseWheel)
Point(onResize)
link(onMouseWheel,11792436:doWork2,[])
link(onResize,4426873:doEvent1,[])
}
Add(ScrollBar,16623256,476,217)
{
Left=615
Top=30
Width=20
Height=481
Align=3
Kind=1
Point(doMax)
Point(doPage)
link(onPosition,7810322:doEvent1,[(522,223)(522,349)])
}
Add(Hub,7810322,532,343)
{
InCount=2
link(onEvent1,16623256:doPosition,[(557,349)(557,209)(466,209)(466,223)])
link(onEvent2,15555683:doSetVirtIdx,[])
}
Add(Hub,8443177,210,77)
{
OutCount=6
link(onEvent1,282946:doClear,[(438,83)(438,55)])
link(onEvent2,4383086:doText,[])
link(onEvent3,4841056:doEnum,[(459,97)(459,139)])
link(onEvent4,3982646:doOperation,[(403,104)(403,230)])
link(onEvent5,1849321:doWork1,[(263,111)])
link(onEvent6,11792436:doWork1,[(249,118)])
}
Add(MT_String,3044787,539,126)
{
link(onResult,9566642:doAdd,[])
}
Add(MT_Array,11072840,833,210)
{
}
Add(ArrayRW,8474984,833,259)
{
link(onRead,8915826:doData,[(872,265)(872,202)(606,202)(606,223)])
link(Array,11072840:Array,[])
}
Add(Hub,2250609,791,217)
{
link(onEvent1,11072840:doClear,[])
link(onEvent2,11072840:doLoad,[(816,230)(816,216)])
}
Add(MT_MTArray,282946,588,49)
{
}
Add(MT_MTArrayRW,9566642,588,112)
{
link(Array,8658213:Var2,[])
}
Add(ArrayEnum,4841056,483,133)
{
link(onItem,3044787:doMT,[])
link(Array,4383086:Array,[])
}
Add(MT_MTArrayRW,8098985,735,217)
{
link(onRead,2250609:doEvent1,[])
link(Array,8658213:Var3,[(741,89)])
}
Add(GetDataEx,8658213,588,84)
{
link(Data,282946:Array,[])
}
Add(MT_MultiData,9504609,672,217)
{
Count=3
link(onData1,8098985:doRead,[])
link(onData3,8474984:doRead,[(718,237)(718,265)])
}
Add(HubEx,11792436,245,350)
{
link(onEvent,4883725:doCalc,[])
}
Add(ChangeMon,11255964,336,427)
{
link(onData,15555683:doInitPage,[(599,433)(599,363)])
link(Data,2394025:Var2,[])
}
Add(Math,3982646,420,224)
{
OpType=1
link(onResult,16623256:doMax,[])
link(Op1,4383086:Count,[(426,124)(482,124)])
link(Op2,10991670:Var3,[(433,215)])
}
Add(GetDataEx,2394025,336,385)
{
Angle=3
link(Data,7148080:PerPage,[(188,390)])
}
Add(DoData,1295136,364,231)
{
link(onEventData,16623256:doPage,[])
link(Data,10991670:Var2,[])
}
Add(GetDataEx,10991670,364,210)
{
Angle=3
link(Data,2394025:Var1,[(342,215)])
}
Add(Hub,4426873,217,357)
{
link(onEvent1,11255964:doData,[(242,363)(242,433)])
link(onEvent2,1849321:doWork3,[(263,370)])
}
Add(HubEx,1849321,259,231)
{
link(onEvent,1295136:doData,[])
}


Редактировалось 4 раз(а), последний 2020-12-01 17:41:48
карма: 15

0
Ответов: 207
Рейтинг: 14
#22: 2020-12-01 17:43:24 ЛС | профиль | цитата
Теперь пустые строки заполняются последней строкой
карма: 2

0
Ответов: 783
Рейтинг: 168
#23: 2020-12-01 17:54:16 ЛС | профиль | цитата
Joiner писал(а):
Теперь пустые строки заполняются последней строкой

Add(MainForm,3063237,140,91)
{
Width=651
Height=550
link(onCreate,11085202:doWork1,[])
}
Add(StrList,4383086,518,98)
{
Point(EndIdx)
Point(doGetString)
Point(onGetString)
Point(StrToFind)
}
Add(ChildPanel,11085202,196,105)
{
link(onEvent2,8443177:doEvent1,[])
}
BEGIN_SDK
Add(EditMulti,7878121,21,21)
{
EventCount=2
WorkCount=1
VarCount=1
Width=790
Height=522
link(doWork1,12297484:doEvent1,[(46,27)(46,97)])
}
Add(Panel,13137533,56,35)
{
Width=635
Height=30
Align=2
}
Add(Button,294400,42,126)
{
Left=15
Top=5
Caption="New"
link(onClick,12836985:doEvent1,[])
}
Add(Edit,10340021,217,35)
{
Left=185
Top=5
Width=90
Text="20000"
DataType=2
}
Add(Label,13731098,168,35)
{
Left=125
Top=7
Width=61
Height=17
Caption="Кол. строк"
}
Add(Button,11871194,308,357)
{
Left=290
Top=5
Caption="View"
link(onClick,1896552:doData,[])
}
Add(LED,11063149,301,49)
{
Left=80
Top=5
Width=20
Height=20
ColorOff=65280
}
Add(Hub,12297484,91,91)
{
OutCount=4
link(onEvent1,3301899:doWork2,[(116,97)(116,83)])
link(onEvent2,3210884:doWork1,[])
link(onEvent4,14611930:doWork2,[])
}
Add(MultiElement,3210884,217,98)
{
link(onEvent1,2339098:doAdd,[])
link(onEvent2,11063149:doOff,[(284,111)(284,62)])
link(Data1,10340021:Text,[])
}
BEGIN_SDK
Add(EditMulti,90280,28,21)
{
EventCount=2
WorkCount=2
DataCount=1
Width=636
Height=158
VOffset=7
HOffset=28
link(doWork1,15240120:doEvent1,[])
link(doWork2,15286128:doFor,[(39,41)(39,55)])
}
Add(For,15286128,49,49)
{
@Hint=#18:Количество абзацев|
IncludeEnd=1
link(onEvent,9486001:doRandom,[])
link(onStop,90280:onEvent2,[(88,62)(88,158)(603,158)(603,41)])
link(End,90280:Data1,[])
}
Add(For,11842154,154,49)
{
@Hint=#29:Количество слов в предложении|
link(onEvent,5410569:doText,[])
link(onStop,15892992:doEvent1,[(193,62)(193,97)])
link(End,1516465:Var3,[(167,40)(146,40)(146,89)])
}
Add(Random,9486001,105,49)
{
Min=7
Max=15
link(onRandom,11842154:doFor,[])
}
Add(InlineCode,5410569,203,42)
{
WorkPoints=#7:doStart|6:doText|
EventPoints=#5:onRes|
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|23: onRes : THI_Event;|5: |52: procedure doStart(var _Data:TData; Index:Word); |50: procedure doText(var _Data:TData; Index:Word);|5: end;|0:|14:implementation|0:|30:procedure THiAsmClass.doStart;|6: begin|12: Randomize;|5: end;|0:|29:procedure THiAsmClass.doText;|15:var sss:string;|16: i,j:integer;|16: _Rnd:double;|5:BEGIN|11: sss:=' ';|24: j:=round(Random*12)+2;|19: for i:=0 to j do|9: begin|18: _Rnd:=Random;|42: if _Rnd<0.0003 then sss:=sss+'ё' else|42: if _Rnd<0.0007 then sss:=sss+'ъ' else|42: if _Rnd<0.0033 then sss:=sss+'ф' else|42: if _Rnd<0.0065 then sss:=sss+'э' else|42: if _Rnd<0.0101 then sss:=sss+'щ' else|42: if _Rnd<0.0149 then sss:=sss+'ц' else|42: if _Rnd<0.0213 then sss:=sss+'ю' else|42: if _Rnd<0.0286 then sss:=sss+'ш' else|41: if _Rnd<0.038 then sss:=sss+'ж' else|42: if _Rnd<0.0477 then sss:=sss+'х' else|42: if _Rnd<0.0598 then sss:=sss+'й' else|42: if _Rnd<0.0742 then sss:=sss+'ч' else|42: if _Rnd<0.0901 then sss:=sss+'б' else|42: if _Rnd<0.1066 then sss:=sss+'з' else|42: if _Rnd<0.1236 then sss:=sss+'г' else|41: if _Rnd<0.141 then sss:=sss+'ь' else|40: if _Rnd<0.16 then sss:=sss+'ы' else|42: if _Rnd<0.1801 then sss:=sss+'я' else|42: if _Rnd<0.2063 then sss:=sss+'у' else|42: if _Rnd<0.2344 then sss:=sss+'п' else|42: if _Rnd<0.2642 then sss:=sss+'д' else|42: if _Rnd<0.2963 then sss:=sss+'м' else|42: if _Rnd<0.3312 then sss:=sss+'к' else|42: if _Rnd<0.3752 then sss:=sss+'л' else|42: if _Rnd<0.4206 then sss:=sss+'в' else|42: if _Rnd<0.4679 then sss:=sss+'р' else|42: if _Rnd<0.5226 then sss:=sss+'с' else|42: if _Rnd<0.5852 then sss:=sss+'т' else|42: if _Rnd<0.6522 then sss:=sss+'н' else|42: if _Rnd<0.7257 then sss:=sss+'и' else|42: if _Rnd<0.8058 then sss:=sss+'а' else|42: if _Rnd<0.8903 then sss:=sss+'е' else|34: if _Rnd<1 then sss:=sss+'о'; |9: end;|25: _hi_onEvent(onRes,sss);|4:END;|0:|0:|4:end.|
link(onRes,15879034:doWork2,[])
}
Add(StrCat,13455235,308,42)
{
Point(doClear)
link(Str1,7063167:Var3,[(314,33)(328,33)(328,82)])
}
Add(Hub,15240120,70,28)
{
link(onEvent1,5410569:doStart,[(193,34)(193,48)])
link(onEvent2,9486001:doRandomize,[(95,41)(95,62)])
}
Add(DoData,7170534,308,98)
{
link(onEventData,16600547:doTrim,[])
link(Data,7063167:Var2,[])
}
Add(GetDataEx,7063167,308,77)
{
link(Data,13455235:Result,[])
}
Add(Hub,15892992,203,91)
{
OutCount=3
link(onEvent1,7526937:doData,[(242,97)(242,62)])
link(onEvent2,7170534:doData,[])
link(onEvent3,13455235:doClear,[(298,111)(298,55)])
}
Add(DoData,7526937,252,56)
{
Data=String(. )
link(onEventData,15879034:doWork3,[(291,62)])
}
Add(HubEx,15879034,287,42)
{
link(onEvent,13455235:doStrCat,[])
}
Add(StrCase,14266070,406,98)
{
Type=3
link(onModify,131368:doString,[])
}
Add(Trim,16600547,357,98)
{
Char=" "
Mode=4
link(onTrim,14266070:doModify,[])
}
Add(FormatStr,131368,469,98)
{
DataCount=3
Mask="%1;%2;%3"
link(onFString,90280:onEvent1,[(508,104)(508,34)])
link(Str1,15286128:Position,[(475,89)(461,89)(461,138)(55,138)])
link(Str3,1516465:Var2,[(489,82)(349,82)(349,124)(111,124)])
}
Add(GetDataEx,1516465,105,84)
{
link(Data,9486001:Random,[])
}
END_SDK
Add(Hub,12836985,91,126)
{
OutCount=3
link(onEvent1,3301899:doWork3,[(123,132)])
link(onEvent3,14611930:doWork3,[(130,146)])
}
Add(HubEx,3301899,119,77)
{
link(onEvent,16463242:doEvent1,[])
}
Add(StrList,2339098,371,98)
{
Point(doSave)
Point(onGetString)
Point(doGetString)
Point(Index)
link(onGetString,9145784:doAdd,[])
}
Add(DoData,1896552,371,357)
{
link(onEventData,11295191:doWork3,[(480,363)])
link(Data,2339098:Text,[])
}
Add(HubEx,14611930,126,112)
{
Angle=3
link(onEvent,3646847:doStart,[(130,111)])
}
Add(Hub,16463242,238,77)
{
link(onEvent1,11063149:doOn,[(291,83)(291,69)])
link(onEvent2,2339098:doClear,[(291,90)(291,111)])
}
Add(Thread,3646847,161,105)
{
Delay=20
FastStop=0
link(onExec,3210884:doWork2,[])
}
Add(Edit,12435698,42,189)
{
Left=475
Top=5
Width=90
Text="Поиск"
ClearAfterEnter=1
link(onEnter,9152135:doEvent1,[])
}
Add(ArrayFind,2459761,154,203)
{
Partial=0
link(onFind,3063742:doCompare,[])
link(Array,2339098:Array,[(160,187)(391,187)])
link(Index,5227215:Result,[(167,194)(258,194)(258,257)(307,257)])
link(Value,12435698:Text,[(174,180)(125,180)(125,236)(48,236)])
}
Add(StrList,9145784,434,105)
{
}
Add(Hub,11830510,266,203)
{
link(onEvent1,2339098:doGetString,[(291,209)(291,139)])
link(onEvent2,5227215:doOperation,[])
}
Add(Math,5227215,301,210)
{
Op2=1
ResultType=0
link(onResult,9525593:doWork3,[(361,216)(361,251)(130,251)])
}
Add(HubEx,9525593,126,203)
{
link(onEvent,2459761:doFind,[])
}
Add(If_else,3063742,210,203)
{
Type=5
Op2=Integer(-1)
link(onTrue,11830510:doEvent1,[])
link(onFalse,12969291:doData,[(249,216)(249,279)])
}
Add(DoData,12969291,434,273)
{
link(onEventData,11295191:doWork2,[])
link(Data,9145784:Text,[])
}
Add(HubEx,11295191,476,273)
{
Angle=3
link(onEvent,7878121:onEvent2,[(480,34)])
}
Add(Hub,9152135,91,196)
{
link(onEvent1,9145784:doClear,[(116,202)(116,174)(410,174)(410,118)])
link(onEvent2,9525593:doWork2,[])
}
END_SDK
Add(MST_Virtual,15555683,665,357)
{
MSTControl="MTStrTbl"
Point(doSetVirtIdx)
Point(doInitPage)
link(VirtualData,8915826:GetData,[])
}
Add(MathParse,4883725,413,385)
{
MathStr="(%2 - sign(%1) * 3) * ((%2 - sign(%1) * 3) >= 0)"
ResultType=0
link(onResult,5531226:doCompare,[])
link(X2,15555683:CurVirtIdx,[(426,376)(503,376)(503,411)(671,411)])
}
Add(If_else,5531226,462,385)
{
Type=1
link(onTrue,7810322:doEvent2,[])
link(Op2,3982646:Result,[])
}
Add(EventFromData,8915826,665,252)
{
link(onEvent,9504609:doSeparateMT,[])
}
Add(MTStrTbl,7148080,203,357)
{
Top=30
Width=615
Height=450
Align=5
Name="MTStrTbl"
Columns=#4:1=50|5:2=500|4:3=59|
VirtualTab=0
Redaction=0
Point(PerPage)
Point(onMouseWheel)
Point(onResize)
link(onMouseWheel,11792436:doWork2,[])
link(onResize,4426873:doEvent1,[])
}
Add(ScrollBar,16623256,525,252)
{
Left=615
Top=30
Width=20
Height=481
Align=3
Kind=1
Point(doMax)
Point(doPage)
link(onPosition,7810322:doEvent1,[(571,258)(571,384)])
}
Add(Hub,7810322,581,378)
{
InCount=2
link(onEvent1,16623256:doPosition,[(606,384)(606,244)(515,244)(515,258)])
link(onEvent2,15555683:doSetVirtIdx,[])
}
Add(Hub,8443177,259,112)
{
OutCount=6
link(onEvent1,282946:doClear,[(487,118)(487,90)])
link(onEvent2,4383086:doText,[])
link(onEvent3,4841056:doEnum,[(508,132)(508,174)])
link(onEvent4,3982646:doOperation,[(452,139)(452,265)])
link(onEvent5,1849321:doWork1,[(312,146)])
link(onEvent6,11792436:doWork1,[(298,153)])
}
Add(MT_String,3044787,588,161)
{
link(onResult,9566642:doAdd,[])
}
Add(MT_Array,11072840,994,245)
{
}
Add(ArrayRW,8474984,994,294)
{
link(onRead,8915826:doData,[(1033,300)(1033,237)(655,237)(655,258)])
link(Array,11072840:Array,[])
}
Add(Hub,2250609,917,252)
{
link(onEvent1,16286328:doWork2,[])
link(onEvent2,11072840:doLoad,[(949,265)(949,251)])
}
Add(MT_MTArray,282946,637,84)
{
}
Add(MT_MTArrayRW,9566642,637,147)
{
Point(Count)
link(Array,8658213:Var2,[])
}
Add(ArrayEnum,4841056,532,168)
{
link(onItem,3044787:doMT,[])
link(Array,4383086:Array,[])
}
Add(MT_MTArrayRW,8098985,868,252)
{
link(onRead,2250609:doEvent1,[])
link(Array,8658213:Var3,[(874,124)])
}
Add(GetDataEx,8658213,637,119)
{
link(Data,282946:Array,[])
}
Add(MT_MultiData,9504609,721,252)
{
Count=3
link(onData1,4168005:doCompare,[])
link(onData3,8474984:doRead,[(767,272)(767,300)])
}
Add(HubEx,11792436,294,385)
{
link(onEvent,4883725:doCalc,[])
}
Add(ChangeMon,11255964,385,462)
{
link(onData,15555683:doInitPage,[(648,468)(648,398)])
link(Data,2394025:Var2,[])
}
Add(Math,3982646,469,259)
{
OpType=1
link(onResult,16623256:doMax,[])
link(Op1,4383086:Count,[(475,159)(531,159)])
link(Op2,10991670:Var3,[(482,250)])
}
Add(GetDataEx,2394025,385,420)
{
Angle=3
link(Data,7148080:PerPage,[(237,425)])
}
Add(DoData,1295136,413,266)
{
link(onEventData,16623256:doPage,[])
link(Data,10991670:Var2,[])
}
Add(GetDataEx,10991670,413,245)
{
Angle=3
link(Data,2394025:Var1,[(391,250)])
}
Add(Hub,4426873,266,392)
{
link(onEvent1,11255964:doData,[(291,398)(291,468)])
link(onEvent2,1849321:doWork3,[(312,405)])
}
Add(HubEx,1849321,308,266)
{
link(onEvent,1295136:doData,[])
}
Add(If_else,4168005,784,252)
{
Type=1
link(onTrue,8098985:doRead,[])
link(onFalse,16286328:doWork3,[(858,265)(858,293)(977,293)])
link(Op2,9566642:Count,[(797,229)(650,229)])
}
Add(HubEx,16286328,973,252)
{
link(onEvent,11072840:doClear,[])
}


Редактировалось 2 раз(а), последний 2020-12-01 17:56:55
карма: 15

1
Голосовали:Joiner
Ответов: 207
Рейтинг: 14
#24: 2020-12-01 18:12:36 ЛС | профиль | цитата
Ну и очистить память можно в StrList после загона в массив. Всем Спасибо за помощь.
карма: 2

0
Разработчик
Ответов: 26113
Рейтинг: 2126
#25: 2020-12-01 18:12:39 ЛС | профиль | цитата
Вот так будет более правильно

Схема


Add(MainForm,3063237,287,91)
{
Width=651
Height=550
link(onCreate,11085202:doWork1,[])
}
Add(StrList,4383086,665,98)
{
Point(EndIdx)
Point(doGetString)
Point(onGetString)
Point(StrToFind)
}
Add(ChildPanel,11085202,343,105)
{
link(onEvent2,8443177:doEvent1,[])
}
BEGIN_SDK
Add(EditMulti,7878121,21,21)
{
EventCount=2
WorkCount=1
VarCount=1
Width=790
Height=522
link(doWork1,12297484:doEvent1,[(46,27)(46,97)])
}
Add(Panel,13137533,56,35)
{
Width=635
Height=30
Align=2
}
Add(Button,294400,42,126)
{
Left=15
Top=5
Caption="New"
link(onClick,12836985:doEvent1,[])
}
Add(Edit,10340021,217,35)
{
Left=185
Top=5
Width=90
Text="20000"
DataType=2
}
Add(Label,13731098,168,35)
{
Left=125
Top=7
Width=61
Height=17
Caption="Кол. строк"
}
Add(Button,11871194,308,357)
{
Left=290
Top=5
Caption="View"
link(onClick,1896552:doData,[])
}
Add(LED,11063149,301,49)
{
Left=80
Top=5
Width=20
Height=20
ColorOff=65280
}
Add(Hub,12297484,91,91)
{
OutCount=4
link(onEvent1,3301899:doWork2,[(116,97)(116,83)])
link(onEvent2,3210884:doWork1,[])
link(onEvent4,14611930:doWork2,[])
}
Add(MultiElement,3210884,217,98)
{
link(onEvent1,2339098:doAdd,[])
link(onEvent2,11063149:doOff,[(284,111)(284,62)])
link(Data1,10340021:Text,[])
}
BEGIN_SDK
Add(EditMulti,90280,28,21)
{
EventCount=2
WorkCount=2
DataCount=1
Width=636
Height=158
VOffset=7
HOffset=28
link(doWork1,15240120:doEvent1,[])
link(doWork2,15286128:doFor,[(39,41)(39,55)])
}
Add(For,15286128,49,49)
{
@Hint=#18:Количество абзацев|
IncludeEnd=1
link(onEvent,9486001:doRandom,[])
link(onStop,90280:onEvent2,[(88,62)(88,158)(603,158)(603,41)])
link(End,90280:Data1,[])
}
Add(For,11842154,154,49)
{
@Hint=#29:Количество слов в предложении|
link(onEvent,5410569:doText,[])
link(onStop,15892992:doEvent1,[(193,62)(193,97)])
link(End,1516465:Var3,[(167,40)(146,40)(146,89)])
}
Add(Random,9486001,105,49)
{
Min=7
Max=15
link(onRandom,11842154:doFor,[])
}
Add(InlineCode,5410569,203,42)
{
WorkPoints=#7:doStart|6:doText|
EventPoints=#5:onRes|
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|23: onRes : THI_Event;|5: |52: procedure doStart(var _Data:TData; Index:Word); |50: procedure doText(var _Data:TData; Index:Word);|5: end;|0:|14:implementation|0:|30:procedure THiAsmClass.doStart;|6: begin|12: Randomize;|5: end;|0:|29:procedure THiAsmClass.doText;|15:var sss:string;|16: i,j:integer;|16: _Rnd:double;|5:BEGIN|11: sss:=' ';|24: j:=round(Random*12)+2;|19: for i:=0 to j do|9: begin|18: _Rnd:=Random;|42: if _Rnd<0.0003 then sss:=sss+'ё' else|42: if _Rnd<0.0007 then sss:=sss+'ъ' else|42: if _Rnd<0.0033 then sss:=sss+'ф' else|42: if _Rnd<0.0065 then sss:=sss+'э' else|42: if _Rnd<0.0101 then sss:=sss+'щ' else|42: if _Rnd<0.0149 then sss:=sss+'ц' else|42: if _Rnd<0.0213 then sss:=sss+'ю' else|42: if _Rnd<0.0286 then sss:=sss+'ш' else|41: if _Rnd<0.038 then sss:=sss+'ж' else|42: if _Rnd<0.0477 then sss:=sss+'х' else|42: if _Rnd<0.0598 then sss:=sss+'й' else|42: if _Rnd<0.0742 then sss:=sss+'ч' else|42: if _Rnd<0.0901 then sss:=sss+'б' else|42: if _Rnd<0.1066 then sss:=sss+'з' else|42: if _Rnd<0.1236 then sss:=sss+'г' else|41: if _Rnd<0.141 then sss:=sss+'ь' else|40: if _Rnd<0.16 then sss:=sss+'ы' else|42: if _Rnd<0.1801 then sss:=sss+'я' else|42: if _Rnd<0.2063 then sss:=sss+'у' else|42: if _Rnd<0.2344 then sss:=sss+'п' else|42: if _Rnd<0.2642 then sss:=sss+'д' else|42: if _Rnd<0.2963 then sss:=sss+'м' else|42: if _Rnd<0.3312 then sss:=sss+'к' else|42: if _Rnd<0.3752 then sss:=sss+'л' else|42: if _Rnd<0.4206 then sss:=sss+'в' else|42: if _Rnd<0.4679 then sss:=sss+'р' else|42: if _Rnd<0.5226 then sss:=sss+'с' else|42: if _Rnd<0.5852 then sss:=sss+'т' else|42: if _Rnd<0.6522 then sss:=sss+'н' else|42: if _Rnd<0.7257 then sss:=sss+'и' else|42: if _Rnd<0.8058 then sss:=sss+'а' else|42: if _Rnd<0.8903 then sss:=sss+'е' else|34: if _Rnd<1 then sss:=sss+'о'; |9: end;|25: _hi_onEvent(onRes,sss);|4:END;|0:|0:|4:end.|
link(onRes,15879034:doWork2,[])
}
Add(StrCat,13455235,308,42)
{
Point(doClear)
link(Str1,7063167:Var3,[(314,33)(328,33)(328,82)])
}
Add(Hub,15240120,70,28)
{
link(onEvent1,5410569:doStart,[(193,34)(193,48)])
link(onEvent2,9486001:doRandomize,[(95,41)(95,62)])
}
Add(DoData,7170534,308,98)
{
link(onEventData,16600547:doTrim,[])
link(Data,7063167:Var2,[])
}
Add(GetDataEx,7063167,308,77)
{
link(Data,13455235:Result,[])
}
Add(Hub,15892992,203,91)
{
OutCount=3
link(onEvent1,7526937:doData,[(242,97)(242,62)])
link(onEvent2,7170534:doData,[])
link(onEvent3,13455235:doClear,[(298,111)(298,55)])
}
Add(DoData,7526937,252,56)
{
Data=String(. )
link(onEventData,15879034:doWork3,[(291,62)])
}
Add(HubEx,15879034,287,42)
{
link(onEvent,13455235:doStrCat,[])
}
Add(StrCase,14266070,406,98)
{
Type=3
link(onModify,131368:doString,[])
}
Add(Trim,16600547,357,98)
{
Char=" "
Mode=4
link(onTrim,14266070:doModify,[])
}
Add(FormatStr,131368,469,98)
{
DataCount=3
Mask="%1;%2;%3"
link(onFString,90280:onEvent1,[(508,104)(508,34)])
link(Str1,15286128:Position,[(475,89)(461,89)(461,138)(55,138)])
link(Str3,1516465:Var2,[(489,82)(349,82)(349,124)(111,124)])
}
Add(GetDataEx,1516465,105,84)
{
link(Data,9486001:Random,[])
}
END_SDK
Add(Hub,12836985,91,126)
{
OutCount=3
link(onEvent1,3301899:doWork3,[(123,132)])
link(onEvent3,14611930:doWork3,[(130,146)])
}
Add(HubEx,3301899,119,77)
{
link(onEvent,16463242:doEvent1,[])
}
Add(StrList,2339098,371,98)
{
Point(doSave)
Point(onGetString)
Point(doGetString)
Point(Index)
link(onGetString,9145784:doAdd,[])
}
Add(DoData,1896552,371,357)
{
link(onEventData,11295191:doWork3,[(480,363)])
link(Data,2339098:Text,[])
}
Add(HubEx,14611930,126,112)
{
Angle=3
link(onEvent,3646847:doStart,[(130,111)])
}
Add(Hub,16463242,238,77)
{
link(onEvent1,11063149:doOn,[(291,83)(291,69)])
link(onEvent2,2339098:doClear,[(291,90)(291,111)])
}
Add(Thread,3646847,161,105)
{
Delay=20
FastStop=0
link(onExec,3210884:doWork2,[])
}
Add(Edit,12435698,42,189)
{
Left=475
Top=5
Width=90
Text="Поиск"
ClearAfterEnter=1
link(onEnter,9152135:doEvent1,[])
}
Add(ArrayFind,2459761,154,203)
{
Partial=0
link(onFind,3063742:doCompare,[])
link(Array,2339098:Array,[(160,187)(391,187)])
link(Index,5227215:Result,[(167,194)(258,194)(258,257)(307,257)])
link(Value,12435698:Text,[(174,180)(125,180)(125,236)(48,236)])
}
Add(StrList,9145784,434,105)
{
}
Add(Hub,11830510,266,203)
{
link(onEvent1,2339098:doGetString,[(291,209)(291,139)])
link(onEvent2,5227215:doOperation,[])
}
Add(Math,5227215,301,210)
{
Op2=1
ResultType=0
link(onResult,9525593:doWork3,[(361,216)(361,251)(130,251)])
}
Add(HubEx,9525593,126,203)
{
link(onEvent,2459761:doFind,[])
}
Add(If_else,3063742,210,203)
{
Type=5
Op2=Integer(-1)
link(onTrue,11830510:doEvent1,[])
link(onFalse,12969291:doData,[(249,216)(249,279)])
}
Add(DoData,12969291,434,273)
{
link(onEventData,11295191:doWork2,[])
link(Data,9145784:Text,[])
}
Add(HubEx,11295191,476,273)
{
Angle=3
link(onEvent,7878121:onEvent2,[(480,34)])
}
Add(Hub,9152135,91,196)
{
link(onEvent1,9145784:doClear,[(116,202)(116,174)(410,174)(410,118)])
link(onEvent2,9525593:doWork2,[])
}
END_SDK
Add(MST_Virtual,15555683,812,357)
{
MSTControl="MTStrTbl"
Point(doSetVirtIdx)
Point(VirtIdx)
Point(doInitPage)
link(VirtualData,8915826:GetData,[])
}
Add(MathParse,4883725,560,385)
{
MathStr="(%2 - sign(%1) * 3) * ((%2 - sign(%1) * 3) >= 0)"
ResultType=0
link(onResult,5531226:doCompare,[])
link(X2,15555683:CurVirtIdx,[(573,376)(650,376)(650,411)(818,411)])
}
Add(If_else,5531226,609,385)
{
Type=1
link(onTrue,7810322:doEvent2,[])
link(Op2,3982646:Result,[])
}
Add(EventFromData,8915826,812,252)
{
link(onEvent,1287353:doEvent1,[])
}
Add(MTStrTbl,7148080,350,357)
{
Top=30
Width=615
Height=450
Align=5
Name="MTStrTbl"
Columns=#4:1=50|5:2=500|4:3=59|
VirtualTab=0
Redaction=0
Point(PerPage)
Point(onMouseWheel)
Point(onResize)
link(onMouseWheel,11792436:doWork2,[])
link(onResize,4426873:doEvent1,[])
}
Add(ScrollBar,16623256,672,252)
{
Left=615
Top=30
Width=20
Height=481
Align=3
Kind=1
Point(doMax)
Point(doPage)
link(onPosition,7810322:doEvent1,[(718,258)(718,384)])
}
Add(Hub,7810322,728,378)
{
InCount=2
link(onEvent1,16623256:doPosition,[(753,384)(753,244)(662,244)(662,258)])
link(onEvent2,15555683:doSetVirtIdx,[])
}
Add(Hub,8443177,406,112)
{
OutCount=6
link(onEvent1,282946:doClear,[(634,118)(634,90)])
link(onEvent2,4383086:doText,[])
link(onEvent3,4841056:doEnum,[(655,132)(655,174)])
link(onEvent4,3982646:doOperation,[(599,139)(599,265)])
link(onEvent5,1849321:doWork1,[(459,146)])
link(onEvent6,11792436:doWork1,[(445,153)])
}
Add(MT_String,3044787,735,161)
{
link(onResult,9566642:doAdd,[])
}
Add(MT_Array,11072840,1036,259)
{
}
Add(ArrayRW,8474984,1036,308)
{
link(onRead,8915826:doData,[(1075,314)(1075,244)(802,244)(802,258)])
link(Array,11072840:Array,[])
}
Add(MT_MTArray,282946,784,84)
{
}
Add(MT_MTArrayRW,9566642,784,147)
{
link(Array,8658213:Var2,[])
}
Add(ArrayEnum,4841056,679,168)
{
link(onItem,3044787:doMT,[])
link(Array,4383086:Array,[])
}
Add(MT_MTArrayRW,8098985,973,259)
{
Point(Count)
link(onRead,11072840:doLoad,[])
link(Array,8658213:Var3,[(979,124)])
}
Add(GetDataEx,8658213,784,119)
{
link(Data,282946:Array,[])
}
Add(MT_MultiData,9504609,910,259)
{
Count=3
link(onData1,8098985:doRead,[])
link(onData3,8474984:doRead,[(963,279)(963,314)])
}
Add(HubEx,11792436,441,385)
{
link(onEvent,4883725:doCalc,[])
}
Add(ChangeMon,11255964,532,462)
{
link(onData,15555683:doInitPage,[(795,468)(795,398)])
link(Data,2394025:Var2,[])
}
Add(Math,3982646,616,259)
{
OpType=1
link(onResult,16623256:doMax,[])
link(Op1,4383086:Count,[(622,159)(678,159)])
link(Op2,10991670:Var3,[(629,250)])
}
Add(GetDataEx,2394025,532,420)
{
Angle=3
link(Data,7148080:PerPage,[(384,425)])
}
Add(DoData,1295136,560,266)
{
link(onEventData,16623256:doPage,[])
link(Data,10991670:Var2,[])
}
Add(GetDataEx,10991670,560,245)
{
Angle=3
link(Data,2394025:Var1,[(538,250)])
}
Add(Hub,4426873,413,392)
{
link(onEvent1,11255964:doData,[(438,398)(438,468)])
link(onEvent2,1849321:doWork3,[(459,405)])
}
Add(HubEx,1849321,455,266)
{
link(onEvent,1295136:doData,[])
}
Add(Hub,1287353,875,252)
{
link(onEvent1,11072840:doClear,[(900,258)(900,251)(1012,251)(1012,272)])
link(onEvent2,9504609:doSeparateMT,[])
}

карма: 22

1
Голосовали:Joiner
Ответов: 5227
Рейтинг: 587
#26: 2020-12-01 19:42:21 ЛС | профиль | цитата
Да, это что то. Если это простые схемы с VirtualGrid то
карма: 4
Мой форум - http://hiasm.bbtalk.me/ схемы, компоненты...
0
Разработчик
Ответов: 26113
Рейтинг: 2126
#27: 2020-12-01 22:05:03 ЛС | профиль | цитата
andrestudio писал(а):
Если это простые схемы с VirtualGrid то

А что в них сильно сложного?
карма: 22

0
Ответов: 783
Рейтинг: 168
#28: 2020-12-01 22:22:23 ЛС | профиль | цитата
nesco писал(а):
А что в них сильно сложного?

Согласен. Схему ещё порезал.

Add(MainForm,16337641,70,77)
{
Width=651
Height=550
link(onCreate,11085202:doWork1,[])
}
Add(StrList,4383086,609,77)
{
}
Add(ChildPanel,11085202,126,91)
{
link(onEvent2,8443177:doEvent1,[])
}
BEGIN_SDK
Add(EditMulti,7878121,21,21)
{
EventCount=2
WorkCount=1
VarCount=1
Width=790
Height=522
link(doWork1,12297484:doEvent1,[(46,27)(46,97)])
}
Add(Panel,13137533,56,35)
{
Width=635
Height=30
Align=2
}
Add(Button,294400,42,126)
{
Left=15
Top=5
Caption="New"
link(onClick,12836985:doEvent1,[])
}
Add(Edit,10340021,217,35)
{
Left=185
Top=5
Width=90
Text="20000"
DataType=2
}
Add(Label,13731098,168,35)
{
Left=125
Top=7
Width=61
Height=17
Caption="Кол. строк"
}
Add(Button,11871194,308,357)
{
Left=290
Top=5
Caption="View"
link(onClick,1896552:doData,[])
}
Add(LED,11063149,301,49)
{
Left=80
Top=5
Width=20
Height=20
ColorOff=65280
}
Add(Hub,12297484,91,91)
{
OutCount=4
link(onEvent1,3301899:doWork2,[(116,97)(116,83)])
link(onEvent2,3210884:doWork1,[])
link(onEvent4,14611930:doWork2,[])
}
Add(MultiElement,3210884,217,98)
{
link(onEvent1,2339098:doAdd,[])
link(onEvent2,11063149:doOff,[(284,111)(284,62)])
link(Data1,10340021:Text,[])
}
BEGIN_SDK
Add(EditMulti,90280,28,21)
{
EventCount=2
WorkCount=2
DataCount=1
Width=636
Height=158
VOffset=7
HOffset=28
link(doWork1,15240120:doEvent1,[])
link(doWork2,15286128:doFor,[(39,41)(39,55)])
}
Add(For,15286128,49,49)
{
@Hint=#18:Количество абзацев|
IncludeEnd=1
link(onEvent,9486001:doRandom,[])
link(onStop,90280:onEvent2,[(88,62)(88,158)(603,158)(603,41)])
link(End,90280:Data1,[])
}
Add(For,11842154,154,49)
{
@Hint=#29:Количество слов в предложении|
link(onEvent,5410569:doText,[])
link(onStop,15892992:doEvent1,[(193,62)(193,97)])
link(End,1516465:Var3,[(167,40)(146,40)(146,89)])
}
Add(Random,9486001,105,49)
{
Min=7
Max=15
link(onRandom,11842154:doFor,[])
}
Add(InlineCode,5410569,203,42)
{
WorkPoints=#7:doStart|6:doText|
EventPoints=#5:onRes|
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|23: onRes : THI_Event;|5: |52: procedure doStart(var _Data:TData; Index:Word); |50: procedure doText(var _Data:TData; Index:Word);|5: end;|0:|14:implementation|0:|30:procedure THiAsmClass.doStart;|6: begin|12: Randomize;|5: end;|0:|29:procedure THiAsmClass.doText;|15:var sss:string;|16: i,j:integer;|16: _Rnd:double;|5:BEGIN|11: sss:=' ';|24: j:=round(Random*12)+2;|19: for i:=0 to j do|9: begin|18: _Rnd:=Random;|42: if _Rnd<0.0003 then sss:=sss+'ё' else|42: if _Rnd<0.0007 then sss:=sss+'ъ' else|42: if _Rnd<0.0033 then sss:=sss+'ф' else|42: if _Rnd<0.0065 then sss:=sss+'э' else|42: if _Rnd<0.0101 then sss:=sss+'щ' else|42: if _Rnd<0.0149 then sss:=sss+'ц' else|42: if _Rnd<0.0213 then sss:=sss+'ю' else|42: if _Rnd<0.0286 then sss:=sss+'ш' else|41: if _Rnd<0.038 then sss:=sss+'ж' else|42: if _Rnd<0.0477 then sss:=sss+'х' else|42: if _Rnd<0.0598 then sss:=sss+'й' else|42: if _Rnd<0.0742 then sss:=sss+'ч' else|42: if _Rnd<0.0901 then sss:=sss+'б' else|42: if _Rnd<0.1066 then sss:=sss+'з' else|42: if _Rnd<0.1236 then sss:=sss+'г' else|41: if _Rnd<0.141 then sss:=sss+'ь' else|40: if _Rnd<0.16 then sss:=sss+'ы' else|42: if _Rnd<0.1801 then sss:=sss+'я' else|42: if _Rnd<0.2063 then sss:=sss+'у' else|42: if _Rnd<0.2344 then sss:=sss+'п' else|42: if _Rnd<0.2642 then sss:=sss+'д' else|42: if _Rnd<0.2963 then sss:=sss+'м' else|42: if _Rnd<0.3312 then sss:=sss+'к' else|42: if _Rnd<0.3752 then sss:=sss+'л' else|42: if _Rnd<0.4206 then sss:=sss+'в' else|42: if _Rnd<0.4679 then sss:=sss+'р' else|42: if _Rnd<0.5226 then sss:=sss+'с' else|42: if _Rnd<0.5852 then sss:=sss+'т' else|42: if _Rnd<0.6522 then sss:=sss+'н' else|42: if _Rnd<0.7257 then sss:=sss+'и' else|42: if _Rnd<0.8058 then sss:=sss+'а' else|42: if _Rnd<0.8903 then sss:=sss+'е' else|34: if _Rnd<1 then sss:=sss+'о'; |9: end;|25: _hi_onEvent(onRes,sss);|4:END;|0:|0:|4:end.|
link(onRes,15879034:doWork2,[])
}
Add(StrCat,13455235,308,42)
{
Point(doClear)
link(Str1,7063167:Var3,[(314,33)(328,33)(328,82)])
}
Add(Hub,15240120,70,28)
{
link(onEvent1,5410569:doStart,[(193,34)(193,48)])
link(onEvent2,9486001:doRandomize,[(95,41)(95,62)])
}
Add(DoData,7170534,308,98)
{
link(onEventData,16600547:doTrim,[])
link(Data,7063167:Var2,[])
}
Add(GetDataEx,7063167,308,77)
{
link(Data,13455235:Result,[])
}
Add(Hub,15892992,203,91)
{
OutCount=3
link(onEvent1,7526937:doData,[(242,97)(242,62)])
link(onEvent2,7170534:doData,[])
link(onEvent3,13455235:doClear,[(298,111)(298,55)])
}
Add(DoData,7526937,252,56)
{
Data=String(. )
link(onEventData,15879034:doWork3,[(291,62)])
}
Add(HubEx,15879034,287,42)
{
link(onEvent,13455235:doStrCat,[])
}
Add(StrCase,14266070,406,98)
{
Type=3
link(onModify,131368:doString,[])
}
Add(Trim,16600547,357,98)
{
Char=" "
Mode=4
link(onTrim,14266070:doModify,[])
}
Add(FormatStr,131368,469,98)
{
DataCount=3
Mask="%1;%2;%3"
link(onFString,90280:onEvent1,[(508,104)(508,34)])
link(Str1,15286128:Position,[(475,89)(461,89)(461,138)(55,138)])
link(Str3,1516465:Var2,[(489,82)(349,82)(349,124)(111,124)])
}
Add(GetDataEx,1516465,105,84)
{
link(Data,9486001:Random,[])
}
END_SDK
Add(Hub,12836985,91,126)
{
OutCount=3
link(onEvent1,3301899:doWork3,[(123,132)])
link(onEvent3,14611930:doWork3,[(130,146)])
}
Add(HubEx,3301899,119,77)
{
link(onEvent,16463242:doEvent1,[])
}
Add(StrList,2339098,371,98)
{
Point(doSave)
Point(onGetString)
Point(doGetString)
Point(Index)
link(onGetString,9145784:doAdd,[])
}
Add(DoData,1896552,371,357)
{
link(onEventData,11295191:doWork3,[(480,363)])
link(Data,2339098:Text,[])
}
Add(HubEx,14611930,126,112)
{
Angle=3
link(onEvent,3646847:doStart,[(130,111)])
}
Add(Hub,16463242,238,77)
{
link(onEvent1,11063149:doOn,[(291,83)(291,69)])
link(onEvent2,2339098:doClear,[(291,90)(291,111)])
}
Add(Thread,3646847,161,105)
{
Delay=20
FastStop=0
link(onExec,3210884:doWork2,[])
}
Add(Edit,12435698,42,189)
{
Left=475
Top=5
Width=90
Text="Поиск"
ClearAfterEnter=1
link(onEnter,9152135:doEvent1,[])
}
Add(ArrayFind,2459761,154,238)
{
Partial=0
link(onFind,3063742:doCompare,[])
link(Array,2339098:Array,[(160,187)(391,187)])
link(Index,5227215:Result,[(167,229)(258,229)(258,285)(321,285)])
link(Value,12435698:Text,[(174,222)(153,222)(153,229)(48,229)])
}
Add(StrList,9145784,434,105)
{
}
Add(Hub,11830510,266,238)
{
link(onEvent1,2339098:doGetString,[(291,244)(291,139)])
link(onEvent2,5227215:doOperation,[])
}
Add(Math,5227215,315,245)
{
Op2=1
ResultType=0
Point(doClear)
link(onResult,9525593:doWork3,[(362,251)(362,299)(130,299)])
}
Add(HubEx,9525593,126,238)
{
link(onEvent,2459761:doFind,[])
}
Add(If_else,3063742,210,238)
{
Type=5
Op2=Integer(-1)
link(onTrue,11830510:doEvent1,[])
link(onFalse,12969291:doData,[(249,251)(249,314)])
}
Add(DoData,12969291,434,308)
{
link(onEventData,11295191:doWork2,[])
link(Data,9145784:Text,[])
}
Add(HubEx,11295191,476,308)
{
Angle=3
link(onEvent,7878121:onEvent2,[(480,34)])
}
Add(Hub,9152135,91,196)
{
OutCount=3
link(onEvent1,9145784:doClear,[(116,202)(116,174)(410,174)(410,118)])
link(onEvent2,5227215:doClear,[(298,209)(298,258)])
link(onEvent3,9525593:doWork2,[(116,216)(116,244)])
}
END_SDK
Add(MST_Virtual,15555683,483,245)
{
MSTControl="MTStrTbl"
Point(doSetVirtIdx)
Point(VirtIdx)
Point(doInitPage)
link(VirtualData,8915826:GetData,[])
}
Add(MathParse,4883725,238,273)
{
MathStr="(%2 - sign(%1) * 3) * ((%2 - sign(%1) * 3) >= 0)"
ResultType=0
link(onResult,5531226:doCompare,[])
link(X2,15555683:CurVirtIdx,[(251,264)(328,264)(328,299)(489,299)])
}
Add(If_else,5531226,287,273)
{
Type=1
link(onTrue,7810322:doEvent2,[])
link(Op2,3982646:Result,[])
}
Add(EventFromData,8915826,483,189)
{
link(onEvent,1287353:doEvent1,[])
}
Add(MTStrTbl,7148080,168,161)
{
Top=30
Width=615
Height=450
Align=5
Name="MTStrTbl"
Columns=#4:1=50|5:2=500|4:3=59|
VirtualTab=0
Redaction=0
Point(PerPage)
Point(onMouseWheel)
Point(onResize)
link(onMouseWheel,7881893:doWork2,[])
link(onResize,11255964:doData,[(214,202)(214,370)])
}
Add(ScrollBar,16623256,378,217)
{
Left=615
Top=30
Width=20
Height=481
Align=3
Kind=1
Point(doMax)
Point(doPage)
link(onPosition,7810322:doEvent1,[(417,223)(417,272)])
}
Add(Hub,7810322,427,266)
{
InCount=2
link(onEvent1,16623256:doPosition,[(452,272)(452,209)(368,209)(368,223)])
link(onEvent2,15555683:doSetVirtIdx,[])
}
Add(Hub,8443177,189,98)
{
OutCount=3
link(onEvent1,4383086:doText,[])
link(onEvent2,3982646:doOperation,[(271,111)(271,230)])
link(onEvent3,7881893:doWork1,[(228,118)])
}
Add(MT_String,3044787,672,196)
{
link(onResult,11072840:doLoad,[])
}
Add(MT_Array,11072840,728,196)
{
}
Add(ArrayRW,8474984,728,245)
{
link(onRead,8915826:doData,[(774,251)(774,181)(473,181)(473,195)])
link(Array,11072840:Array,[])
}
Add(MT_MultiData,9504609,567,203)
{
Count=3
link(onData1,2637637:doRead,[])
link(onData3,8474984:doRead,[(613,223)(613,251)])
}
Add(ChangeMon,11255964,497,364)
{
link(onData,2080716:doEvent1,[(536,370)(536,356)(326,356)(326,321)])
link(Data,15555683:PerPage,[])
}
Add(Math,3982646,294,224)
{
OpType=1
ResultType=0
link(onResult,16623256:doMax,[])
link(Op1,4383086:Count,[(300,117)(622,117)])
link(Op2,7148080:PerPage,[(307,215)(202,215)])
}
Add(Hub,1287353,532,189)
{
link(onEvent1,11072840:doClear,[(711,195)(711,209)])
link(onEvent2,9504609:doSeparateMT,[(557,202)(557,209)])
}
Add(ArrayRW,2637637,623,203)
{
link(onRead,3044787:doMT,[])
link(Array,4383086:Array,[])
}
Add(Hub,2080716,336,315)
{
link(onEvent1,16623256:doPage,[(361,321)(361,237)])
link(onEvent2,15555683:doInitPage,[(466,328)(466,286)])
}
Add(HubEx,7881893,224,189)
{
Angle=1
link(onEvent,4883725:doCalc,[(228,279)])
}

карма: 15

0
Разработчик
Ответов: 26113
Рейтинг: 2126
#29: 2020-12-02 01:29:15 ЛС | профиль | цитата
Gunta писал(а):
Согласен. Схему ещё порезал.

Там еще внутри панели зачем-то два StrList-a. Почему именно два, для чего второй? Там и рабочий буферный не знаю зачем нужен, ну загрузил ты строки в первый, почему не использовать его в качестве рабочего? А то получается какая-то тройная буферизация. Может какой-то интересный алгоритм, но до меня не дошло.
карма: 22

0
Ответов: 783
Рейтинг: 168
#30: 2020-12-02 06:48:21 ЛС | профиль | цитата
nesco, панель - это генератор от Леонидаhttps://forum.hiasm.com/post/308023. Был взят для экспериментов. Я его почти не трогал. Сделал только чтобы выход был на таблицу похож, добавил поиск, было интересно узнать сколько в 1000000 строк 4-е "Ы" подряд и сколько времени займёт поиск . Забыл удалить.

Редактировалось 3 раз(а), последний 2020-12-02 07:13:47
карма: 15

0
Сообщение
...
Прикрепленные файлы
(файлы не залиты)