Add(MainForm,2953706,112,56)
{
Width=0
Height=0
Visible=1
Hint="USB"
AlphaBlendValue=0
Caption="USB-mon"
BorderStyle=0
TaskBar=1
DragForm=0
Point(Handle)
link(onCreate,2785249:doCreateMutex,[])
}
Add(FSMonitor,7537838,56,238)
{
Drive="D"
link(onDeviceArrival,3742146:doValue,[])
}
Add(ChildFormEx,7485313,301,238)
{
link(h,14618503:Value,[])
}
BEGIN_SDK
Add(EditMultiEx,7182566,21,21)
{
WorkCount=#7:visible|5:##add|
DataCount=#1:h|
Width=727
Height=417
VOffset=70
HOffset=70
Point(##add)
link(visible,79834:doValue,[])
}
Add(MainForm,12844173,532,259)
{
Width=176
Height=76
Color=-16777192
Visible=1
Caption="usb monitor"
BorderStyle=0
Point(doLeft)
Point(doTop)
Point(Handle)
Point(doVisible)
link(onCreate,3095889:doEvent1,[])
}
Add(Label,16127068,483,343)
{
Width=175
Height=28
Color=0
Font=[Impact,16,0,65280,204]
Hint="Название USB диска"
Transparent=0
Caption=" -USB-"
AutoSize=1
Alignment=2
Point(onMouseDown)
link(onClick,16742026:doMove,[])
}
Add(Memory,79834,175,91)
{
Point(Data)
link(onData,8202646:doStrCat,[])
}
Add(Message,557822,329,322)
{
Caption="ВНИМАНИЕ..."
Icon=1
}
Add(WinExec,4305375,182,357)
{
}
Add(StrCat,13705610,126,364)
{
Str2=":\"
link(onStrCat,4305375:doShellExec,[])
link(Str1,13926965:getVar,[])
}
Add(Hub,7783846,329,266)
{
OutCount=3
link(onEvent1,8955906:doData,[(354,272)(354,244)])
link(onEvent3,15559213:doTimer,[])
}
Add(MultiElementEx,10875571,483,287)
{
link(h,12844173:doLeft,[])
link(v,12844173:doTop,[])
}
BEGIN_SDK
Add(EditMultiEx,402591,28,21)
{
WorkCount=#11:doOperation|
EventCount=#1:h|1:v|
VarCount=#6:Result|
DataCount=#3:Op2|
Width=209
Height=179
link(doOperation,7162308:doEvent1,[(39,27)(39,97)])
}
Add(Screen,5303761,91,42)
{
}
Add(Math,6526697,91,91)
{
OpType=1
Op2=220
link(onResult,402591:h,[(172,97)(172,27)])
link(Op1,5303761:Width,[])
}
Add(Hub,7162308,56,91)
{
link(onEvent1,6526697:doOperation,[])
link(onEvent2,14274454:doOperation,[(81,104)(81,139)])
}
Add(Math,14274454,98,133)
{
OpType=1
Op2=250
link(onResult,402591:v,[(179,139)(179,34)])
link(Op1,5303761:Height,[])
}
END_SDK
Add(FSMonitor,2666506,217,259)
{
Point(onError)
link(onDeviceRemoveComplete,16160864:doCompare,[])
link(Drive,237711:getVar,[])
link(onError,12860251:doWork1,[(263,279)(263,328)])
}
Add(MoveWindow,16742026,532,343)
{
link(Handle,8141836:Var2,[])
}
Add(DiskInfo,5286124,329,91)
{
Point(ID)
link(onInfo,13434942:doString,[])
link(ID,1716049:Var3,[(335,82)])
}
Add(StrCat,8202646,224,91)
{
Str2=":"
link(onStrCat,7961137:doTimer,[])
}
Add(LineBreakEx,11756713,91,49)
{
Caption="Size"
Type=3
link(_Data,7182566:h,[])
}
Add(LineBreakEx,3555538,91,70)
{
Caption="Size"
Type=2
}
Add(Timer,7961137,273,91)
{
Interval=100
Enable=1
AutoStop=1
link(onTimer,5286124:doInfo,[])
}
Add(If_else,16160864,273,266)
{
link(onTrue,7783846:doEvent1,[])
link(Op2,1196012:getVar,[])
}
Add(MultiElement,12860251,273,322)
{
link(onEvent1,557822:doMessage,[])
}
BEGIN_SDK
Add(EditMulti,11793021,21,21)
{
EventCount=1
WorkCount=1
Width=202
Height=151
link(doWork1,4868616:doRead,[(57,27)(57,111)])
}
Add(StrList,8636926,98,49)
{
Strings=#0:|17:Ошибка нету диска|26:Ошибка нет диска в системе|17:Ошибка диск занят|22:Ошибка размонтирования|22:Ошибка отключения тома|15:Ошибка открытия|27:Ошибка завершения опрерации|0:|
}
Add(ArrayRW,4868616,112,105)
{
link(onRead,11793021:onEvent1,[(186,111)(186,27)])
link(Array,8636926:Array,[])
}
END_SDK
Add(Timer,15559213,371,280)
{
Enable=1
AutoStop=1
link(onTimer,12844173:doClose,[])
}
Add(DoData,8955906,371,238)
{
Data=String(Отключение...)
link(onEventData,4624351:doWork2,[])
}
Add(HubEx,4624351,448,238)
{
Angle=1
link(onEvent,16127068:doText,[(452,349)])
}
Add(LineBreakEx,6774541,175,140)
{
Caption="disk"
Type=3
link(_Data,79834:Value,[])
}
Add(LineBreakEx,13926965,126,336)
{
Caption="disk"
Type=2
}
Add(LineBreakEx,237711,217,231)
{
Caption="disk"
Type=2
}
Add(LineBreakEx,1196012,280,238)
{
Caption="disk"
Type=2
}
Add(FormatStr,13434942,378,91)
{
DataCount=1
Mask="%1"
link(onFString,7042777:doEvent1,[])
link(Str1,5286124:VolumeName,[(384,82)(370,82)(370,131)(349,131)])
}
Add(Label,15445642,70,364)
{
Left=5
Top=25
Width=81
Height=32
Color=0
Font=[Webdings,24,0,16776960,2]
Hint="Открыть"
Transparent=0
Caption=" М "
Alignment=2
ColorHover=16711680
link(onClick,13705610:doStrCat,[])
}
Add(Label,6020781,125,252)
{
Left=80
Top=25
Width=102
Height=30
Color=0
Font=[Wingdings,24,0,16776960,2]
Hint="Отключить"
Transparent=0
Caption=" И "
Alignment=2
ColorHover=255
link(onClick,8399941:doEvent1,[])
}
Add(RGN_SetToWindow,7533673,658,280)
{
link(Handle,8141836:Var3,[(664,271)(650,271)(650,320)])
}
Add(RGN_RoundRect,7962262,609,280)
{
Point2=4980912
rX=5
rY=5
link(onCreateRect,7533673:doSetRegion,[])
}
Add(Hub,3095889,581,273)
{
link(onEvent1,10875571:doOperation,[(601,279)(601,251)(473,251)(473,293)])
link(onEvent2,7962262:doCreateRect,[])
}
Add(GetDataEx,8141836,532,315)
{
link(Data,12844173:Handle,[])
}
Add(DirectoryChanges,4524164,672,105)
{
Flags=3
link(onChange,9914416:doWork3,[(718,111)(718,202)(529,202)])
link(DirName,1716049:Var2,[(678,58)(321,58)])
}
Add(HardDisk,6177541,539,70)
{
Size=1
link(Disk,12475465:getVar,[])
}
Add(MathParse,3628080,539,133)
{
MathStr="%2 / %1 *100"
link(onResult,2465477:doEvent1,[])
link(X1,6177541:Size,[])
link(X2,6177541:LoadSize,[(552,124)(559,124)])
}
Add(Hub,7042777,427,91)
{
OutCount=4
link(onEvent1,4624351:doWork1,[(452,97)])
link(onEvent2,9914416:doWork1,[(529,104)])
link(onEvent3,4524164:doStartWatch,[])
link(onEvent4,12844173:doVisible,[(459,118)(459,307)])
}
Add(LineBreakEx,12475465,539,35)
{
Caption="disk"
Type=2
}
Add(HubEx,9914416,525,133)
{
link(onEvent,3628080:doCalc,[])
}
Add(LedLadder,10363879,679,154)
{
Top=58
Width=176
Height=18
Align=4
Hint="Мб"
Spacing=1
Count=87
MinMid=80
Point(doHint)
}
Add(FormatStr,3791777,623,161)
{
DataCount=1
Mask="Сводобное место %1 мб"
link(onFString,10363879:doHint,[])
link(Str1,6177541:FreeSize,[(629,117)(552,117)])
}
Add(Hub,2465477,588,133)
{
link(onEvent1,10363879:doPosition,[(669,139)(669,160)])
link(onEvent2,3791777:doString,[(613,146)(613,167)])
}
Add(Hub,8399941,175,252)
{
link(onEvent1,4524164:doStopWatch,[(200,258)(200,223)(662,223)(662,118)])
link(onEvent2,2666506:doDeviceRemove,[])
}
Add(GetDataEx,1716049,315,77)
{
Angle=2
link(Data,8202646:Result,[(321,131)(230,131)])
}
END_SDK
Add(Mutex,2785249,168,70)
{
Name="usbMon"
link(onCreated,3539724:doHide,[])
link(onAlreadyExists,6821060:doWork1,[(214,83)])
}
Add(Version,13426374,56,56)
{
Version="1.09"
Description="Usb monitor"
InternalName="usb tray monitor"
E-mail="Ales_smol@mail.ru"
}
Add(TrayIcon,3539724,224,63)
{
Hint="мониторинг USB "
Point(doShowBallonTip)
link(onClick,15607121:doEvent,[])
}
Add(HardDisk,5878438,168,175)
{
link(Disk,11672151:Var2,[(174,166)(160,166)])
}
Add(If_else,13310503,175,238)
{
Type=2
Op2=Integer(1)
link(onTrue,8876181:doData,[])
link(Op1,5878438:FreeSize,[])
}
Add(Memory,3742146,112,238)
{
link(onData,13310503:doCompare,[])
}
Add(DoData,8876181,238,238)
{
link(onEventData,7485313:visible,[])
link(Data,11672151:Var3,[(244,222)])
}
Add(GetDataEx,11672151,154,217)
{
Angle=2
link(Data,3742146:Value,[(160,278)(118,278)])
}
Add(PopupMenu,16569420,336,70)
{
Menu=#11:О программе|1:-|5:Выход|0:|
link(onClick,4072000:doEvent,[])
}
Add(IndexToChanel,15607121,280,63)
{
link(onEvent2,16569420:doPopupHere,[])
}
Add(IndexToChanel,4072000,392,70)
{
Count=3
link(onEvent1,16149005:doMessage,[])
link(onEvent3,6821060:doWork2,[(431,90)(431,111)])
}
Add(Message,16149005,448,70)
{
Message="Работа с USB\r\n2019г Ales (c) Hiasm"
}
Add(HubEx,6821060,210,105)
{
Angle=2
link(onEvent,2953706:doClose,[(102,111)(102,83)])
}
Add(Memory,14618503,301,182)
{
Default=Integer(0)
}
не разобрался как правильно сделать динамическое создание и удаление экземпляра MultiElement через #add (точнее только удаления)
если кто-то обьяcнит, что да как буду благодарен.