Ссылка на тему про EventListeners:
https://forum.hiasm.com/topic/60727/0
В общем, потестил, и вариант Galkov'a понравился больше. Тут и размеры иконок и функционал. Спасибо, Galkov!
Надо еще на скорость потестить.
Также открыл для себя linebreakEx. Не знал что он существует. --- Добавлено в 2020-04-09 12:26:53Как вообще действуют линки в Хиасм? Они типа добавляют код подключенного элемента в заголовок Uses исходника?
А по поводу этого моего второго вопроса, не посвятите в тайны Hiasm?) --- Добавлено в 2020-04-09 12:35:25Быстродействие примерно одинаковое.
Add(MainForm,6100002,252,168) { Caption="EventSourceTest" Position=1 } Add(EventTx,1,497,224) { Name="event" } Add(EventRx,7442214,588,224) { EventTransmitter="event" link(onEvent,15519122:doWork2,[]) } Add(Button,13017671,252,224) { Left=15 Top=25 Data=String(Button pressed) link(onClick,2346004:doEvent1,[]) } Add(EventRx,3957006,588,266) { EventTransmitter="event" link(onEvent,12260526:doWork2,[]) } Add(Hub,5102706,588,126) { OutCount=10 link(onEvent1,9660096:doWork1,[(655,132)]) link(onEvent2,9660096:doWork2,[]) link(onEvent3,15382537:doWork2,[]) link(onEvent4,1794076:doWork2,[]) link(onEvent5,11767980:doWork2,[]) link(onEvent6,14951612:doWork2,[]) link(onEvent7,4185216:doWork2,[]) link(onEvent8,16375624:doWork2,[]) link(onEvent9,14658296:doWork2,[]) link(onEvent10,7354415:doWork2,[]) } Add(HubEx,15519122,651,224) { link(onEvent,13676584:doValue,[]) } Add(Memory,13676584,700,224) { } Add(HubEx,9660096,651,133) { Angle=1 link(onEvent,15382537:doWork1,[]) } Add(HubEx,15382537,651,140) { Angle=1 link(onEvent,1794076:doWork1,[]) } Add(HubEx,1794076,651,147) { Angle=1 link(onEvent,11767980:doWork1,[]) } Add(HubEx,11767980,651,154) { Angle=1 link(onEvent,14951612:doWork1,[]) } Add(HubEx,4185216,651,168) { Angle=1 link(onEvent,16375624:doWork1,[]) } Add(HubEx,14951612,651,161) { Angle=1 link(onEvent,4185216:doWork1,[]) } Add(HubEx,16375624,651,175) { Angle=1 link(onEvent,14658296:doWork1,[]) } Add(HubEx,14658296,651,182) { Angle=1 link(onEvent,7354415:doWork1,[]) } Add(HubEx,7354415,651,189) { Angle=1 link(onEvent,15519122:doWork1,[]) } Add(EventRx,7464981,588,308) { EventTransmitter="event" link(onEvent,10214421:doWork2,[]) } Add(EventRx,10898616,588,350) { EventTransmitter="event" link(onEvent,7494733:doWork2,[]) } Add(EventRx,957850,588,392) { EventTransmitter="event" link(onEvent,8828265:doWork2,[]) } Add(EventRx,14992008,588,434) { EventTransmitter="event" link(onEvent,14793478:doWork2,[]) } Add(EventRx,11951554,588,476) { EventTransmitter="event" link(onEvent,4034427:doWork2,[]) } Add(EventRx,7414473,588,518) { EventTransmitter="event" link(onEvent,2351031:doWork2,[]) } Add(EventRx,13253725,588,560) { EventTransmitter="event" link(onEvent,7148200:doWork2,[]) } Add(EventRx,14929543,588,602) { EventTransmitter="event" link(onEvent,2860682:doWork3,[(655,608)]) } Add(HubEx,12260526,651,266) { Angle=3 link(onEvent,15519122:doWork3,[]) } Add(HubEx,10214421,651,308) { Angle=3 link(onEvent,12260526:doWork3,[]) } Add(HubEx,7494733,651,350) { Angle=3 link(onEvent,10214421:doWork3,[]) } Add(HubEx,8828265,651,392) { Angle=3 link(onEvent,7494733:doWork3,[]) } Add(HubEx,14793478,651,434) { Angle=3 link(onEvent,8828265:doWork3,[]) } Add(HubEx,4034427,651,476) { Angle=3 link(onEvent,14793478:doWork3,[]) } Add(HubEx,2351031,651,518) { Angle=3 link(onEvent,4034427:doWork3,[]) } Add(HubEx,7148200,651,560) { Angle=3 link(onEvent,2351031:doWork3,[]) } Add(TimeCounter,5524020,350,224) { link(onStart,9155902:doFor,[]) link(onStop,9241126:doText,[(390,237)(390,279)]) } Add(Hub,2346004,301,224) { OutCount=3 link(onEvent1,10515174:doStart,[(333,230)(333,160)]) link(onEvent2,5524020:doStart,[(333,237)(333,230)]) link(onEvent3,14913012:doStart,[(333,244)(333,335)]) } Add(Label,9241126,399,273) { Left=185 Top=40 } Add(Label,1196034,399,161) { Left=185 Top=20 } Add(TimeCounter,10515174,350,154) { link(onStart,4264307:doFor,[]) link(onStop,1196034:doText,[]) } Add(For,9155902,399,224) { End=100000 link(onEvent,6514674:doData,[]) link(onStop,5524020:doStop,[(443,237)(443,217)(339,217)(339,237)]) } Add(For,4264307,441,154) { End=100000 link(onEvent,15354119:doData,[]) link(onStop,10515174:doStop,[(485,167)(485,203)(339,203)(339,167)]) } Add(DoData,15354119,490,154) { Data=String(St) link(onEventData,5102706:doEvent1,[(545,160)(545,132)]) } Add(DoData,6514674,448,224) { Data=String(St) link(onEventData,1:doInformRecievers,[]) } Add(GlobalVarEx,2343732,504,329) { Name="s1" Point(onValue) } Add(TimeCounter,14913012,350,329) { link(onStart,15833234:doFor,[]) link(onStop,9992112:doText,[(390,342)(390,384)]) } Add(Label,9992112,399,378) { Left=185 Top=60 } Add(For,15833234,399,329) { End=100000 link(onEvent,12377601:doData,[]) link(onStop,14913012:doStop,[(443,342)(443,322)(339,322)(339,342)]) } Add(DoData,12377601,448,329) { Data=String(St) link(onEventData,2343732:doValue,[]) } Add(GlobalVarEx,2059838,588,742) { Name="s1" Point(onValue) link(onValue,4809364:doWork3,[(635,748)]) } Add(GlobalVarEx,1939668,581,735) { Name="s1" Point(onValue) link(onValue,4809364:doWork2,[]) } Add(GlobalVarEx,10665143,574,728) { Name="s1" Point(onValue) link(onValue,2764489:doWork2,[]) } Add(GlobalVarEx,5884648,567,721) { Name="s1" Point(onValue) link(onValue,11328488:doWork2,[]) } Add(GlobalVarEx,7137200,560,714) { Name="s1" Point(onValue) link(onValue,4062695:doWork2,[]) } Add(GlobalVarEx,2946237,553,707) { Name="s1" Point(onValue) link(onValue,7993813:doWork2,[]) } Add(GlobalVarEx,7747505,546,700) { Name="s1" Point(onValue) link(onValue,8867649:doWork2,[]) } Add(GlobalVarEx,1203961,539,693) { Name="s1" Point(onValue) link(onValue,14293807:doWork2,[]) } Add(GlobalVarEx,13135349,532,686) { Name="s1" Point(onValue) link(onValue,5638904:doWork2,[]) } Add(GlobalVarEx,12156357,525,679) { Name="s1" Point(onValue) link(onValue,1707676:doWork2,[]) } Add(HubEx,2860682,651,595) { Angle=3 link(onEvent,7148200:doWork3,[]) } Add(HubEx,4809364,631,735) { Angle=3 link(onEvent,2764489:doWork3,[]) } Add(HubEx,2764489,631,728) { Angle=3 link(onEvent,11328488:doWork3,[]) } Add(HubEx,11328488,631,721) { Angle=3 link(onEvent,4062695:doWork3,[]) } Add(HubEx,4062695,631,714) { Angle=3 link(onEvent,7993813:doWork3,[]) } Add(HubEx,7993813,631,707) { Angle=3 link(onEvent,8867649:doWork3,[]) } Add(HubEx,8867649,631,700) { Angle=3 link(onEvent,14293807:doWork3,[]) } Add(HubEx,14293807,631,693) { Angle=3 link(onEvent,5638904:doWork3,[]) } Add(HubEx,5638904,631,686) { Angle=3 link(onEvent,1707676:doWork3,[]) } Add(HubEx,1707676,631,679) { Angle=3 link(onEvent,2860682:doWork2,[(635,601)]) }
Редактировалось 2 раз(а), последний 2020-04-09 12:35:25
|