| Строковая таблица MT | - MST_Virtual |
MST_Virtual
Краткое описание
Клиентский модуль MTStrTbl для работы с таблицой в виртуальном режиме
Параметры
Методы
События
Свойства
Данные
Аргументы
Примеры
Пример с RealTime запросом к базе
Пример с буферизированием данных
Add(MainForm,3055292,154,371)
{
Width=528
Height=324
Position=1
Point(onClose)
Point(onKeyDown)
link(onCreate,10039190:doEvent1,[(202,391)(202,377)])
link(onClose,15386547:doClose,[])
link(onKeyDown,9146877:doCheckMask,[(201,405)(201,482)])
}
Add(EventFromData,8915826,567,182)
{
link(onEvent,2121123:doString,[])
}
Add(MST_Virtual,12888280,567,245)
{
SubItemName=0
MSTControl="tab"
Point(doSetVirtIdx)
link(VirtualData,8915826:GetData,[])
}
Add(MST_DrawManager,7694140,364,287)
{
Name="draw"
}
Add(HubEx,2245423,546,371)
{
Angle=3
link(onEvent,12888280:doResetPage,[(550,272)])
}
Add(Hub,10039190,497,371)
{
OutCount=3
link(onEvent1,5113019:doString,[])
link(onEvent2,2245423:doWork2,[(529,384)(529,377)])
link(onEvent3,8095922:doWork1,[(522,391)])
}
Add(Registry,9358416,567,322)
{
HKey=1
Key="Software\hiasm"
Value="InstallPath"
NotEmpty=1
}
Add(FormatStr,5113019,567,371)
{
DataCount=1
Mask="%1\Elements\Delphi\Elements.db"
link(onFString,15386547:doOpen,[(607,377)(607,391)])
link(Str1,9358416:RData,[])
}
Add(DS_SQLite,15386547,616,385)
{
Name="sqlite"
WaitClose=0
link(onOpen,10325432:doQuery,[])
}
Add(DSC_Query,10325432,665,385)
{
SQL="Select * From elements"
DSManager="sqlite"
link(onQuery,3438796:doQuery,[(709,391)(709,377)])
link(onColumns,285545:doAddCols,[(709,398)(709,419)])
}
Add(MST_DB,285545,721,406)
{
MSTControl="tab"
}
Add(FormatStr,2121123,616,182)
{
DataCount=4
Mask="SELECT %3\r\nFROM elements\r\nWHERE\r\n (id = 1 + %1) AND\r\n (id <= %4)\r\nLIMIT 1"
link(onFString,14158325:doQuery,[])
link(Str4,14025835:Var3,[(643,166)(825,166)(825,453)])
}
Add(MTStrTbl,7148080,364,245)
{
Left=10
Top=10
Width=505
Height=240
Name="tab"
FlatScroll=1
VirtualTab=0
DrawManager="draw"
Point(onMouseWheel)
link(onMouseWheel,4883725:doCalc,[])
}
Add(Math,7140700,644,441)
{
OpType=7
ResultType=0
link(onResult,12888280:doSetPage,[(774,447)(774,152)(550,152)(550,265)])
link(Op1,14025835:Var1,[(650,432)(685,432)(685,453)])
link(Op2,12888280:PerPage,[(657,313)(587,313)])
}
Add(MST_SelectRow,10894272,665,483)
{
MSTControl="tab"
}
Add(DoData,14280424,616,483)
{
Data=Integer(0)
link(onEventData,10894272:doSelect,[])
}
Add(Timer,15266977,567,483)
{
Interval=0
Enable=1
AutoStop=1
link(onTimer,14280424:doData,[])
}
Add(KeyMask,7768696,308,448)
{
@Hint=#9:Ctrl-Home|
Ctrl=1
Key=36
link(onFalse,2417777:doCheckMask,[(348,454)(348,440)])
link(onTrue,2245423:doWork3,[(550,461)])
}
Add(KeyMask,2417777,357,434)
{
@Hint=#8:Ctrl_End|
Ctrl=1
Key=35
link(onFalse,8511282:doCheckMask,[(397,440)(397,426)])
link(onTrue,5924517:doEvent1,[])
}
Add(KeyMask,8511282,406,420)
{
@Hint=#11:Ctrl_PageUp|
Key=33
link(onFalse,9597294:doCheckMask,[(446,426)(446,412)])
link(onTrue,12888280:doPrevPage,[(540,433)(540,258)])
}
Add(KeyMask,9597294,455,406)
{
@Hint=#13:Ctrl_PageDown|
Key=34
link(onTrue,13052868:doEvent1,[])
}
Add(Label,1909141,364,203)
{
Left=85
Top=255
Width=344
Height=17
Caption="Листание страниц -- Ctrl-Home, Ctrl-End, Ctrl-PageUp, Ctrl-PageDown"
}
Add(DSC_QueryScalar,14158325,665,182)
{
DSManager="sqlite"
link(onQuery,8915826:doData,[(704,188)(704,174)(557,174)(557,188)])
}
Add(MathParse,4883725,413,273)
{
MathStr="(%2 - sign(%1) * 3) * ((%2 - sign(%1) * 3) >= 0)"
ResultType=0
link(onResult,5531226:doCompare,[])
link(X2,10559126:Var1,[(426,257)])
}
Add(Hub,13052868,497,413)
{
link(onEvent1,12888280:doNextPage,[(530,419)(530,251)])
link(onEvent2,8095922:doWork2,[(515,426)(515,419)])
}
Add(Hub,5924517,497,441)
{
link(onEvent1,7140700:doOperation,[])
link(onEvent2,12907377:doWork2,[(515,454)(515,447)])
}
Add(HubEx,12907377,518,441)
{
Angle=1
link(onEvent,15266977:doTimer,[(522,489)])
}
Add(If_else,5531226,469,273)
{
Type=1
link(onTrue,13854401:doWork2,[])
link(Op2,271845:Var2,[])
}
Add(DSC_Query,3438796,721,371)
{
SQL="Select Max(id) From elements"
DSManager="sqlite"
link(onQuery,2809998:doValue,[])
}
Add(Math,6730752,476,189)
{
OpType=1
Op2=1
ResultType=0
}
Add(If_else,1732159,406,553)
{
Type=2
link(onTrue,66965:doOperation,[])
}
Add(Math,66965,455,553)
{
Op2=1
ResultType=0
link(onResult,1235396:doCompare,[])
link(Op1,8186636:Var2,[])
}
Add(Math,2709587,357,553)
{
Op2=1
ResultType=0
link(onResult,1732159:doCompare,[])
link(Op1,781471:Var1,[(363,530)])
}
Add(Math,4049415,385,609)
{
OpType=1
Op2=1
ResultType=0
link(onResult,7109624:doCompare,[])
link(Op1,781471:Var2,[])
}
Add(GetDataEx,781471,385,525)
{
Angle=1
link(Data,10894272:Index,[(678,530)])
}
Add(If_else,7109624,441,609)
{
Type=1
Op2=Integer(0)
link(onTrue,15484075:doOperation,[])
}
Add(Math,15484075,490,609)
{
OpType=1
Op2=1
ResultType=0
link(onResult,3208855:doWork3,[(557,615)])
link(Op1,8186636:Var3,[(496,516)])
}
Add(GetDataEx,8186636,455,511)
{
link(Data,10559126:Var2,[])
}
Add(HubEx,3208855,553,553)
{
Angle=3
link(onEvent,13854401:doWork3,[])
}
Add(If_else,1235396,504,553)
{
Type=1
link(onTrue,3208855:doWork2,[])
link(Op2,271845:Var3,[(517,236)])
}
Add(KeyMask,9604684,259,462)
{
@Hint=#9:Ctrl-Home|
Key=40
link(onFalse,7768696:doCheckMask,[(299,468)(299,454)])
link(onTrue,2709587:doOperation,[(299,475)(299,559)])
}
Add(KeyMask,9146877,210,476)
{
@Hint=#9:Ctrl-Home|
Key=38
link(onFalse,9604684:doCheckMask,[(250,482)(250,468)])
link(onTrue,4049415:doOperation,[(250,489)(250,615)])
}
Add(GetDataEx,10559126,455,252)
{
Angle=1
link(Data,12888280:CurVirtIdx,[(525,257)(525,292)(573,292)])
}
Add(GetDataEx,271845,476,231)
{
link(Data,6730752:Result,[])
}
Add(HubEx,13854401,553,273)
{
link(onEvent,12888280:doSetVirtIdx,[])
}
Add(HubEx,8095922,518,413)
{
Angle=1
link(onEvent,12907377:doWork1,[])
}
Add(Label,6642375,412,203)
{
Left=85
Top=270
Width=262
Height=17
Caption="Перемещение по пунктам -- Up, Down, MouseWell"
}
Add(Memory,2809998,784,371)
{
link(onData,6730752:doOperation,[(836,377)(836,144)(460,144)(460,195)])
}
Add(GetDataEx,14025835,784,448)
{
link(Data,2809998:Value,[])
}
Add(MainForm,8618704,77,280)
{
Width=528
Height=324
Point(onClose)
Point(onKeyDown)
link(onCreate,10039190:doEvent1,[(125,300)(125,286)])
link(onClose,15386547:doClose,[])
link(onKeyDown,9146877:doCheckMask,[(121,314)(121,391)])
}
Add(EventFromData,8915826,490,70)
{
link(onEvent,83609:doSeparateMT,[])
}
Add(MST_Virtual,12888280,490,133)
{
MSTControl="tab"
Point(doSetVirtIdx)
link(onChangeVirtIdx,12754071:doEvent1,[])
link(VirtualData,8915826:GetData,[])
}
Add(MST_DrawManager,7694140,77,231)
{
Name="draw"
}
Add(HubEx,2245423,469,280)
{
Angle=3
link(onEvent,12888280:doResetPage,[(473,160)])
}
Add(Hub,10039190,427,280)
{
OutCount=3
link(onEvent1,5113019:doString,[])
link(onEvent2,2245423:doWork2,[(455,293)(455,286)])
link(onEvent3,9886920:doWork1,[(452,300)])
}
Add(Registry,9358416,490,231)
{
HKey=1
Key="Software\hiasm"
Value="InstallPath"
NotEmpty=1
}
Add(FormatStr,5113019,490,280)
{
DataCount=1
Mask="%1\Elements\Delphi\Elements.db"
link(onFString,15386547:doOpen,[(530,286)(530,300)])
link(Str1,9358416:RData,[])
}
Add(DS_SQLite,15386547,539,294)
{
Name="sqlite"
WaitClose=0
link(onOpen,10325432:doQuery,[])
}
Add(DSC_Query,10325432,581,294)
{
SQL="Select * From elements"
DSManager="sqlite"
link(onQuery,3438796:doQuery,[(621,300)(621,286)])
link(onColumns,285545:doAddCols,[(621,307)(621,328)])
}
Add(MST_DB,285545,630,315)
{
MSTControl="tab"
}
Add(Hub,12754071,539,133)
{
link(onEvent1,3912376:doClear,[])
link(onEvent2,2121123:doString,[(570,146)(570,202)])
}
Add(FormatStr,2121123,581,196)
{
Mask="SELECT * FROM elements\r\nWHERE (id > %1) AND (id <= (SELECT Max(id) FROM elements)) LIMIT %2"
link(onFString,7059755:doQuery,[])
link(Str2,14512405:Var3,[(594,187)])
}
Add(DSC_Query,7059755,630,196)
{
DSManager="sqlite"
link(onQuery,10237983:doAdd,[])
}
Add(MT_MTArray,3912376,679,133)
{
}
Add(MT_MTArrayRW,10237983,679,182)
{
link(onRead,6533164:doWork3,[(725,188)])
link(Array,3912376:Array,[])
}
Add(MT_Array,13374168,742,70)
{
}
Add(MT_MultiData,83609,581,70)
{
From=1
link(onData1,1762967:doEvent1,[])
link(onData2,424210:doRead,[(628,83)(628,125)])
}
Add(ArrayRW,424210,742,119)
{
link(onRead,8915826:doData,[(784,125)(784,53)(481,53)(481,76)])
link(Array,13374168:Array,[])
}
Add(DoData,3603534,679,70)
{
link(onEventData,6533164:doWork2,[])
}
Add(HubEx,6533164,721,70)
{
link(onEvent,13374168:doLoad,[])
}
Add(Hub,1762967,637,70)
{
link(onEvent1,3603534:doData,[])
link(onEvent2,10237983:doRead,[(663,83)(663,188)])
}
Add(MTStrTbl,7148080,259,175)
{
Left=10
Top=10
Width=505
Height=240
Name="tab"
FlatScroll=1
VirtualTab=0
DrawManager="draw"
Point(onMouseWheel)
link(onMouseWheel,4883725:doCalc,[])
}
Add(DSC_Query,12276451,490,350)
{
SQL="Select Max(id) From elements"
DSManager="sqlite"
link(onQuery,7140700:doOperation,[])
}
Add(Math,7140700,539,350)
{
OpType=7
ResultType=0
link(onResult,12888280:doSetPage,[(793,356)(793,46)(473,46)(473,153)])
link(Op2,14512405:Var2,[])
}
Add(MST_SelectRow,10894272,588,392)
{
MSTControl="tab"
}
Add(DoData,14280424,539,392)
{
Data=Integer(0)
link(onEventData,10894272:doSelect,[])
}
Add(Timer,15266977,490,392)
{
Interval=0
Enable=1
AutoStop=1
link(onTimer,14280424:doData,[])
}
Add(KeyMask,7768696,231,357)
{
@Hint=#9:Ctrl-Home|
Ctrl=1
Key=36
link(onFalse,2417777:doCheckMask,[(271,363)(271,349)])
link(onTrue,2245423:doWork3,[(473,370)])
}
Add(KeyMask,2417777,280,343)
{
@Hint=#8:Ctrl_End|
Ctrl=1
Key=35
link(onFalse,8511282:doCheckMask,[(320,349)(320,335)])
link(onTrue,12790452:doEvent1,[])
}
Add(KeyMask,8511282,329,329)
{
@Hint=#11:Ctrl_PageUp|
Key=33
link(onFalse,9597294:doCheckMask,[(369,335)(369,321)])
link(onTrue,12888280:doPrevPage,[(466,342)(466,146)])
}
Add(KeyMask,9597294,378,315)
{
@Hint=#13:Ctrl_PageDown|
Key=34
link(onTrue,7724700:doEvent1,[])
}
Add(Label,1909141,77,189)
{
Left=85
Top=255
Width=344
Height=17
Caption="Листание страниц -- Ctrl-Home, Ctrl-End, Ctrl-PageUp, Ctrl-PageDown"
}
Add(GetDataEx,14512405,546,182)
{
Angle=3
link(Data,12888280:PerPage,[(510,187)])
}
Add(MathParse,4883725,336,203)
{
MathStr="(%2 - sign(%1) * 3) * ((%2 - sign(%1) * 3) >= 0)"
ResultType=0
link(onResult,5531226:doCompare,[])
link(X2,9898523:Var1,[(349,187)])
}
Add(If_else,5531226,399,203)
{
Type=1
link(onTrue,4788877:doWork2,[])
link(Op2,7569388:Var2,[])
}
Add(DSC_Query,3438796,630,280)
{
SQL="Select Max(id) From elements"
DSManager="sqlite"
link(onQuery,6730752:doOperation,[(801,286)(801,39)(394,39)(394,125)])
}
Add(KeyMask,9604684,182,371)
{
@Hint=#9:Ctrl-Home|
Key=40
link(onFalse,7768696:doCheckMask,[(222,377)(222,363)])
link(onTrue,2709587:doOperation,[(222,384)(222,468)])
}
Add(Hub,7724700,427,322)
{
link(onEvent1,12888280:doNextPage,[(459,328)(459,139)])
link(onEvent2,9886920:doWork2,[(445,335)(445,328)])
}
Add(Hub,12790452,427,350)
{
link(onEvent1,12276451:doQuery,[])
link(onEvent2,9414228:doWork2,[(445,363)(445,356)])
}
Add(HubEx,9414228,448,350)
{
Angle=1
link(onEvent,15266977:doTimer,[(452,398)])
}
Add(If_else,1732159,336,462)
{
Type=2
link(onTrue,66965:doOperation,[])
link(Op2,10894272:EndIdx,[(349,443)(615,443)])
}
Add(Math,66965,385,462)
{
Op2=1
ResultType=0
link(onResult,1235396:doCompare,[])
link(Op1,8186636:Var2,[])
}
Add(KeyMask,9146877,133,385)
{
@Hint=#9:Ctrl-Home|
Key=38
link(onFalse,9604684:doCheckMask,[(173,391)(173,377)])
link(onTrue,4049415:doOperation,[(173,398)(173,524)])
}
Add(Math,2709587,287,462)
{
Op2=1
ResultType=0
link(onResult,1732159:doCompare,[])
link(Op1,781471:Var1,[(293,439)])
}
Add(Math,4049415,315,518)
{
OpType=1
Op2=1
ResultType=0
link(onResult,7109624:doCompare,[])
link(Op1,781471:Var2,[])
}
Add(GetDataEx,781471,315,434)
{
Angle=1
link(Data,10894272:Index,[(601,439)])
}
Add(If_else,7109624,371,518)
{
Type=1
Op2=Integer(0)
link(onTrue,15484075:doOperation,[])
}
Add(Math,15484075,420,518)
{
OpType=1
Op2=1
ResultType=0
link(onResult,3208855:doWork3,[(480,524)])
link(Op1,8186636:Var3,[(426,425)])
}
Add(GetDataEx,8186636,385,420)
{
link(Data,9898523:Var2,[])
}
Add(HubEx,9886920,448,322)
{
Angle=1
link(onEvent,9414228:doWork1,[])
}
Add(HubEx,4788877,476,203)
{
Angle=3
link(onEvent,12888280:doSetVirtIdx,[(480,167)])
}
Add(GetDataEx,9898523,385,182)
{
Angle=1
link(Data,12888280:CurVirtIdx,[(496,187)])
}
Add(HubEx,3208855,476,455)
{
Angle=3
link(onEvent,4788877:doWork3,[])
}
Add(If_else,1235396,434,462)
{
Type=1
link(onTrue,3208855:doWork2,[(472,468)(472,461)])
link(Op2,7569388:Var3,[(447,173)])
}
Add(GetDataEx,7569388,406,168)
{
link(Data,6730752:Result,[])
}
Add(Math,6730752,406,119)
{
OpType=1
Op2=1
ResultType=0
}
Add(Label,6642375,119,189)
{
Left=85
Top=270
Width=262
Height=17
Caption="Перемещение по пунктам -- Up, Down, MouseWell"
}
Замечания
Обновление элемента: [svn]MST_Virtual.pas[/svn]
BB-code статьи для вставки
Всего комментариев: 0
(комментарии к статье еще не добавлены)