[MainWindow_Body.AppCtrl]
@           = $TaskTab ext(1) h(14941)
_PanelFooterBg  = $TaskTabFooterBg
Header      = [InfoLink] a(lt) sz(p,a) xy(-1) subst(Text(f("Header6KGreen")) Icon(onclick(url($HelpURLMainWndAppCtl))))
Descr       = f("Description") a(la) xy(,,,15)
HipsTask	= [AppCtrl_WhiteListing] a(la)
cdp         = [AppCtrl_cdp] a(la) xy(,15)
SandBox     = [AppCtrl_Sandbox] a(la) xy(,15)

[AppCtrl_WhiteListing]
@            = alias(taskview) sz(p,a) at(clickable) onclick(window("SystemMonitor:Programs:Running"))
Stat         = [AppCtrl_WhiteListing_Stat] a(rt)
Chart        = [AppCtrl_WhiteListing_Chart] a(pt) xy(20)

[AppCtrl_WhiteListing_Chart]
@       = t(chartstat) sz(p,100)
Plot    = t(chartplotarea)
AxisY   = $ChartStatAxisY
AxisX   = $ChartStatAxisX
Val1    = t(chartseries) mg(5) bg("Chart5") v(Hips.Application.treeFind("Childs", "Name == \"KLAppTrusted\"").treeSize("Childs", "!(Id & #HIPS_APPID_FLAG_GROUP)"))
Val2    = t(chartseries) mg(5) bg("Chart4") v(Hips.Application.treeFind("Childs", "Name == \"KLAppRestrictedLow\"").treeSize("Childs", "!(Id & #HIPS_APPID_FLAG_GROUP)"))
Val3    = t(chartseries) mg(5) bg("Chart3") v(Hips.Application.treeFind("Childs", "Name == \"KLAppRestrictedHi\"").treeSize("Childs", "!(Id & #HIPS_APPID_FLAG_GROUP)"))
Val4    = t(chartseries) mg(5) bg("Chart1") v(Hips.Application.treeFind("Childs", "Name == \"KLAppUntrusted\"").treeSize("Childs", "!(Id & #HIPS_APPID_FLAG_GROUP)"))

[AppCtrl_WhiteListing_Stat]
@       = sz(180,a)
Summary = [Value2] subst(Name(f("Header0")) Val(a(rb) f("Header0") text(ctl.Val1.value + ctl.Val2.value + ctl.Val3.value + ctl.Val4.value)) ) a(at) xy(,10,,3)
Leg1    = [ChartLegend] sz(p,a) subst(Text([Value2] subst(Name(f("Description")) Val(a(rb) f("Header0") text(ctl.Val1.value)) )) Color(bg("Chart5")) ) a(sa)
Leg2    = [ChartLegend] sz(p,a) subst(Text([Value2] subst(Name(f("Description")) Val(a(rb) f("Header0") text(ctl.Val2.value)) )) Color(bg("Chart4")) ) a(sa)
Leg3    = [ChartLegend] sz(p,a) subst(Text([Value2] subst(Name(f("Description")) Val(a(rb) f("Header0") text(ctl.Val3.value)) )) Color(bg("Chart3")) ) a(sa)
Leg4    = [ChartLegend] sz(p,a) subst(Text([Value2] subst(Name(f("Description")) Val(a(rb) f("Header0") text(ctl.Val4.value)) )) Color(bg("Chart1")) ) a(sa)
AppMon  = $LinkKL a(la) xy(,8) onclick(window("SystemMonitor:Programs:Running"))

[AppCtrl_cdp]
@              = sz(p,a)
Header         = [InfoLink] xy(-1) subst(Text(f("Header6Lite")) Icon(onclick(url($HelpURLMainWndIdentity))))
Descr          = f("Description") a(la)
DescrLink      = $LinkKL a(as) onclick(window("HipsRules:ConfRes:" + #riKLPrivateData))

[AppCtrl_Sandbox]
$EnableSb = (f_isInstalled("SandBox"))
@              = sz(p,p) alias(taskview)
Header         = [InfoLink] xy(-1) subst(Text(f("Header6Lite") enable($EnableSb)) Icon(onclick(url($HelpURLMainWndSandbox))))
;SandBoxDebugSettings  = $Link a(as) onclick(window("SandBoxSettings")) text("Debug settings")
Descr          = f("Description") a(la) enable($EnableSb)
Params         = [AppCtrl_Sandbox_Params] a(la) sz(p,p) use($EnableSb)
NotAvailWarn   = a(la) i("warning") xy(,10) use($IsProcessor64Bit) f("Header1") use(!$EnableSb)

[AppCtrl_Sandbox_Params]
ParametersBlockLabel = a(la) f("Header2KGreenLite") xy(,7)
SandboxRun     = [AppCtrl_SandboxRun] a(ra) xy(,3)
ParametersBlock = [AppCtrl_ApplicationsSandListArea] a(ps) xy(10)

[AppCtrl_ApplicationsSandListArea]
@ = b(KlBorder) sz(p,p)
L = [AppCtrl_ApplicationsSandList]

[AppCtrl_ApplicationsSandList]
@           = $List sz(p,p) alias(vector) v(Apps) ext(1) at(noheader,iconview,noborder,singlesel) onshow(ctl.focus()) oninit(l_path="")
Application = ia(ct) ta(ct) mg(2,5) i(mergeIcon($AppIconBig, if(nBoxID != 1, "CleanTool,,rb"))) text($AppName) at(clickable) onrclick(edit(menu("AppCtrl_ApplicationsSandList_Menu")))
footer      = [Grid.Footer2.Template] subst(Add($LinkKL onclick(if(f_AppIDFromAppBrowsePath(AppID, l_path), (if(Apps.find("AppID == " + AppID + " && nBoxID == 1"), (balloon("SandBoxAppAlreadyExist"), false), if(f_validateSBoxPath(l_path),(nBoxID = 1, if(isAppRunning(AppID), balloon("SandBoxAfterRestart"), balloon("SandBoxAddWarn")), true), false)))))) Delete($LinkKL) Edit(use(0)) Other($LinkKL at(singleline) use(1) i("CleanTool") onclick(if(msg("SandBoxCleanConfirm", #m_yesno), f_IfErrThenMsg(sandBoxClean(1), "SandBoxCleanError")))) )

[AppCtrl_ApplicationsSandList_Menu]
@                  = t(menu)
Run                = at(default) onclick(createDir(env("SandboxSharedFolder")); sandBoxRunApp(nBoxID, f_AppInfo(AppID).sImagePath))
sep
CreateShortcut     = onclick(l_SandBoxAppSaveLinkPath = getDesktopPath().addPath(($AppName).removeFileExtension() + $CreateShortcutNameSuffix); if(fileExists(f_AppInfo(AppID).sImagePath),if(browsefilesave(l_SandBoxAppSaveLinkPath, $BrowseSaveLink, "lnk"), exec(env("ProductRoot").addPath("sbstart.exe"), "-createExtShortcut " + nBoxID + " \"" + l_SandBoxAppSaveLinkPath + "\" \"" + f_AppInfo(AppID).sImagePath + "\" \"" + FileRoot + "\"")), msg("SandBoxShortcutError", #m_error)) )
sep
AlwaysRunInSandBox = at(chklike) v(bEnabled) use(validateSBoxPath(f_AppInfo(AppID).sImagePath) != #SANDBOX_SYSTEM_PATH)
CleanHistoryAtExit = at(chklike) bp(ctl.selected = (nBoxID == 2)) onchanging(nBoxID = (ctl.value ? 2 : 1)) text($CleanHistoryAtExit)
sep
FileInfo           = onclick(dialog("AppRulesEdit:Image", p_image(f_AppInfo(AppID).sImagePath), p_appID(AppID), p_OnlyFileInfo(true)))

[AppCtrl_SandboxRun]
@         = sz(160,p)
SharedFolder = t(hotlink) f("DescriptionBlue") i("appgroup") onclick(createDir(env("SandboxSharedFolder")); open(env("SandboxSharedFolder")))
SharedFolderDescr = f("Description") a(la)

;----- Report ---------

[MainReport.Hips]
@ = [ProfileReport] subst(Group1([MainReport.SystemWatch_Events]) Stat(use(0)) )

[MainReport.SystemWatch_Events]
d = [Product_Events] subst(Report(v(#eTASK_GROUP_HIPS) filter(TaskGroup == #eTASK_GROUP_HIPS) prm(#dbRTP)) views([MainWindow.Hips_Filters]))

[NetworkMonitor_Tab_Traffic]
List = [MainWindow.SystemWatch_WorkArea_List]

[MainWindow.SystemWatch_WorkArea_List]
@           = $List alias(appstat) prm(6) refresh(100) a(la) group(dateonly,dategroup(Date),default) use(f_isInstalled("Firewall")) ext(1)
Application = at(fixedpos) ia(lc) sz(200) group(AppItem,AppId,fixed) sort($AppGroup,sortdown)
TrafficIn   = text(f_ObjSize(TrafficIn)) a(r)
TrafficOut  = text(f_ObjSize(TrafficOut)) a(r)
row         = f(depend(!level) ? "Normal_Bold" : "Normal")

[HipsRules]
@   = $Dlg at(resizable) mg(0,0) sz(720,570) alias(taskedit) ns(Hips)
Hdr = [ProductHeader] sz(p,53)
Tab = [HipsRules_Tab] xy(7,7,7,45)

[HipsRules_Tab]
@           = $Tab a(la)
;Rules       = [HipsRules_Tab_Rules] mg(7,7) h(5020)
ConfRes     = [SystemMonitor_Tab_Confidential] mg(7,7) use(!p_fwTabs) h(14817)
OSRes       = [SystemMonitor_Tab_OS] mg(7,7) use(!p_fwTabs) h(14818)
;Resources   = [HipsRules_Tab_Resources] mg(7,7) use(!p_fwTabs) h(5031)
Packets     = [HipsRules_Tab_Packets] mg(7,7) use(p_fwTabs && f_isInstalled("Firewall")) h(15867)
Nets        = [HipsRules_Tab_Nets1] mg(7,7) use(p_fwTabs && f_isInstalled("NetWatch")) h(5122)
Resources   = [HipsRules_Tab_NetResources] mg(7,7) use(p_fwTabs && f_isInstalled("Firewall")) h(16144)

[HipsRules_Tab_Resources]
@       = sz(p,p) h(16144)
CategoryLbl = xy(,4)
Category    = [HipsRules_Tab_Resources_Category]
SearchText  = a(rt) xy(180,3) text($Search)
Search      = [SystemMonitor_Search] subst( Filter(onchange( if(!ctl.value, ctl.parent.ResList.setfilter("", 2), ctl.parent.ResList.setfilter("wildcard(\"*" + escape(toupper(ctl.value)) + "*\",toupper(s_ResourceDescription(serid(Data))))", 2)))) )
ResList     = [HipsRules_Tab_Resources_GrpList] a(la) xy(,7)

[HipsRules_Tab_Resources_Category]
@   = $Combo sz(200,20) a(at) xy(7) rs(0,0) oninit($rfKLPrivateData.Childs.foreach("if(Name != \"KLOtherSoft\", ctl.add(s_ResGroupName(Name), Id))"); $rfKLOtherSoft.Childs.foreach("ctl.add(s_ResGroupName(Name), Id)"); ctl.add(s_ResGroupName("KLRoot"), #riKLPrivateData)) onchange(l_group = Resource.treeFind("Childs", "Id == ctl.value"); ctl.parent.ResList.parentGroupId = l_group.Id; ctl.parent.ResList.parentGroupFlags = l_group.Flags; ctl.parent.ResList.showRoot = (l_group.Id == #riKLPrivateData))

[HipsRules_Tab_Resources_GrpList]
@        = $List at(singlesel,noroot,expandall) alias(tree.ResGroup) v(Resource.treeFind("Childs", "Id == ctl.Category.value")) childs(Childs) oninit(l_fwInstalled = f_isInstalled("Firewall")) filter(!(Flags & #rfResourceView) && (l_fwInstalled ? true : Id != #riKLWebServices && Id != #riIPRanges)) id(Name)
Group    = sz(a) at(checked) v(bmask(Flags, #rfEnabled)) text((bmask(Flags, #rfCreateByUser) && Data && Name == "" ? $AddedByUser : s_ResGroupName(Name) )) i(Data ? s_ResourceDescriptionIcon(serid(Data)) : s_ResGroupIcon(Name))
Resource = sz(a) text(if(Data, s_ResourceDescription(serid(Data))))
;footer   = [HipsRules_Tab_Resources_GrpList.Footer] subst(Add(onclick(dialog("Hips_GroupNameEdit"))) Edit(enable(canEdit() && Id & #HIPS_RESID_FLAG_USER)) Delete(enable(canDelete() && Id & #HIPS_RESID_FLAG_USER)))
footer   = [HipsRules_Tab_Resources_GrpList.Footer] a(lb)

[HipsRules_Tab_Resources_GrpList.Footer]
@           = f("GridGroup") sz(p,22) rs(100,0)
Add         = t(hotlink) sz(a,a) a(lc) xy(5) i("listctrls,0") f("Hotlink_Normal") enable(!(parentGroupFlags & #rfDisableEdit)) onclick(if(f_ResourceType(parentGroupFlags), (Flags = Flags | #rfCreateByUser; Id = getHipsNewResID(); ParentID = parentGroupId; l_serID = s_ResourceSerID(Flags & #rtMask); Data.serinit(l_serID); if((l_serID == #stRegKeyInfo || l_serID == #stFileInfo ? dialog("BrowseForNamedRes") : s_ResourceDialog(l_serID)), (if(!(parentGroupFlags & #rtMask), mask(parentGroupFlags, #rtMask) = Flags & #rtMask); true)))))
Edit        = t(hotlink) sz(a,a) a(ac) xy(7) i("listctrls,1") f("Hotlink_Normal") enable(canEdit() && !(Flags & #rfDisableEdit) && (Id & #HIPS_RESID_FLAG_USER)) onclick( Data ? dialog("BrowseForNamedRes") : Data.Name = dialog("Hips_GroupNameEdit") )
Delete      = t(hotlink) sz(a,a) a(ac) xy(7) i("listctrls,2") f("Hotlink_Normal") enable(canDelete() && !(Flags & #rfDisableEdit) && Id & #HIPS_RESID_FLAG_USER))
AddCategory = t(hotlink) sz(a,a) a(ac) xy(7) i("listctrls,0") f("Hotlink_Normal") enable(!(parentGroupFlags & #rfDisableEdit)) onclick(add(dialog("Hips_GroupNameEdit")))
border      = a(lt) sz(p,2) bg("GridGroup")

[HipsRules_Tab_Resources_ResList]
@           = $List a(la) xy(,7) alias(vector.HipsResources) v(Resource.treeFind("Childs", "Id == ctl.Category.value").Childs) filter(Data)
Group       = sz(a) at(checked) v(bmask(Flags, #rfEnabled)) i(s_ResourceDescriptionIcon(serid(Data))) text(if(parentGroupId == #riKLProtectedApps, s_AppName(moduleAppId(Data.Path)), Name == "" ? $AddedByUser : s_ResGroupName(Name)))
Resource    = sz(a) text(s_ResourceDescription(serid(Data)))
footer      = [Grid.Footer2.Template] subst(Add(enable(!(parentGroupFlags & #rfDisableEdit)) onclick(if(f_ResourceType(parentGroupFlags), (Flags = Flags | #rfCreateByUser; Id = getHipsNewResID(); ParentID = parentGroupId; l_serID = s_ResourceSerID(Flags & #rtMask); Data.serinit(l_serID); if(dialog("BrowseForNamedRes"), (if(!(parentGroupFlags & #rtMask), mask(parentGroupFlags, #rtMask) = Flags & #rtMask); true)))))) Edit(enable(canEdit() && !(Flags & #rfDisableEdit) && (Id & #HIPS_RESID_FLAG_USER)) onclick(dialog("BrowseForNamedRes"))) Delete(enable(canDelete() && !(Flags & #rfDisableEdit) && Id & #HIPS_RESID_FLAG_USER)))

[BrowseForNamedRes]
@       = $DlgAttr sz(495,100) btns(Ok(enable(ctl.Name.Val.value != "" && ctl.Value.Val.value != ""))) h(18919)
Name	= [LValue] subst(Name() Val(t(edit) xy(60) v(Name))) sz(p)
Value   = [LValue] subst(Name() Val(t(edit) text(s_ResourceDescription(serid(Data))) xy(60) at(readonly))) a(la) xy(0,7) sz(400,a)
Browse  = $Button a(at) xy(7,27) onclick((s_WasOfferedResName(serid(Data)) ? l_prev = "" : l_prev = "*"); s_ResourceDialog(serid(Data)); ctl.Value.Val.value = s_ResourceDescription(serid(Data)); if(l_prev == "", ctl.Name.Val.value = s_OfferResName(serid(Data)) )))

[HipsRules_Tab_NetResources]
@       = sz(p,p) h(16144)
Split   = [HipsRules_Tab_NetResources_Split]

[HipsRules_Tab_NetResources_Split]
@       = t(splitter) sz(p,p) at(vertical,rememberdata)
Srv     = [HipsRules_Tab_NetResources_Srv]
Addr    = [HipsRules_Tab_NetResources_Addr]

[HipsRules_Tab_NetResources_Srv]
@           = $List alias(vector) v(depend($rfKLWebServices.Childs, ctl.Packets.List))
Resource    = sz(a) at(checked) i(s_ResourceDescriptionIcon(serid(Data))) text(s_ResourceDescription(serid(Data))) v(bmask(Flags,#rfEnabled))
footer      = [Grid.Footer2.Template] subst(Add(onclick(Id = getHipsNewResID(); ParentID = #riKLWebServices; Data.serinit(#stWebService); Flags = Flags | #rtWebService; dialog("WebServiceEdit"))) Edit(onclick(dialog("WebServiceEdit"))) Delete(enable(canDelete() && Id & #HIPS_RESID_FLAG_USER) onclick(msg("ConfirmDeleteNetResources", #m_yesno)) ))

[HipsRules_Tab_NetResources_Addr]
@           = $List alias(vector) v($rfKLIPRanges.Childs)
Resource    = sz(a) at(checked) i(s_ResourceDescriptionIcon(serid(Data))) text(s_ResourceDescription(serid(Data))) v(bmask(Flags,#rfEnabled))
footer      = [Grid.Footer2.Template] subst(Add(onclick(Id = getHipsNewResID(); ParentID = #riIPRanges; Data.serinit(#stIpRange); dialog("IpRangeEdit"))) Edit(onclick(dialog("IpRangeEdit"))) Delete(enable(canDelete() && Id & #HIPS_RESID_FLAG_USER) onclick(msg("ConfirmDeleteNetResourcesAddr", #m_yesno)) ))

[HipsRules_Tab_Rules]
@       = $List at(singlesel,noroot) alias(tree.AppGroups) v(Application) childs(Childs) unique(Id == newItem.Id,0) id(Name) h(5020)
Name    = [HipsRules_Tab_Rules_Name]
footer  = [HipsRulesList.Footer]

[HipsRules_Tab_Rules_Name]
@       = sz(200) at(dragable,fixedpos) text(Id & #HIPS_APPID_FLAG_GROUP ? s_AppGroupName(Name) : s_AppName(Id)) i(Id & #HIPS_APPID_FLAG_GROUP ? "appgroup" : getIconAsync(Name, "unkobj"))
Name    = sz(200) text(Id & #HIPS_APPID_FLAG_GROUP ? s_AppGroupName(Name) : objfile(Name)) i(Id & #HIPS_APPID_FLAG_GROUP ? "appgroup" : getIconAsync(Name, "unkobj"))
Path    = sz(250) text(if(!(Id & #HIPS_APPID_FLAG_GROUP), objdir(Name)))

[HipsRulesList.Footer]
@           = f("GridGroup") sz(p,22) rs(100,0) ext(1)
Add         = t(hotlink) sz(a,a) a(lc) xy(5) i("listctrls,0") f("Hotlink_Normal") enable(canAdd() && Id & #HIPS_APPID_FLAG_GROUP) onclick(browsefileopen(Name, $BrowseForExecutable, "exe"))
AddGroup    = t(hotlink) sz(a,a) a(ac) xy(7) i("listctrls,0") f("Hotlink_Normal") enable(canAdd() && Id & #HIPS_APPID_FLAG_GROUP) onclick(add(dialog("Hips_AppGroupNameEdit")))
Edit        = t(hotlink) sz(a,a) a(ac) xy(7) i("listctrls,1") f("Hotlink_Normal") enable(depend(canEdit())) onclick(dialog("AppRulesEdit", p_image(Name), p_appID(Id)))
Delete      = t(hotlink) sz(a,a) a(ac) xy(7) i("listctrls,2") f("Hotlink_Normal") enable(canDelete() && (Id & #HIPS_APPID_FLAG_GROUP ? Id & #HIPS_APPID_FLAG_USER && !Childs.size() : true)) onclick(isAppRunning(Id) ? balloon("AppIsRunning") : true)
Move        = t(hotlink) sz(a,a) a(ac) xy(7) i("listctrls,4") f("Hotlink_Normal") enable(canDelete() && (Id & #HIPS_APPID_FLAG_GROUP ? Id & #HIPS_APPID_FLAG_USER && !Childs.size() : true)) onclick(menu("HipsRules_Tab_Rules.Menu"))
border      = a(lt) sz(p,2) bg("GridGroup")

[HipsRules_Tab_Rules.Menu]
@           = t(menu)
Trusted     = text(s_AppGroupName("KLAppTrusted")) enable(hipsGetRootGroup(ctl.Rules.seldata().Id) != "KLAppTrusted") onclick(ctl.Rules.moveTo("Name == \"KLAppTrusted\""))
Low         = text(s_AppGroupName("KLAppRestrictedLow")) enable(hipsGetRootGroup(ctl.Rules.seldata().Id) != "KLAppRestrictedLow") onclick(ctl.Rules.moveTo("Name == \"KLAppRestrictedLow\""))
High        = text(s_AppGroupName("KLAppRestrictedHi")) enable(hipsGetRootGroup(ctl.Rules.seldata().Id) != "KLAppRestrictedHi") onclick(ctl.Rules.moveTo("Name == \"KLAppRestrictedHi\""))
Untrusted   = text(s_AppGroupName("KLAppUntrusted")) enable(hipsGetRootGroup(ctl.Rules.seldata().Id) != "KLAppUntrusted") onclick(ctl.Rules.moveTo("Name == \"KLAppUntrusted\""))

[HipsRules_Tab_Packets]
@       = sz(p,p) h(774)
Zone    = [LValue] subst(Name() Val([HipsRules_Tab_Packets_View]))
SearchText  = a(rt) xy(180,3) text($Search)
Search  = [SystemMonitor_Search] subst( Filter(onchange( if(!ctl.value, ctl.parent.List.setfilter("", 2), ctl.parent.List.setfilter("wildcard(\"*" + toupper(ctl.value) + "*\",toupper(f_AppInfo(AppIdEx).sDescription)) || wildcard(\"*" + toupper(ctl.value) + "*\",toupper(f_AppInfo(AppIdEx).sVendor)) || wildcard(\"*" + escape(toupper(ctl.value)) + "*\",toupper(f_AppInfo(AppIdEx).sImagePath))", 2)))) )
List    = [PacketRuleList] a(la) xy(,7,,27) v(vRuleList) filter(RuleTypeId == #HIPS_RULE_TYPE_PACKET || RuleTypeId == #HIPS_RULE_TYPE_FW) group(FwAppGroup,AppIdEx) subst(footer(subst(Add(onclick(f_fwRuleAdd(val))))))
Extra   = $Button_Large a(rb) onclick(dialog("FwSettings"))

[HipsRules_Tab_Packets_View]
@   = $Combo sz(185,20) a(at) xy(7) rs(0,0) oninit($rfKLNetwork.Childs.foreach("ctl.add(s_ResGroupName(Name), Id)")) onchange(ctl.List.setfilter(s_AddrFilter(ctl.value), 1))
All = v(-1)

[HipsRules_Tab_Nets1]
List = [HipsRules_Tab_Nets] sz(p,p)

[HipsRules_Tab_Nets]
@           = $List alias(vector.Networks) v(NetWatch.Zones) group(AdapterID,AdapterID,default) filter(State & #znVisible)
Name        = sz(300) text(FrendlyName) i(s_NetZoneTypeIcon(Severity)) enable(State & #znConnected)
Status      = sz(100) text(f_NetConnected(State & #znConnected))
Severity    = sz(160) text(s_NetSeverity(Severity, Settings & #znStealth))
row         = at(clickable) onrclick(if(!isNode,menu("HipsRules_Tab_Nets.Menu")))
footer      = [Grid.Footer2.Template] subst(Add(use(0)) Edit(onclick( (isNode ? dialog("AdapterEdit", p_data(NetWatch.Adapters.find("ID == val"))) : dialog("NetworkEdit");ctl.List.focus("ID==val")) )) Delete(enable(!isNode && !(State & #znConnected) && TypeOfInterface != #If_Internet)))

[HipsRules_Tab_Nets.Menu]
@           = t(menu) at(enum) v(Severity)
Untrusted   = at(radiolike) v(#znUntrusted)
Local       = at(radiolike) v(#znNetBIOS) enable(TypeOfInterface != #If_Internet)
Trusted     = at(radiolike) v(#znTrusted) enable(TypeOfInterface != #If_Internet)
;Separator
;Stealth     = at(chklike) v(bmask(Settings,#znStealth)) use(Severity == #znUntrusted)

[Grid.Groups]
AdapterID       = [Grid.Group.Template] expand(1) bp(l_adapterInfo = NetWatch.Adapters.find("ID == val")) text(l_adapterInfo.TypeOfInterface == #If_OtherNetwork ? $OtherNetworks : l_adapterInfo.FrendlyName) i(f_NetAdapterIcon(l_adapterInfo.TypeOfInterface, -1, l_adapterInfo.State, 0))
HipsRuleColumn  = at(clickable) sz(100) ia(cc) i(s_RuleState(depend(State))) tt(s_RuleStateTxt(depend(State))) onrclick(menu("HipsRuleColumn.Menu")) text()
FwAppGroup      = [FwGrid.Group.Template]

[FwGrid.Group.Template]
@           = sz(p,40) rs(100,0) f(isExpanded ? "GridGroup" : "Normal")
AppIcon     = a(lt) xy(20,4) i(val ? s_AppIconBig(val) : "appgroup.big")
PacketRules = a(ac) visible(!val) f(isExpanded ? "GridGroup" : "Normal") text($PacketRules)
AppName     = a(as) visible(val)  f(isExpanded ? "GridGroup" : "Normal") xy(,2) text(s_AppName(val) + " (" + s_AppGroupName(hipsGetRootGroup(val)) + ")")
AppPath     = a(sa) visible(val)  f(isExpanded ? "GridGroup" : "Normal") text(f_AppInfo(val).sImagePath)
AppGroup    = a(rc) visible(val)  xy(10) i(s_RuleState(getHipsRuleState(val, #riKLNetwork)))
border      = a(lb) sz(p,2) bg("GridGroup")

[HipsGroups]
@    = $DlgAttr at(resizable) sz(600,400) alias(taskedit) ns(Hips) h(p_fwRules ? 15990 : 15989)
Body	= [HipsGroups_Body]

[HipsGroups_Body]
@     = $DlgBodyAttr
Rules = [HipsGroups_Rules]

[HipsGroups_Rules]
@       = $List at(singlesel,noroot) alias(tree.AppGroups) v(Application) childs(Childs) unique(Id == newItem.Id,0) id(Name) filter(Id >= #HIPS_APPID_TRUSTED && Id <= #HIPS_APPID_UNTRUSTED)
Name    = sz(200) at(fixedpos) text(Id & #HIPS_APPID_FLAG_GROUP ? s_AppGroupName(Name) : s_AppName(Id)) i(Id & #HIPS_APPID_FLAG_GROUP ? "appgroup" : getIconAsync(Name, "unkobj"))
footer  = [HipsGroupsList.Footer]

[HipsGroupsList.Footer]
@           = f("GridGroup") sz(p,22) rs(100,0) ext(1)
Edit        = t(hotlink) sz(a,a) a(ac) xy(7) i("listctrls,1") f("Hotlink_Normal") enable(depend(canEdit())) onclick(dialog("AppRulesEdit:Rules", p_image(Name), p_appID(Id), p_postInit(p_fwRules ? "ctl.Tab.Rules.Lists.Select.value = \"Net\"" : "ctl.Tab.Rules.Lists.Select.value = \"Files\"")))
border      = a(lt) sz(p,2) bg("GridGroup")

[MainWindow.Hips_Filters]
@
AllItems    = v("1200010003b2;Ti14100000a40000000000000000;Ap00000000d4;Pa0000000033;Na0000000037;PI0000000035;Co0000000035;Ta1002000050;Ac10000000a0;Ob1000000104;Ty100000003c;Pa2000000064;Na2000000064;Ve1000000096;De000000001e;De100000001e;De100000001e;De100000001e;Ex100000001e;Re2002000050;")
ByApp       = v("120001000322;Ti10100000a4;Ap04020000d4;Pa0000000033;Na0000000037;PI0000000035;Co0000000035;Ta1002000050;Ac10000000a0;Ob1000000148;Ty100000003c;Pa200000008c;Na2000000080;Ve1000000096;De000000001e;De100000001e;De100000001e;De100000001e;Ex100000001e;Re2002000050;") at(default)

[MainWindow.SystemWatch_WorkArea_Home_Body]
@           = ext(1)
HipsTask    = [MainWindow.SystemWatch.Hips] xy(,,,7) use(f_isInstalled(ctl.id))
Firewall    = [MainWindow.SystemWatch.Fw] xy(,,,7) use(f_isInstalled(ctl.id))
pdm         = [MainWindow.SystemWatch.pdm] xy(,,,7) use(f_isInstalled(ctl.id))
KavDescr    = $KavDescr text($KavDescr_sw)

[MainWindow.SystemWatch_WorkArea_SysPerf]
@           = sz(p,p) ext(1)
Traffic     = [ProfileHome_Chart] subst(Name() Chart([MainWindow.SystemWatch_WorkArea_SysPerf_Chart]) Legend([MainWindow.SystemWatch_WorkArea_SysPerf_Legend]) ) use(f_isInstalled("Firewall")) visible(!ctl.parent.Detected.visible || Gui.SystemWatchChartMode == 0)
Detected    = [ProfileHome_Chart] subst(Name() Chart([MainWindow.SystemWatch_WorkArea_SysPerf_Chart_Detected]) Legend([MainWindow.SystemWatch_WorkArea_SysPerf_Legend_Detected]) ) use(f_isInstalled("HipsTask") || f_isInstalled("pdm")) visible(!ctl.parent.Traffic.visible || Gui.SystemWatchChartMode == 1)

[MainWindow.SystemWatch_WorkArea_SysPerf_Legend]
Legend1 = [ChartLegend] subst(Text() Color(bg("Chart2")))
Legend2 = [ChartLegend] subst(Text() Color(bg("Chart5")))

[MainWindow.SystemWatch_WorkArea_SysPerf_Chart]
@       = t(chart) alias(chartsink) cprops(line,diff,60) refresh(1000) at(noborder, clickable) type(bytes) onclick($ProfileHome_Report) onrclick(if(f_isInstalled("Firewall") && (f_isInstalled("HipsTask") || f_isInstalled("pdm")), menu("SystemWatchChartMenu")))
Report  = $Link a(lt) xy(20) text($Reports) onclick(window("MainReport:SystemWatch"))
line1   = t(chartline) id(Hips_InBytes) bg("Chart2") tt($TipText_Hips_InBytes)
line2   = t(chartline) id(Hips_OutBytes) bg("Chart5") tt($TipText_Hips_OutBytes)
Plot    = t(chartplotarea) f("PlotAreaFont")
AxisY   = $DynamicChartAxisY
AxisX   = $DynamicChartAxisX

[MainWindow.SystemWatch_WorkArea_SysPerf_Legend_Detected]
Legend1 = [ChartLegend] subst(Text() Color(bg("Chart1"))) f_isInstalled("HipsTask")
Legend2 = [ChartLegend] subst(Text() Color(bg("Chart6"))) f_isInstalled("pdm")

[MainWindow.SystemWatch_WorkArea_SysPerf_Chart_Detected]
@       = t(chart) alias(chartsink) cprops(line,diff,60) refresh(1000) at(noborder, clickable) type(bytes) onclick($ProfileHome_Report) onrclick(if(f_isInstalled("Firewall") && (f_isInstalled("HipsTask") || f_isInstalled("pdm")), menu("SystemWatchChartMenu")))
Report  = $Link a(lt) xy(20) text($Reports) onclick(window("MainReport:SystemWatch"))
line1   = t(chartline) id(Hips_UntrustAppCount) bg("Chart1") tt($TipText_Hips_UntrustAppCount) f_isInstalled("HipsTask")
line2   = t(chartline) id(pdm_TreatsCount) bg("Chart6") tt($TipText_pdm_TreatsCount) f_isInstalled("pdm")
Plot    = t(chartplotarea) f("PlotAreaFont")
AxisY   = $DynamicChartAxisY
AxisX   = $DynamicChartAxisX

[SystemWatchChartMenu]
@                   = t(menu) bg1("MenuIconBg") at(enum) v(Gui.SystemWatchChartMode)
SwitchToTraffic     = at(radiolike) v(#ChartMode_CheckedObjects)
SwitchToDetected    = at(radiolike) v(#ChartMode_DetectedObjects)

[MainWindow.SystemWatch.SysWatch]
@       = $TaskSubGroup
Check   = [TaskCheck]
Descr   = sz(a,a) a(la) xy(23,5)

[MainWindow.SystemWatch.Hips]
@       = $TaskSubGroup
Check   = [TaskCheck]
Sett    = $Link a(rt) onclick(windowDlg("HipsRules:Rules"))
SettDet = [OptionsWindow_Navigator_WorkArea_SystemWatch_Body_Hips_Sett] $TaskValShift

[MainWindow.SystemWatch.Fw]
@           = $TaskSubGroup
Check       = [TaskCheck]
Mode        = $TaskVal subst(Name() Val($Link a(rt) text(s_FwWorkMode(Hips.FirewallSettings.WorkingMode)) onclick(menu("[Hips_FwWorkModeMenu]"))))
NetPackets  = $TaskVal subst(Name() Val($Link onclick(windowDlg("HipsRules:Packets", p_fwTabs(true)))))

[MainWindow.SystemWatch.pdm]
@               = $TaskSubGroup
Check           = [TaskCheck]
DetectMethods   = $TaskVal subst(Name() Val($Link onclick(windowDlg("PdmSettings"))))

[MainWindow.Hips.Tasks]
@           = ext(1)
NetMon      = [Task.NetMon]
Security    = [Task.SecurityWizard]

[Hips_ResStateMenu]
@           = t(menu) at(enum)
Allow       = at(radiolike) v(#ehsssAllow) text(s_HipsSubSystemState(#ehsssAllow))
AsAppCfg    = at(radiolike) v(#ehsssApp)   text(s_HipsSubSystemState(#ehsssApp))
Deny        = at(radiolike) v(#ehsssDeny)  text(s_HipsSubSystemState(#ehsssDeny)) extprm(1) use(0)
sep
Settings    = text($Settings) extprm(1)

[Hips_FwWorkModeMenu]
$txt    = text(const(s_FwWorkMode(ctl.value)))
@       = t(menu) at(enum) v(Hips.FirewallSettings.WorkingMode)
Allow   = at(radiolike) $txt v(#fwAllowAll)
ByRule  = at(radiolike) $txt v(#fwAllow)
Block   = at(radiolike) $txt v(#fwBlockAll)

[FwSettings]
@           = $Dlg sz(300,a) h(7455)
FtpTracking = $Check v(bmask(FirewallSettings.Flags, #fwFtpTracking))
NoGuiAction = $Check xy(,7) v(bmask(FirewallSettings.Flags, #fwCantAskDeny))
OnShutdown  = $Check xy(,7,,$DialogPanelSizeY) v(bmask(FirewallSettings.Flags, #fwNotShutDown))

;------------ FileInfo_Tab ---------------------

[FileInfo_Tab]
@               = sz(p,p)
Sandbox			= a(la) xy(,7) text($RunningInSandbox) use(f_isSandboxed(p_pid))
; remove focus from ctl.File item: ctl._invisible item focused by default
_invisible      = t(edit) sz(0,0) a(sa)
File            = [LValue] xy(,7) subst(Name() Val(t(edit) at(readonly,singleline,compresspath,noborder) xy(110) text(f_displayPath(p_pid, ModuleInfo.sImagePath)))) a(sa)
FileNotExist    = [FileInfo_Tab_IfFileNotExist]
GroupPInfo      = [FileInfo_Tab_GroupProductInfo]
GroupSign       = [FileInfo_Tab_GroupSignature]

[FileInfo_Tab_IfFileNotExist]
@       = $SettingsGroup xy(-7,) a(la) use( !(AppDFlags & 0x01) )
;File    = [LValue] xy(,) subst(Name() Val(xy(110) text(ModuleInfo.sImagePath)))
Descr   = a(la) sz(p,a) xy(110,14)

[FileInfo_Tab_GroupProductInfo]
@           = $SettingsGroup xy(-7,10) a(la) use(AppDFlags & 0x01)
;File        = [LValue] xy(,) subst(Name() Val(xy(80) text(ModuleInfo.sImagePath)))
Vendor      = [LValue] xy(,) subst(Name() Val(xy(110) text(ModuleInfo.sVendor)))
Product     = [LValue] xy(,$Control_Shift) subst(Name() Val(xy(110) text(ModuleInfo.sProduct)))
Version     = [LValue] xy(,$Control_Shift) subst(Name() Val(xy(110) text(ModuleInfo.sVersion)))
Size        = [LValue] xy(,10) subst(Name() Val(xy(110) text(f_ObjSize(ModuleInfo.nObjectSize))))
Created     = [LValue] xy(,$Control_Shift) subst(Name() Val(xy(110) text(ModuleInfo.tCreation > 0 ? datetime(ModuleInfo.tCreation) : "")))
Modified    = [LValue] xy(,$Control_Shift) subst(Name() Val(xy(110) text(datetime(ModuleInfo.tModify))))

[FileInfo_Tab_GroupSignature]
@           = $SettingsGroup xy(-7,10) a(la) use(AppDFlags & 0x01)
Group       = [LValue] xy(,) subst(Name(a(lt)) Val(xy(110) f("Normal_Bold") text(f_AppRootGroupName(strGroupPath) + $AppGroupByUser ))) use(strGroupPath)
Rating      = [LValue] xy(,$Control_Shift) subst(Name(a(lt)) Val(xy(110) text(s_PMRating(Rating))))
ScanResult  = [LValue] xy(,$Control_Shift) subst(Name(a(lt)) Val(xy(110) text(ScanResult.DetectName))) use(ScanDetected && ScanResult.DetectName)
KLDataBase  = [LValue] xy(,$Control_Shift) subst(Name(a(lt)) Val(xy(110) text(f_KLDbStatus()))) use(!Signature.sSignerOrganization)
Origin      = [LValue] xy(,$Control_Shift) subst(Name(a(lt)) Val(xy(110) text(f_ProcessInfo(EventCreated.PID).Module.sImagePath))) use(EventCreated.PID)
Sign        = [LValue] xy(,$Control_Shift) subst(Name(a(lt)) Val(xy(110) text(f_SignStatus())))
SignDate    = [LValue] xy(,$Control_Shift) subst(Name(a(lt)) Val(xy(110) text(datetime(Signature.dtSignedTime)))) use(Signature.dtSignedTime)

;---------- AppExecuteChain ------------

[AppExecuteChain]
@           = $DlgAttrBase at(resizable,a_close) sz(400,300) h(15838)
Hdr         = [AppExecuteChain_Hdr]
Separator   = [AppExecuteChain_Separator]
Chain       = [AppExecuteChain_List]

[AppExecuteChain_Hdr]
@       = a(la) sz(p,a) rs(100,0) xy(-7,-7,-7) mg(7,7,7,7) bg("ColorWindow")
Ico     = sz(32,32) i(getIcon(f_AppInfo(Id).sImagePath, "unkapp", 1))
Name    = a(ac) xy(7) sz(p,a) f("Header1") text(f_ProcessName(RunInfo.UniqPid))

[AppExecuteChain_Separator]
@ = sz(p,1) a(la) b(Group) xy(-7,,-7) rs(100,0)

[AppExecuteChain_List]
@ = $List alias(vector) a(la) xy(,7,,$DialogPanelSizeY) rs(100,100) at(sorted,rememberdata) v(processChain(RunInfo.Parents, RunInfo.UniqPid))
StartTime = a(r) text(datetime(dtStartTime))
PID       = a(r) text(NativePid)
Program   = [AppExecuteChain_List_Program] text(f_ProcessName(UniqPid)) i(s_AppIcon(AppId))
Status    = text(f_AppStatusName(GroupInfo))

[AppExecuteChain_List_Program]
Description = text(f_ProcessInfo(UniqPid).Module.sDescription) i(s_AppIcon(AppId))
File        = text(objfile(f_ProcessInfo(UniqPid).Module.sImagePath))
Folder      = text(objdir(f_ProcessInfo(UniqPid).Module.sImagePath))
Vendor      = text(f_ProcessInfo(UniqPid).Module.sVendor)
Product     = text(f_ProcessInfo(UniqPid).Module.sProduct)
Version     = a(r) text(f_ProcessInfo(UniqPid).Module.sVersion)
Size        = a(r) text(f_ObjSize(f_ProcessInfo(UniqPid).Module.nObjectSize))
Created     = a(r) text(f_ProcessInfo(UniqPid).Module.tCreation > 0 ? datetime(f_ProcessInfo(UniqPid).Module.tCreation) : "")
Modified    = a(r) text(datetime(f_ProcessInfo(UniqPid).Module.tModify))

;---------- AppRulesEdit ------------

[AppRulesEdit]
@           = $Dlg at(resizable) sz(400,500) alias(appprop) ns(Hips) onok(p_WasChild && isSettingsDirty() ? msg("ConfirmChangeStatusWithChild", #m_yesno) : true)
Hdr         = [AppRulesEdit_Hdr]
Separator   = [AppRulesEdit_Separator]
Tab         = [AppRulesEdit_Tab]

[AppRulesEdit_Hdr]
@       = a(la) sz(p,a) rs(100,0) xy(-7,-7,-7) mg(7,7,7,7) bg("ColorWindow")
Ico     = sz(a,a) i(const(appID & #HIPS_APPID_FLAG_GROUP ? "appgroup.big" : getIcon(ModuleInfo.sImagePath, "unkapp", 1)))
Name    = a(ac) xy(7) sz(p,a) f("Header1") text(const(appID & #HIPS_APPID_FLAG_GROUP ? s_AppGroupName(ModuleInfo.sImagePath) : f_UnknownApp(ModuleInfo.sDescription, ModuleInfo.sImagePath)))

[AppRulesEdit_Separator]
@ = sz(p,1) a(la) b(Group) xy(-7,,-7) rs(100,0)

[AppRulesEdit_Tab]
@           = $Tab a(la) xy(,7,,$DialogPanelSizeY) rs(100,100)
Image       = [FileInfo_Tab] mg(7,7) use(!(appID & #HIPS_APPID_FLAG_GROUP)) h(5037)
Group       = [AppRulesEdit_Tab_Group] mg(7,7) h(15988)
Runtime     = [AppRulesEdit_Tab_Runtime] mg(7,7) h(5038)
Rules       = [AppRulesEdit_Tab_Rules] mg(7,7) h(14924)
History     = [AppRulesEdit_Tab_History] mg(7,7) h(5046)
Excludes    = [AppRulesEdit_Tab_Excludes] mg(7,7) h(14830)
;SandBox     = [AppRulesEdit_Tab_SandBox] mg(7,7) h(14675) use(f_isSandBoxAllowedForThisApp(appID))

[AppRulesEdit_Tab_Runtime]
@           = sz(p,p) use(!p_OnlyFileInfo && !(appID & #HIPS_APPID_FLAG_GROUP))
Process     = [AppRulesEdit_Tab_Runtime_OpenProcesses]
LParents    = a(la) sz(p,a) xy(, 7) use(Parents.size())
Parents     = [AppRulesEdit_Tab_Runtime_Parents]
ExecInf     = [AppRulesEdit_Tab_Runtime_GroupExecute]
Changes     = [AppRulesEdit_Tab_Changes]

[AppRulesEdit_Tab_Runtime_OpenProcesses]
@       = $List a(lt) sz(p,70) alias(vector) v(Processes)
PID     = sz(100) text(nID)
User    = sz(200) text(sName)

[AppRulesEdit_Tab_Runtime_Parents]
@       = $List a(la) xy(, 7) sz(p,100) alias(vector) v(Parents) use(Parents.size())
row     = bg(s_ProcessBackndByGroupName(sName))
Name    = sz(200) text(s_AppName(nID))
Group   = sz(100) text(s_AppGroupName(sName))

[AppRulesEdit_Tab_Runtime_GroupExecute]
@           = $SettingsGroup xy(-7,10) a(la) use(nExecuteCountTotal)
ExecCount   = [LValue] xy(,) subst(Name() Val(xy(150) text( nExecuteCountFromLastChange + if( (nExecuteCountFromLastChange != nExecuteCountTotal), "  (" + nExecuteCountTotal + ")" )))))
LastExec    = [LValue] xy(,7) subst(Name() Val(xy(150) text(datetime(nLastExecuteTime))))

[AppRulesEdit_Tab_Changes]
@           = $SettingsGroup xy(-7,10) use(OwnerPid)
Created     = [AppRulesEdit_Tab_Changes_Created]
Modified    = [AppRulesEdit_Tab_Changes_Modified]
Deleted     = [AppRulesEdit_Tab_Changes_Deleted]

[AppRulesEdit_Tab_Changes_Created]
@       = a(la) sz(p, a) use(EventCreated.PID)
Created = [LValue] xy(,7) subst(Name() Val(xy(150) text(datetimeDT(EventCreated.Timestamp))))
Descr   = a(as) xy(,) text(f_ProcessInfo(EventCreated.PID).Module.sImagePath)

[AppRulesEdit_Tab_Changes_Modified]
@           = a(la) sz(p, a) use(EventModified.PID)
Modified    = [LValue] xy(,7) subst(Name() Val(xy(150) text(datetimeDT(EventModified.Timestamp))))
Descr       = a(as) xy(14,) text(f_ProcessInfo(EventModified.PID).Module.sImagePath)

[AppRulesEdit_Tab_Changes_Deleted]
@       = a(la) sz(p, a) use(EventDeleted.PID)
Deleted = [LValue] xy(,7) subst(Name() Val(xy(150) text(datetimeDT(EventDeleted.Timestamp))))
Descr   = a(as) xy(14,) text(f_ProcessInfo(EventDeleted.PID).Module.sImagePath)

;-----------

[AppRulesEdit_Tab_Rules]
@       = sz(p,p) use(!p_OnlyFileInfo && Application.treeFind("Childs", "Id == appID") && f_isInstalled("Hips"))
Inherit = $Check a(lb) xy(,,,7) v(invert(bmask(Application.treeFind("Childs", "Id == appID").Flags, #HIPS_APP_FLAG_NOINHERIT))) use(!(appID & #HIPS_APPID_FLAG_GROUP))
Lists   = [AppRulesEdit_Tab_Rules_Lists] a(lp)

[AppRulesEdit_Tab_Rules_Lists]
@       = sz(p,p)
Select  = [AppRulesEdit_Tab_Rules_Select]
Files   = [AppRulesEdit_Tab_Rules_Files]
Permiss = [AppRulesEdit_Tab_Rules_Permiss]
Net     = [PacketRuleList] xy(,27) v(vRuleList) visible(ctl.parent.Select.value == "Net") filter(AppIdEx == appID && RuleTypeId == #HIPS_RULE_TYPE_FW) subst(footer(visible(!(appID & #HIPS_APPID_FLAG_GROUP)) subst(Add(enable(!(appID & #HIPS_APPID_FLAG_GROUP)) onclick(f_fwRuleAdd(appID)))))) use(f_isInstalled("Firewall"))

[AppRulesEdit_Tab_Rules_Select]
@       = t(combo) a(la) sz(p,20) at(rememberdata)
Files
Permiss
Net     = use(f_isInstalled("Firewall"))

[AppRulesEdit_Tab_Rules_Files]
$Col    = sz(a)  ia(cc) text("") at(clickable)
@       = $List xy(,27) at(noroot) alias(tree.ResRule) v(Resource) childs(Childs) filter(Name != "KLPermissionSystem" && Name != "KLPermissionAppAccess" && Name != "KLPermissionProcManage" && Name != "KLPermissionProcEmbed" && Name != "KLPermissionSysObjAccess" && Name != "KLPermissionStrange" && Name != "KLPermissionHiddenNetAct" && Name != "KLPermissionPrivileges" && Name != "KLDevicesUSB" && Name != "KLDevicesBluetooth" && !Data && !(Flags & #rfFilesRegistryView)) visible(ctl.parent.Select.value == "Files") id(Name)
Name    = sz(200) text(s_ResGroupName(Name))
Read    = $Col i(f_AppRuleIcon(depend(Rule.AccessFlag) >> 4)) onrclick(menu("HipsAppRuleMenu.1"))
Write   = $Col i(f_AppRuleIcon(depend(Rule.AccessFlag))) onrclick(menu("HipsAppRuleMenu.0"))
Remove  = $Col i(f_AppRuleIcon(depend(Rule.AccessFlag) >> 12)) onrclick(menu("HipsAppRuleMenu.3"))
Create  = $Col i(f_AppRuleIcon(depend(Rule.AccessFlag) >> 8)) onrclick(menu("HipsAppRuleMenu.2"))

[AppRulesEdit_Tab_Group]
@       = sz(p,p) use(!p_OnlyFileInfo && (appID & #HIPS_APPID_FLAG_GROUP) && (s_AppGroupDetails(ModuleInfo.sImagePath) || bindok("Name")))
Name    = [LValue] subst(Name() Val(t(edit) v(inout(s_AppGroupName(Name), Name)) onok(if(!Name, balloon("NeedName"))))) enable(const(appID & #HIPS_APPID_FLAG_USER)) use(bindok("Name"))
Descr   = [AppRulesEdit_Tab_Group_Descr]

[AppRulesEdit_Tab_Group_Descr]
@       = $SettingsGroup use(s_AppGroupDetails(ModuleInfo.sImagePath))
Details = a(la) sz(p,a) text(s_AppGroupDetails(ModuleInfo.sImagePath))

[AppRulesEdit_Tab_Rules_Permiss]
@       = $List at(expandall) a(lt) xy(,27) alias(tree.ResRule) v(Resource) childs(Childs) root(Name == "KLPrivileges") visible(ctl.parent.Select.value == "Permiss")
Name    = sz(250) text(s_ResGroupName(Name))
Allow   = sz(a) ia(cc) text("") at(clickable) i(f_AppRuleIcon(depend(Rule.AccessFlag))) onrclick(menu("HipsAppRuleMenu.0"))

[AppRulesEdit_Tab_History]
@       = sz(p,p) use(!p_OnlyFileInfo && !(appID & #HIPS_APPID_FLAG_GROUP) && f_isInstalled("Hips"))
Events  = [AppRulesEdit_Tab_History_Events]

[AppRulesEdit_Tab_History_Events]
@       = xy(7,7) sz(p, p) ext(1)
List    = [Product_Events_Report_Ex] subst(Report(xy(-7,) v(#eTASK_GROUP_HIPS) prm(#dbRTP) filter(TaskGroup == #eTASK_GROUP_HIPS && (AppID == appID || ObjectID == appID || OldObjectID == appID))) Time(group()) Reason(use(0)) Task(use(0)))

[AppRulesEdit_Tab_Excludes]
@           = sz(p,p) use(!p_OnlyFileInfo && !(appID & #HIPS_APPID_FLAG_GROUP) && f_isInstalled("Hips")) ns(Excludes)
Settings    = [TrustedAppEdit_Body]

[AppRulesEdit_Tab_SandBox]
$GetAppSandBox   = Apps.find("AppID == " + appID)
@           = sz(p,p) use(!(appID & #HIPS_APPID_FLAG_GROUP) && f_isInstalled("SandBox")) alias(taskview) ns(SandBox)
Use         = $Check v(inout(Apps.find("AppID == " + appID), ctl.value ? Apps.find("AppID == " + appID, #vAdd, "AppID = " + appID + ", nBoxID = 1") : Apps.find("AppID == " + appID, #vRemove) )) xy(,,,$Control_Shift)
AlwaysRunInSandBox = $Check xy(18,,,$Control_Shift) enable(ctl.Use.value) onok($GetAppSandBox.bEnabled = ctl.value;#true) oninit(ctl.value = $GetAppSandBox.bEnabled)
CleanHistoryAtExit = $Check a(sa) enable(1) text($CleanHistoryAtExit) onok($GetAppSandBox.nBoxID = (ctl.value ? 2 : 1);#true) oninit(ctl.value = ($GetAppSandBox.nBoxID == 2)) enable(ctl.Use.value)

[HipsAppRuleMenu]
$txt        = text(const(s_AppRule(ctl.value)))
@           = t(menu) at(enum) ext(1) bg("MenuIconBg") onchanging( (ctl.value==#HIPS_FLAG_DENY && (isAppInHipsGroup(appID, "Microsoft") || Name == "KLAppTrusted")) ? msg("ConfirmDenyTrustedApp", #m_yesno) : true )
Inherit     = at(radiolike) v(#HIPS_FLAG_INHERIT) extprm(1) $txt
Separator
Allow       = at(radiolike) i("States,0,0,0,0,0,0") v(#HIPS_FLAG_ALLOW) extprm(1) $txt
Deny        = at(radiolike) i("States,2,2,2,2,2,2") v(#HIPS_FLAG_DENY) extprm(1) $txt
Ask         = at(radiolike) i("States,6,6,6,6,6,6") v(#HIPS_FLAG_ASK) extprm(1) $txt
ByApp       = at(radiolike) i("States,10,10,10,10,10,10") v(#HIPS_FLAG_BYAPP) extprm(1) $txt use(0)
Separator
Log         = at(chklike) i("States,8,8,8,8,8,8") extprm(1) text(const(s_AppRule(#HIPS_FLAG_LOG)))

[HipsAppRuleMenu.0]
@ = [HipsAppRuleMenu] v(mask(EditRule.AccessFlag, 0xb)) subst(Log(v(bmask(EditRule.AccessFlag, #HIPS_FLAG_LOG))))

[HipsAppRuleMenu.1]
@ = [HipsAppRuleMenu] v(shift(mask(EditRule.AccessFlag, 0xb0), 4)) subst(Log(v(bmask(EditRule.AccessFlag, #HIPS_FLAG_LOG << 4))))

[HipsAppRuleMenu.2]
@ = [HipsAppRuleMenu] v(shift(mask(EditRule.AccessFlag, 0xb00), 8)) subst(Log(v(bmask(EditRule.AccessFlag, #HIPS_FLAG_LOG << 8))))

[HipsAppRuleMenu.3]
@ = [HipsAppRuleMenu] v(shift(mask(EditRule.AccessFlag, 0xb000), 12)) subst(Log(v(bmask(EditRule.AccessFlag, #HIPS_FLAG_LOG << 12))))

[Hips_GroupNameEdit]
@ = [EditSimpleItem] subst(Name() Example(use(0))) ext(1) at(nohelp)

[Hips_AppGroupNameEdit]
@ = [EditSimpleItem] subst(Name() Example(use(0))) ext(1) at(nohelp)

[Hips_ResListAddMenu]
@           = t(menu) v(mask(Flags, #rtMask)) at(enum)
File        = at(radiolike) v(#rtFileInfo)
Registry    = at(radiolike) v(#rtRegKeyInfo)
WebService  = at(radiolike) v(#rtWebService)
IpRange     = at(radiolike) v(#rtIpRange)

[HipsRuleColumn.Menu]
@           = t(menu) at(enum) v(EditState) bg("MenuIconBg") onchanging( (ctl.value==#HIPS_RULE_STATE_DENY && (isAppInHipsGroup(Id, "Microsoft") || Name == "KLAppTrusted") )? msg("ConfirmDenyTrustedApp", #m_yesno) : true )
Inherit     = at(radiolike) i(s_RuleState(getHipsRuleState(ParentID, EditResID) + #HIPS_RULE_STATE_INH_DENY)) v(#HIPS_RULE_STATE_INH) use(ParentID != #HIPS_APPID_ROOT)
Separator
Allow       = at(radiolike) i("States,0,0,0,0,0,0") v(#HIPS_RULE_STATE_ALLOW)
Deny        = at(radiolike) i("States,2,2,2,2,2,2") v(#HIPS_RULE_STATE_DENY)
Ask         = at(radiolike) i("States,6,6,6,6,6,6") v(#HIPS_RULE_STATE_ASK)

;---------- WebServiceEdit ------------

[WebServiceEdit]
@           = $Dlg sz(430,185) onapply(c_ws().clear()) h(5051) btns(Ok(enable(Id & #HIPS_RESID_FLAG_USER)))
Name        = [LValue] subst(Name() Val(t(edit) xy(120) v(Name) onok(if(!Name, balloon("NeedName"))))) enable(Id & #HIPS_RESID_FLAG_USER)
Protocol    = [LValue] xy(,7) subst(Name(t(check) v(bmask(Data.Flags,#wsProtocol)) enable(Id & #HIPS_RESID_FLAG_USER)) Val([WebServiceEdit_Prot] ))
Direction   = [LValue] xy(,7) subst(Name() Val([WebServiceEdit.Direction] xy(120))) enable((Id & #HIPS_RESID_FLAG_USER)) visible(ctl.Protocol.Val.ProtEn.value!=58 && ctl.Protocol.Val.ProtEn.value!=1)
IcmpType    = [LValue] xy(,7) visible(f_isIcmp(ctl.Protocol.Val.ProtEn.value)) enable(ctl.Protocol.Name.value && (Id & #HIPS_RESID_FLAG_USER)) subst(Name(t(check) v(bmask(Data.Flags,#wsIcmpType))) Val([WebServiceEdit.IcmpType] xy(120) enable(bmask(Data.Flags,#wsIcmpType))))
IcmpCode    = [LValue] xy(,7) visible(f_isIcmp(ctl.Protocol.Val.ProtEn.value)) enable(ctl.Protocol.Name.value && bmask(Data.Flags,#wsIcmpType) && (Id & #HIPS_RESID_FLAG_USER)) subst(Name(t(check) v(bmask(Data.Flags,#wsIcmpCode))) Val([WebServiceEdit.IcmpCode] xy(120)))
RemotePorts = [LValue] xy(,7) visible(f_isTcpUdp(ctl.Protocol.Val.ProtEn.value) && bmask(Data.Flags,#wsProtocol)) enable(ctl.Protocol.Name.value && (Id & #HIPS_RESID_FLAG_USER)) subst(Name() Val(t(edit) xy(120) oninit(ctl.value = f_formatPorts(Data.RemotePorts);if(ctl.value == "0",ctl.value = "",true)) onok(if(ctl.visible, f_ParsePortsError(ctl.value, Data.RemotePorts), true))))
LocalPorts  = [LValue] xy(,7) visible(f_isTcpUdp(ctl.Protocol.Val.ProtEn.value) && bmask(Data.Flags,#wsProtocol)) enable(ctl.Protocol.Name.value && (Id & #HIPS_RESID_FLAG_USER)) subst(Name() Val(t(edit) xy(120) oninit(ctl.value = f_formatPorts(Data.LocalPorts);if(ctl.value == "0",ctl.value = "",true))  onok(if(ctl.visible, f_ParsePortsError(ctl.value, Data.LocalPorts), true))))

[WebServiceEdit.Direction]
$txt        = text(const(s_NetDirection(ctl.value)))
@           = $Combo a(lt) v(Data.Direction)
In          = $txt v(#wsIn)
InStream    = $txt v(#wsInStream)
InOut       = $txt v(#wsInOut)
Out         = $txt v(#wsOut)
OutStream   = $txt v(#wsOutStream)

[WebServiceEdit_Prot]
@		= sz(p,a) xy(120)
ProtEn  = [WebServiceEdit_Prot_ComboEn] visible(bmask(Data.Flags,#wsProtocol)) enable(Id & #HIPS_RESID_FLAG_USER)
ProtDiz = [WebServiceEdit_Prot_ComboDiz] visible(!bmask(Data.Flags,#wsProtocol)) enable(0)

[WebServiceEdit_Prot_ComboEn]
$txt    = text(const(s_Protocols(ctl.value)))
$l_isTypeV6 = Data.IcmpType >= 128 || Data.IcmpType == 1 || Data.IcmpType == 2 || Data.IcmpType == 3 || Data.IcmpType == 4
@       = t(combo) sz(p,a) a(lt) v(Data.Proto) onchange(if(ctl.value == #protoICMP && $l_isTypeV6, Data.IcmpType = 0, if(ctl.value == #protoICMPV6 && !$l_isTypeV6, Data.IcmpType = 129)))
TCP     = $txt v(6)
UDP     = $txt v(17)
ICMP    = $txt v(1)
ICMPv6  = $txt v(58)
IGMP    = $txt v(2)
GRE     = $txt v(47)

[WebServiceEdit_Prot_ComboDiz]
@ = t(combo) sz(p,a) a(lt) enable(0)
Undef = at(default)

[WebServiceEdit.IcmpType]
$txt    = text(const(s_ICMPTypes(ctl.value))) visible(Data.Proto==#protoICMP)
$txt6    = text(const(s_ICMP6Types(ctl.value))) visible(Data.Proto==#protoICMPV6)
@       = $Combo a(lt) v(Data.IcmpType)
0       = $txt v(0)
3       = $txt v(3)
4       = $txt v(4)
5       = $txt v(5)
6       = $txt v(6)
8       = $txt v(8)
9       = $txt v(9)
10      = $txt v(10)
11      = $txt v(11)
12      = $txt v(12)
13      = $txt v(13)
14      = $txt v(14)
15      = $txt v(15)
16      = $txt v(16)
17      = $txt v(17)
18      = $txt v(18)
30      = $txt v(30)
31      = $txt v(31)
32      = $txt v(32)
33      = $txt v(33)
34      = $txt v(34)
35      = $txt v(35)
36      = $txt v(36)
37      = $txt v(37)
38      = $txt v(38)
40      = $txt v(40)
1       = $txt6 v(1)
2       = $txt6 v(2)
3       = $txt6 v(3)
4       = $txt6 v(4)
128     = $txt6 v(128)
129     = $txt6 v(129)
130     = $txt6 v(130)
131     = $txt6 v(131)
132     = $txt6 v(132)
133     = $txt6 v(133)
134     = $txt6 v(134)
135     = $txt6 v(135)
136     = $txt6 v(136)
137     = $txt6 v(137)
138     = $txt6 v(138)
139     = $txt6 v(139)
141     = $txt6 v(141)
142     = $txt6 v(142)
143     = $txt6 v(143)
144     = $txt6 v(144)
145     = $txt6 v(145)
146     = $txt6 v(146)
147     = $txt6 v(147)
148     = $txt6 v(148)
149     = $txt6 v(149)
151     = $txt6 v(151)
152     = $txt6 v(152)
153     = $txt6 v(153)

[WebServiceEdit.IcmpCode]
$txt    = text(const(s_IcmpCode(ctl.value)))
@       = $Combo a(lt) v(Data.IcmpCode) enable(ctl.Name.value)
0       = $txt v(0)
1       = $txt v(1)
2       = $txt v(2)

;---------- IpRangeEdit ------------

[IpRangeEdit]
@           = $Dlg sz(330,a) onapply(c_ip().clear()) h(5053)
Name        = [Value] a(la) subst(Name(xy(,2)) Val(t(edit) sz(200,a) v(Name) onok(if(!Name, balloon("NeedName")))))
RemoteAddrs = [IpRangeEdit_Addrs] xy(,7) subst(List(v(Data.RemoteAddresses))) onok(if(!Data.RemoteAddresses.size() && !Data.LocalAddresses.size(), balloon("NeedAddresses")))
LocalAddrs  = [IpRangeEdit_Addrs] xy(,7,,$DialogPanelSizeY) subst(List(v(Data.LocalAddresses)))

[IpRangeEdit_Addrs]
@       = $SettingsGroup xy(,7) sz(p,130) ext(1)
List    = [IpRangeEdit_Addrs_List]

[IpRangeEdit_Addrs_List]
@       = $List at(noheader) alias(vector) extprm(1) unique(IP==newItem.IP)
Addr    = sz(a) text($AddressesFormat)
footer  = [Grid.Footer2.Template] subst(Add(onclick(dialog("AddressEdit"))))

;---------- AddressEdit ------------

[AddressEdit]
@ = [EditSimpleItem] alias() subst(Example() Name(v() oninit(ctl.value = Address ? Address : ip(IP)) onok(if(!parseAddr(ser(Address), ctl.value), balloon("ErrResolvingIp"))))) ext(1) h(6270)

[IpEdit]
@ = [EditSimpleItem] alias() subst(Example() Name(v() oninit(ctl.value = ip(ser(Version))) onok(if(!parseIp(ser(Version), ctl.value), balloon("ErrResolvingIp"))))) ext(1) h(6270)

[ResolveIp]
@           = $DlgAttrBase at(a_cancel) sz(330,130) at(nohelp)
Text        = sz(250,30)
Progress    = t(progress) a(la) xy(,7) sz(p,15)

;---------- PacketRuleList ------------

[PacketRuleList]
@       = $List alias(vector.FwRules) ext(1) onshow(ctl.refresh())
Service = [PacketRuleList_Service]
Action  = sz(90) at(clickable) ia(c,c) i(f_PacketRuleIcon(AccessFlag)) tt(s_AppRule(AccessFlag & #HIPS_FLAG_ALL_ACTIONS)) onrclick(if(!isNode, menu("PacketRuleList.Menu"))) text()
Area    = [PacketRuleList_Area]
footer  = [Grid.Footer2.Template] extprm(1) subst(Edit(onclick(dialog("PacketRuleEdit"))) MoveUp(use(1)) MoveDown(use(1)))

[PacketRuleList_Service]
@       = sz(255) at(checked) v(bmask(RuleState, 1)) bp(l_ws = c_ws(ResIdEx, Resource.treeFind("Childs", "Id == ResIdEx")); ctl.text = l_ws.Name; ctl.enabled = !depend(isDefSrc()))
Name    = sz(130) rs(33) bp(ctl.text = l_ws.Name)
Direct  = sz(75)  rs(0) ia(c) bp(ctl.icon = s_NetDirectionIcon(l_ws.Data.Direction)) tt(s_NetDirection(l_ws.Data.Direction)) text()
Proto   = sz(75)  rs(0) bp(ctl.text = f_NetProtocol(l_ws.Data))
RPorts  = sz(100) rs(33) bp(ctl.text = f_formatPorts(l_ws.Data.RemotePorts))
LPorts  = sz(100) rs(33) bp(ctl.text = f_formatPorts(l_ws.Data.LocalPorts))

[PacketRuleList_Area]
@          = sz(150) ta(c) bp(l_ip = c_ip(ResIdEx2, Resource.treeFind("Childs", "Id == ResIdEx2")); ctl.text = l_ip.Name ? s_ResGroupName(l_ip.Name) : ""; ctl.LocalAddr.text = f_LocalAddrText(l_ip.Data); ctl.RemoteAddr.text = f_RemoteAddrText(l_ip.Data); ctl.enabled = !depend(isDefSrc()))
LocalAddr  
RemoteAddr 

[PacketRuleList.Menu]
@ = [HipsAppRuleMenu] v(mask(AccessFlag, 0xb)) ext(1) subst(Inherit(use(0)) Ask(use(AppIdEx)) ByApp(use(!AppIdEx && f_isTcpUdpEx(c_ws(ResIdEx,null).Data))) Log(use((AccessFlag & #HIPS_FLAG_ALL_ACTIONS) != #HIPS_FLAG_BYAPP) v(bmask(AccessFlag, #HIPS_FLAG_LOG))))

;---------- PacketRuleEdit ------------

[PacketRuleEdit]
@       = $Dlg sz(450,a) h(5404)
Action  = [PacketRuleEdit_Action] $SettingsGroup
Service = [PacketRuleEdit_Service] $SettingsGroup sz(p,160) xy(,17)
Address = [PacketRuleEdit_Address] $SettingsGroup sz(p,200) xy(,17,,$DialogPanelSizeY)

[PacketRuleEdit_Action]
@       = a(la) sz(p,a) v(mask(AccessFlag, #HIPS_FLAG_ALL_ACTIONS)) ext(1)
Allow   = $Radio v(#HIPS_FLAG_ALLOW)
Block   = $Radio a(la) xy(,7) v(#HIPS_FLAG_DENY)
Skip    = $Radio a(la) xy(,7) v(#HIPS_FLAG_BYAPP) use(!AppIdEx) onok(if(ctl.selected && !f_isTcpUdpEx(ctl.Service.List.seldata().Data), balloon("WrongAction"))) extprm(1)
Log     = $Check a(la) xy(,7) v(bmask(AccessFlag, #HIPS_FLAG_LOG)) enable((AccessFlag & #HIPS_FLAG_ALL_ACTIONS) != #HIPS_FLAG_BYAPP)

[PacketRuleEdit_Service]
@       = a(la) sz(p,160) ext(1)
List    = [PacketRuleEdit_Service_List]

[PacketRuleEdit_Service_List]
@       = $List at(singlesel,noheader) alias(vector) v($rfKLWebServices.Childs) onfocus(if(Id, ResIdEx = Id)) onshow(ctl.focus("Id == ResIdEx")) onok(if(!ResIdEx, balloon("NeedService")))
Name    = sz(p) text(Name)
footer  = [Grid.Footer2.Template] subst(Add(onclick(Id = getHipsNewResID(); ParentID = #riKLWebServices; Data.serinit(#stWebService); Flags = Flags | #rtWebService; dialog("WebServiceEdit", p_forApp(AppIdEx)))) Edit(onclick(dialog("WebServiceEdit", p_forApp(AppIdEx)))) Delete(enable(canDelete() && Id & #HIPS_RESID_FLAG_USER))) extprm(1)

[PacketRuleEdit_Address]
@       = a(la) sz(p,200) onshow(ctl.value = s_AddrInit(ResIdEx2)) onok(ResIdEx2 = s_AddrGet(ctl.value); if(ctl.Group.selected && !ResIdEx2, balloon("NeedAddress"))) ext(1)
Any     = $Radio v(0)
Net     = $Radio a(la) xy(,7) v(1)
NetSel  = $Combo a(as) xy(7,-4) oninit($rfKLNetwork.Childs.foreach("ctl.add(s_ResGroupName(Name), Id)")) enable(ctl.Net.selected)
Group   = $Radio a(la) xy(,4) v(2)
List    = [PacketRuleEdit_Address_List]

[PacketRuleEdit_Address_List]
@       = $List a(la) xy(20,7) at(singlesel,noheader) alias(vector) v($rfKLIPRanges.Childs) enable(ctl.Group.selected)
Name    = sz(p) text(Name)
footer  = [Grid.Footer2.Template] subst(Add(onclick(Id = getHipsNewResID(); ParentID = #riIPRanges; Data.serinit(#stIpRange); dialog("IpRangeEdit"))) Edit(onclick(dialog("IpRangeEdit"))) Delete(enable(canDelete() && Id & #HIPS_RESID_FLAG_USER))) extprm(1)

;---------- PacketRuleCreate ------------

[PacketRuleCreate]
@ = [WizardTpl] ns(Application.treeFind("Childs", "Id == appID")) sz(450,470) subst(Pages([PacketRuleCreatePages])) alias(packetrulecreate)  oninit(AppIdEx = p_appID; RuleTypeId = #HIPS_RULE_TYPE_FW; RuleId = getHipsNewRuleID(); if(p_blocked, AccessFlag = #HIPS_FLAG_DENY)) ext(1)

[PacketRuleCreatePage]
@ = [WizardPage] subst(Header([PacketRuleCreatePage_Header]))

[PacketRuleCreatePage_Header]
@       = sz(p,a)
WizHdr  = [WizardPage_Header]
Info    = [WizardPage_InfoArea] ns(p_netAct) subst(Info(text(s_AppName(p_appID) + f_NetActionDescr(Proto, Direction == #wsOut || Direction == #wsOutStream) + ".")))

[PacketRuleCreatePages]
@       = sz(p,p) ext(1)
Action  = [PacketRuleCreatePage] h(6624) subst(Name() Descr() Body([PacketRuleCreate_Action]))
Service = [PacketRuleCreatePage] h(6625) subst(Name() Descr() Body([PacketRuleCreate_Service]))
Address = [PacketRuleCreatePage] h(6626) subst(Name() Descr() Body([PacketRuleCreate_Address]))

[PacketRuleCreate_Action]
Action  = [PacketRuleEdit_Action] subst(Skip(use(0)))


[PacketRuleCreate_Service]
Filter  = $Check onshow(ctl.value = 1) onchange(ctl.Service.List.setfilter(ctl.value ? "isServiceMatch(Data," + p_netAct.Proto + "," + p_netAct.Direction + "," + p_netAct.RemotePort + "," + p_netAct.LocalPort + "," + p_netAct.IcmpType + "," + p_netAct.IcmpCode + ")": "1",1))
Service = [PacketRuleEdit_Service] xy(,7) subst(footer(subst(Add(onclick(Id = getHipsNewResID(); ParentID = #riKLWebServices; Data.serinit(#stWebService); Flags = Flags | #rtWebService; Data.initFrom(p_netAct); dialog("WebServiceEdit", p_forApp(1))))))) onok(if(ResIdEx && !isServiceMatch(ctl.List.seldata().Data, p_netAct.Proto, p_netAct.Direction, p_netAct.RemotePort, p_netAct.LocalPort, p_netAct.IcmpType, p_netAct.IcmpCode),balloon("ServiceNotMatch")))

[PacketRuleCreate_Address]
Address = [PacketRuleEdit_Address] subst(footer(subst(Add(onclick(Id = getHipsNewResID(); ParentID = #riIPRanges; Data.serinit(#stIpRange); Data.initFrom(p_netAct); dialog("IpRangeEdit"))))))

;---------- AdapterEdit ------------

[AdapterEdit]
@   = $Dlg sz(350,400) alias(settings)
Tab = [AdapterEdit_Tab]

[AdapterEdit_Tab]
@       = $Tab
General = [AdapterEdit_Tab_General] h(6314)

[AdapterEdit_Tab_General]
@           = sz(p,p) mg(7,7)
Info        = [AdapterEdit_Tab_General_Info]
NewNetwork  = [AdapterEdit_Tab_General_NewNetwork] enable(TypeOfInterface != #If_OtherNetwork)

[AdapterEdit_Tab_General_Info]
@       = sz(p,a)
Icon    = sz(32,32) xy(,7) i(f_NetAdapterIcon(TypeOfInterface, -1, State, 1))
Name    = a(as) xy(17) sz(p,a) f("Normal_Bold") text(TypeOfInterface == #If_OtherNetwork ? $OtherNetworks : FrendlyName)
Type    = [LValue] a(sa) xy(,7) subst(Name() Val(xy(70) text(s_NetType(TypeOfInterface))))
Status  = [LValue] a(sa) xy(,7) subst(Name() Val(xy(70) text(f_NetConnected(State & #znConnected))))

[AdapterEdit_Tab_General_NewNetwork]
@           = $SettingsGroup xy(,17) v(bmask(Settings,#znAskWhenNewZones))
Legend
Ask         = $Radio xy(,7) v(1)
AssignTo    = $Radio xy(,7) v(0)
Zone        = [NetworkEdit_Severity_Combo] a(la) xy(20,7) sz(p,20) enable(ctl.AssignTo.selected) v(Severity)
;Stealth     = $Check xy(20,7) v(bmask(Settings,#znStealthForNewZones)) enable(Severity == #znUntrusted && ctl.AssignTo.selected)

;---------- NetworkEdit ------------

[NetworkEdit]
@   = $Dlg sz(350,400) alias(settings)
Tab = [NetworkEdit_Tab]

[NetworkEdit_Tab]
@           = $Tab
General     = [NetworkEdit_Tab_General] mg(7,7) h(6242)
Addresses   = [NetworkEdit_Tab_Addresses] mg(7,7) use(TypeOfInterface != #If_Internet) h(6253)
Settings    = [NetworkEdit_Tab_Settings] mg(7,7) use(TypeOfInterface != #If_Internet) h(16145)

[NetworkEdit_Tab_General]
@           = sz(p,p)
Icon        = sz(32,32) xy(,7) i(f_NetAdapterIcon(TypeOfInterface, -1, State, 1))
Type        = [LValue] a(as) xy(17) subst(Name() Val(xy(92) text(s_NetType(TypeOfInterface, WiFiSecLevel))))
WiFiName    = [LValue] a(sa) xy(,7) subst(Name() Val(xy(92) text(ConnectionName))) use(TypeOfInterface == #If_WiFi)
Status      = [LValue] a(sa) xy(,7) subst(Name() Val(xy(92) text(f_NetConnected(State & #znConnected, if(TypeOfInterface == #If_Internet, ConnectionName)))))
Created     = [LValue] a(sa) xy(,7) subst(Name() Val(xy(92) text(datetime(TimeCreated))))
LastConnect = [LValue] use(!(State & #znConnected)) xy(,7) subst(Name() Val(xy(140) text(datetime(TimeConnected))))
Name        = [LValue] xy(,17) subst(Name() Val(t(edit) xy(100) v(FrendlyName))) enable(TypeOfInterface != #If_Internet)
Severity    = [LValue] xy(,7) subst(Name() Val([NetworkEdit_Severity_Combo] xy(100) v(Severity))) enable(TypeOfInterface != #If_Internet)
;Stealth     = $Check xy(100,7) v(bmask(Settings,#znStealth)) enable(Severity == #znUntrusted)
Area        = [NetworkEdit_Tab_General_Area] use(TypeOfInterface!=#If_Internet)

[NetworkEdit_Severity_Combo]
$txt    = text(const(s_NetSeverity(ctl.value)))
@       = t(combo)
Public  = $txt v(#znUntrusted)
Local   = $txt v(#znNetBIOS)
Trusted = $txt v(#znTrusted)

[NetworkEdit_Tab_General_Area]
@       = $SettingsGroup sz(p,p)
List    = [NetworkEdit_Tab_General_Area_List]

[NetworkEdit_Tab_General_Area_List]
@       = $List at(noheader) alias(vector) v(IPNets)
Subnet  = sz(a) text(ip(ser(Version)))
footer  = [Grid.Footer2.Template] subst(Add(onclick(dialog("IpEdit"))))

[NetworkEdit_Tab_Addresses]
@       = sz(p,p)
IPList  = [NetworkEdit_Tab_Addresses_IPList]

[NetworkEdit_Tab_Addresses_IPList]
@       = $List sz(p,p) at(noheader) alias(vector) v(p_nets ? p_nets.Nets : getNetWatchZoneAddrs(ID).IP)
Name    = sz(a,a) text(ip(ser(Version)))

[NetworkEdit_Tab_Settings]
@       = sz(p,p)
;ArpPoison  = $Check xy(,7) v(bmask(Settings,#znArpPoison)) enable(TypeOfInterface==#If_Ethernet || TypeOfInterface==#If_WiFi)
Notify  = [NetworkEdit_Tab_Settings_Notify]
Action  = [NetworkEdit_Tab_Settings_Action]

[NetworkEdit_Tab_Settings_Notify]
@       = $SettingsGroup
Connect = $Check v(bmask(Settings,#znNotifyWhenConnected))
ChgMac  = $Check xy(,7) v(bmask(Settings,#znChgMacNotify)) use(TypeOfInterface==#If_Ethernet || TypeOfInterface==#If_WiFi)
NewMac  = $Check xy(,7) v(bmask(Settings,#znNewMacNotify)) use(TypeOfInterface==#If_Ethernet || TypeOfInterface==#If_WiFi)

[NetworkEdit_Tab_Settings_Action]
@       = $SettingsGroup xy(,7)
UsePrnt = $Check v(bmask(Settings,#znDefPrinter)) enable(getPrinters().size())
Printer = $Combo xy(20,7) v(DefPrinter) enable(getPrinters().size() && ctl.UsePrnt.value) oninit(getPrinters().foreach("ctl.add(DisplayName, Name)"))

;---------- NewNetwork alert ------------

[NewNetwork]
@ = [AlertDialogT] sz(320,a) subst(Caption(subst(B(text()))) Body([NewNetwork_Body])) h(16152)

[NewNetwork_Body]
@       = ns(NewZone)
Descr   = [AlertDialogT_InfoArea] subst(Info([NewNetwork_Descr]))
Actions = [NewNetwork_Body_Actions]

[NewNetwork_Descr]
Icon    = sz(32,32) i(f_NetAdapterIcon(TypeOfInterface, -1, State, 1))
Adapter = [LValue] a(as) xy(17) subst(Name() Val(xy(70) at(clickable) f("Hotlink_Normal") text(NetAdapter.FrendlyName) onclick(dialog("AdapterEdit", p_data(NetAdapter))) ))
Type    = [LValue] a(sa) xy(,7) subst(Name() Val(xy(70) text(s_NetType(TypeOfInterface, WiFiSecLevel))))
Network = [LValue] a(sa) xy(,7) subst(Name() Val(xy(70) at(clickable) f("Hotlink_Normal") text(FrendlyName) onclick(dialog("NetworkEdit", p_data(NewZone), p_nets(ZonaAddresses)))))

[NewNetwork_Body_Actions]
@       = $AlertActions
Public  = [AlertDialog_ActionButton] enable(1) v(#znUntrusted) onclick(Severity = ctl.value; close(#m_res_ok)) subst(Name() Descr())
Local   = [AlertDialog_ActionButton] enable(1) v(#znNetBIOS)   onclick(Severity = ctl.value; close(#m_res_ok)) subst(Name() Descr())
Trusted = [AlertDialog_ActionButton] enable(1) v(#znTrusted)   onclick(Severity = ctl.value; close(#m_res_ok)) subst(Name() Descr())

;---------- SnifferStatistic ------------

[SnifferStatistic]
@           = t(dialog) mg(7,7) sz(720,570) at(customfooter,resizable,minimizable) alias(task) ns(NetDetails) h(15605) onclose(state & #StateFlagOperational ? msg("CantCloseActiveNetStat", #m_warning) : checkPassword(#pwdc_StopTask, name))
Header      = [ProductHeader] sz(p,53) xy(-7,-7,-7)
Filter      = [SnifferStatistic_Filter] xy(,7,,7)
Splitter    = [SnifferStatistic_Splitter] xy(,,,$DialogPanelSizeY)
Footer      = [SnifferStatistic.Footer] xy(-7,-7,-7)

[SnifferStatistic.Footer]
@           = a(lb) sz(p,$DialogPanelSizeY) rs(100,0) ext(1) extprm(1)
panel       = [DialogPanel] subst(BtnsGroup(use(0)))
Close       = [BtnGlass] a(rc) xy(7) onclick(close()) extprm(1)
panelRun    = [SnifferStatistic_RunPanel]

[SnifferStatistic_RunPanel]
@       = a(pc) sz(a,a) xy(50)
Start   = [BtnGlass] a(lc) xy(0,) onclick(f_setState(#TASK_REQUEST_RUN, name)) enable(!(state & #StateFlagOperational))
Stop    = [BtnGlass] a(as) xy(5,) onclick(f_setState(#TASK_REQUEST_STOP, name)) enable(state & #StateFlagOperational)
Clear   = [BtnGlass] a(as) xy(5,) enable(!(state & #StateFlagOperational)) onclick(clearRepDb(#dbNetworkPackets))

[SnifferStatistic_Filter]
@           = a(la) sz(p,a)
TextFSrc    = text($Source) a(ls) xy(,0) mg(0,4)
FilterIPSrc = t(edit) a(as) xy(5,) sz(100,a)
TextFTgt    = text($Target) a(as) xy(10,) mg(0,4)
FilterIPTgt = t(edit) a(as) xy(5,) sz(100,a)
TextFProt   = text($Protocol) a(as) xy(10,) mg(0,4)
FilterProto = [SnifferStatistic_Filter.Protocol] onchange(ctl.Frames.setfilter("wildcard(\"" + ctl.FilterIPSrc.value + "\",ip(IPSource)) && wildcard(\"" + ctl.FilterIPTgt.value + "\",ip(IPTarget)) && wildcard(\"" + ctl.FilterProto.value + "\",s_Protocols(Protocol,HighProtocol))", 1))
RunFilter   = $Button a(rs) xy(,-1) sz(85,25) enable(!(state & #StateFlagOperational)) onclick(ctl.Frames.setfilter("wildcard(\"" + ctl.FilterIPSrc.value + "\",ip(IPSource)) && wildcard(\"" + ctl.FilterIPTgt.value + "\",ip(IPTarget)) && wildcard(\"" + ctl.FilterProto.value + "\",s_Protocols(Protocol,HighProtocol))", 1))

[SnifferStatistic_Filter.Protocol]
@       = t(combo) a(as) xy(5,) sz(60,) at(edit)
ALL     = v("") at(default) text("")
ARP     = v("ARP")	 text("ARP")
IPv4    = v("IPv4")  text("IPv4")
IPv6    = v("IPv6")  text("IPv6")
TCP     = v("TCP")	 text("TCP")
UDP     = v("UDP")	 text("UDP")
IPX     = v("IPX")	 text("IPX")
NBNS    = v("NBNS")  text("NBNS")
DNS     = v("DNS")	 text("DNS")
DHCP    = v("DHCP")  text("DHCP")
PPPoE   = v("PPPoE") text("PPPoE")
ICMP    = v("ICMP")	 text("ICMP")
LLC     = v("LLC")	 text("LLC")

[SnifferStatistic_Splitter]
@       = t(splitter) at(vertical,rememberdata) a(la) sz(p,p)
Frames  = [SnifferStatistic_Splitter_Frames]
Details = [SnifferStatistic_Splitter_Details]
;Details = [SnifferStatistic_HexViewer]

[SnifferStatistic_Splitter_Frames]
@           = $List sz(0,0) rs(0,0) alias(netdetails) prm(#dbNetworkPackets) refresh(100)
TimeOffset  = sz(120) text(datetime(Timestamp))
Source      = sz(110) text(ip(IPSource))
Target      = sz(110) text(ip(IPTarget))
Protocol    = sz(90) text(s_Protocols(Protocol,HighProtocol))
;row         = bg(if(Flags & 0x4,"EventErr"))
row         = bg(if(Flags & 0x4,"EventErr")) i( (Flags & 0x4) ? "sniff,2" : ((Flags & 0x2) ? "sniff,6":"sniff,5"))

[SnifferStatistic_Splitter_Details]
@       = t(splitter) at(rememberdata) alias(netframedetail) dataowner(Details.parent.Frames) xy(0,0) rs(0,0) sz(p,p) bg("ColorWindowClassic")
Tree    = [SnifferStatistic_Splitter_Details_Tree]
HexView = [SnifferStatistic_Splitter_Details_HexView]

[SnifferStatistic_Splitter_Details_Tree]
@       = $List sz(0,0) rs(0,0) at(noheader) alias(tree.NetDetailsList) v(FrameDetails) childs(vChild)
Name    = sz(a) text(s_FrameDetails(id, str1, str2, str3))

[SnifferStatistic_Splitter_Details_HexView]
@ = t(hexviewer) sz(0,0) rs(0,0) alias(hexview.Sniffer) v(FrameBin) bg("ColorWindow") f("Normal")

;------------- System Monitor -----------

[SystemMonitor]
@      = $DlgAttrBase mg(0,0) sz(720,570) at(resizable,minimizable,dragable,a_close) h(14800)
Header = [ProductHeader] sz(p,53)
Body   = [SystemMonitor_Tab_Programs]

[SystemMonitor_Search]
@           = b(System) mg(2,0,0,0) a(rt) sz(a,a) rs(0,0) ext(1) bg("ColorWindow")
Filter      = t(edit) at(noborder,wantreturn) a(at) sz(150) extprm(1)
SearchImg   = a(as) xy(1) i("Search") visible(ctl.parent.Filter.value == "")
ClearImg    = a(as) xy(1) i("ClearSearch") at(clickable) visible(ctl.parent.Filter.value != "") onclick(ctl.parent.Filter.value = "")

[SystemMonitor_Tab_Programs]
$UpdateFilter	= if(!ctl.Filter.value, l_curlist.setfilter("1", 4), l_curlist.setfilter(f_FilterString(ctl.parent.Category.value), 4))
@				= sz(p,p) mg(7,7) a(la) oninit(l_curlist = ctl.List.RunList) xy(,,,$DialogPanelSizeY) alias(task) ns(Hips)
CategoryLbl		= xy(,4)
Category		= [SystemMonitor_Tab_Programs_Category] onchange(if(s_IsRunListCategory(ctl.value), l_curlist = ctl.parent.List.RunList, if(s_IsNetListCategory(ctl.value), l_curlist = ctl.parent.List.NetList, l_curlist = ctl.parent.List.AllList)); l_curlist.setfilter(s_CategoryListFilter(ctl.value), 1); $UpdateFilter)
SearchText		= a(rt) xy(180,3) text($Search)
Search			= [SystemMonitor_Search] subst( Filter(onchange($UpdateFilter)) )
List			= [SystemMonitor_Tab_Programs_Lists]

[SystemMonitor_Tab_Programs_Search]
@           = b(System) mg(2,2,0,2) a(rt) sz(a,a)
Filter      = t(edit) at(noborder) sz(150)
SearchImg   = a(as) xy(1) i("Search") visible(ctl.parent.Filter.value == "")
ClearImg    = a(as) xy(1) i("ClearSearch") at(clickable) visible(ctl.parent.Filter.value != "") onclick(ctl.parent.Filter.value = "")

[SystemMonitor_Tab_Programs_Lists]
@ = a(la) xy(,7) sz(p,p)
All         = $Check sz(a,a) a(lb) at(rememberdata) visible(s_IsRunListCategory(ctl.parent.parent.Category.value)) onchange(l_curlist.setfilter(ctl.value ? "" : "stricmp(objfile(Rating.ModuleInfo.sImagePath), \"avp.exe\")", 2))
System      = $Check sz(a,a) a(rb) at(rememberdata) xy(5) visible(s_IsRunListCategory(ctl.parent.parent.Category.value)) onchange(l_curlist.setfilter(ctl.value ? "" : "!wildcard(\"NT AUTHORITY*\",toupper(RunInfo.sUserName))", 3))
RunList     = [Programs_RunList] a(lt) xy(,,,21) visible(s_IsRunListCategory(ctl.parent.parent.Category.value))
NetList     = [NetworkMonitor_Tab_Conn_List] a(lt) visible(s_IsNetListCategory(ctl.parent.parent.Category.value))
AllList     = [Programs_AllList] a(lt) visible(s_IsAllListCategory(ctl.parent.parent.Category.value))

[SystemMonitor_Tab_Programs_Category]
@           = $Combo dl(20) sz(200,a) a(at) xy(7) rs(0,0) 
Running
Startup
Network
SandBox = use(f_isInstalled("SandBox"))
Trusted
Restricted
Banned
Today
ThisWeek
ThisMonth
All

[RunningProgramStatusMenu]
@         = at(enum) v(RunInfo.RunningGroup.IsCustomRules ? #HIPS_APP_ID_CUSTOM : RunInfo.RunningGroup.GroupId) onchanging( if(ctl.value != #HIPS_APP_ID_CUSTOM, if(checkPassword(#pwdc_SaveSettings), if(!RunInfo.RunningGroup.IsCustomRules || msg("ConfirmChangeCustomStatus", #m_yesno, p_CtlVal(ctl.value)) == #m_res_yes, if (!RunInfo.WasChild || msg("ConfirmChangeStatusWithChild", #m_yesno) == #m_res_yes, if(ctl.value == #HIPS_APP_ID_TRUSTED || !wildcard("NT AUTHORITY*",toupper(RunInfo.sUserName)) || msg("ConfirmDenyTrustedApp", #m_yesno) == #m_res_yes, ctl.SetProcessStatus(RunInfo.NativePid, ctl.value)))))); false )
Reset     = text(s_AppStatusName(#HIPS_APP_ID_DEFAULT))   at(radiolike) v(#HIPS_APP_ID_DEFAULT) use(RunInfo.RunningGroup.ByUser || RunInfo.RunningGroup.IsCustomRules)
Separator
Trusted   = text(s_AppStatusName(#HIPS_APP_ID_TRUSTED))   at(radiolike) v(#HIPS_APP_ID_TRUSTED)
Low       = text(s_AppStatusName(#HIPS_APP_ID_LO_REST))   at(radiolike) v(#HIPS_APP_ID_LO_REST) enable(Id != #AppIdProduct)
High      = text(s_AppStatusName(#HIPS_APP_ID_HI_REST))   at(radiolike) v(#HIPS_APP_ID_HI_REST) enable(Id != #AppIdProduct)
Untrusted = text(s_AppStatusName(#HIPS_APP_ID_UNTRUSTED)) at(radiolike) v(#HIPS_APP_ID_UNTRUSTED) enable(Id != #AppIdProduct)
Separator
Custom    = text(s_AppStatusName(#HIPS_APP_ID_CUSTOM) + "...") at(radiolike) v(#HIPS_APP_ID_CUSTOM) onclick(dialog("AppRulesEdit:Rules", p_image(Rating.ModuleInfo.sImagePath), p_appID(Id), p_pid(RunInfo.NativePid), p_WasChild(RunInfo.WasChild)))

[Programs_RunList]
$IsClosed = (RunInfo.dtExitTime > RunInfo.dtStartTime)
@ = $List alias(vector.RunPrograms) at(sorted,rememberdata,singlesel) v(Programs) filter(RunInfo.NativePid > 4)
Program  = [Programs_Program] text(Id == #AppIdProduct ? $ProductName : f_AppNameEx(Rating.ModuleInfo)) i(s_AppIcon(Id))
History  = f($IsClosed ? "Normal_Grey" : "Hotlink_Normal") at(clickable) text(if(RunInfo.Parents.size(),RunInfo.Parents.format("objfile(f_ProcessInfo(e).Module.sImagePath)", " > ") + " > " + objfile(Rating.ModuleInfo.sImagePath))) onclick( if(!$IsClosed,dialog("AppExecuteChain")) ) onrclick(menu("Programs_RunList_Menu"))
Status   = [Programs_RunList_Status] f($IsClosed ? "Normal_Grey" : s_IsStateRunning(HipsTask.state) ? "Hotlink_Normal" : "Normal") at(clickable) text(if(RunInfo.RunningGroup.GroupId==#HIPS_APP_ID_UNKNOWN,s_AppStatusName(#HIPS_APP_ID_HIPSNOTRUNNING),f_AppStatusName(RunInfo.RunningGroup))) tt(f_AppStatusDetails(RunInfo.RunningGroup)) onclick(if(!$IsClosed && s_IsStateRunning(HipsTask.state),menu("RunningProgramStatusMenu"))) onrclick(menu("Programs_RunList_Menu"))
State    = [Programs_State] text( s_AppWorkState($IsClosed) )
PID      = a(r) text(RunInfo.NativePid)
UserName = text(RunInfo.sUserName)
CPU      = a(r) text(RunInfo.Performance.processorUsage + "%")
Memory   = [Programs_RunList_Memory] a(r) text(f_ObjSize(RunInfo.Performance.workinSetSize))
row      = at(clickable) f($IsClosed ? "Normal_Grey" : "Normal") bg(RunInfo.InSandBox ? "SandBox" : "") onrclick(menu("Programs_RunList_Menu"))
views    = [Programs_RunList.Views]

[Programs_RunList_Menu]
Properties   = at(default) onclick(dialog("AppRulesEdit:Image", p_image(Rating.ModuleInfo.sImagePath), p_appID(Id), p_pid(RunInfo.NativePid)))
ShowHistory  = use(RunInfo.Parents.size()) onclick(dialog("AppExecuteChain"))
ChangeStatus = [RunningProgramStatusMenu] use(s_IsStateRunning(HipsTask.state))
KillProcess  = onclick( if(msg("KillProcessConfirm", #m_yesno) == #m_res_yes, terminateProcess(RunInfo.NativePid))) use(Id != #AppIdProduct)

[Programs_RunList.Views]
Running = v("140001000233;Pr00000000a6;De00000000a3;Fi0000000077;Fo000000001e;Ve0000000091;Pr000000001e;Ve000000001e;Si000000001e;Cr000000001e;Mo000000001e;Hi000000009e;St0000000084;De0000000086;Cu0000000088;St0002000056;St000000006f;Ex000000006a;PI0000000021;Us000200005f;CP000000001e;Me000000002c;Wo0000000046;Pa000000005b;") at(default)

[Programs_Program]
Description = text(s_filterEmptyText(Rating.ModuleInfo.sDescription)) i(s_AppIcon(Id))
File        = text(s_filterEmptyText(objfile(Rating.ModuleInfo.sImagePath)))
Folder      = text(s_filterEmptyText(objdir(Rating.ModuleInfo.sImagePath)))
Vendor      = text(s_filterEmptyText(Rating.ModuleInfo.sVendor))
Product     = text(s_filterEmptyText(Rating.ModuleInfo.sProduct))
Version     = a(r) text(s_filterEmptyText(Rating.ModuleInfo.sVersion))
Size        = a(r) text(s_filterEmptyText(f_ObjSize(Rating.ModuleInfo.nObjectSize)))
Created     = a(r) text(s_filterEmptyText(Rating.ModuleInfo.tCreation > 0 ? datetime(Rating.ModuleInfo.tCreation) : ""))
Modified    = a(r) text(s_filterEmptyText(datetime(Rating.ModuleInfo.tModify)))

[Programs_State]
StartTime = text(datetime(RunInfo.dtStartTime))
ExitTime  = text(RunInfo.dtExitTime > RunInfo.dtStartTime ? datetime(RunInfo.dtExitTime) : "")

[Programs_LastRun]
LastRun  = a(r) text(date(ExecuteInfo.nLastExecuteTime))
RunCount = a(r) text(ExecuteInfo.nExecuteCountTotal)

[Programs_RunList_Memory]
WorkingSet = a(r) text(f_ObjSize(RunInfo.Performance.workinSetSize))
PageFile   = a(r) text(f_ObjSize(RunInfo.Performance.pageFileUsage))

[Programs_RunList_Status]
$IsClosed = (RunInfo.dtExitTime > RunInfo.dtStartTime)
Default   = text(s_AppStatusName(RunInfo.RunningGroup.DefGroupId)) tt(s_AppStatusDetails(RunInfo.RunningGroup.DefGroupId))
Current   = f($IsClosed ? "Normal_Grey" : s_IsStateRunning(HipsTask.state) ? "Hotlink_Normal" : "Normal") at(clickable) text(f_AppStatusName(RunInfo.RunningGroup)) tt(f_AppStatusDetails(RunInfo.RunningGroup)) onclick(if(!$IsClosed && s_IsStateRunning(HipsTask.state),menu("RunningProgramStatusMenu"))) onrclick(menu("Programs_RunList_Menu"))

[Programs_NetList]

[ApplicationStatusMenu]
@         = at(enum) v(GroupInfo.IsCustomRules ? #HIPS_APP_ID_CUSTOM : GroupInfo.GroupId) onchanging( if(ctl.value != #HIPS_APP_ID_CUSTOM, if(checkPassword(#pwdc_SaveSettings), if(!GroupInfo.IsCustomRules || msg("ConfirmChangeCustomStatus", #m_yesno, p_CtlVal(ctl.value)) == #m_res_yes, ctl.SetAppStatus(Id, GroupInfo.ChainId, ctl.value)))); false )
Reset     = text(s_AppStatusName(#HIPS_APP_ID_DEFAULT)) at(radiolike) v(#HIPS_APP_ID_DEFAULT) use((GroupInfo.ByUser && (GroupInfo.DefGroupId != GroupInfo.GroupId)) || GroupInfo.IsCustomRules)
Separator
Trusted   = text(s_AppStatusName(#HIPS_APP_ID_TRUSTED))   at(radiolike) v(#HIPS_APP_ID_TRUSTED)
Low       = text(s_AppStatusName(#HIPS_APP_ID_LO_REST))   at(radiolike) v(#HIPS_APP_ID_LO_REST) enable(Id != #AppIdProduct)
High      = text(s_AppStatusName(#HIPS_APP_ID_HI_REST))   at(radiolike) v(#HIPS_APP_ID_HI_REST) enable(Id != #AppIdProduct)
Untrusted = text(s_AppStatusName(#HIPS_APP_ID_UNTRUSTED)) at(radiolike) v(#HIPS_APP_ID_UNTRUSTED) enable(Id != #AppIdProduct)
Separator
Custom    = text(s_AppStatusName(#HIPS_APP_ID_CUSTOM) + "...") at(radiolike) v(#HIPS_APP_ID_CUSTOM) onclick(dialog("AppRulesEdit:Rules", p_image(Rating.ModuleInfo.sImagePath), p_appID(Id)))

[Programs_AllList]
@ = $List alias(vector.AllPrograms) at(sorted,rememberdata,singlesel) v(Applications)
Program = [Programs_Program] text(Id == #AppIdProduct ? $ProductName : f_AppNameEx(Rating.ModuleInfo)) i(s_AppIcon(Id))
Parents = text(if(GroupInfo.Parents.size(),GroupInfo.Parents.format("objfile(f_AppInfo(e).sImagePath)", " > ") + " > " + objfile(Rating.ModuleInfo.sImagePath)))
Status  = [Programs_AllList_Status] f(s_IsStateRunning(depend(HipsTask.state)) ? "Hotlink_Normal" : "Normal") at(clickable) text(f_AppStatusName(GroupInfo)) tt(f_AppStatusDetails(GroupInfo)) onclick(if(s_IsStateRunning(HipsTask.state),menu("ApplicationStatusMenu"))) onrclick(menu("Programs_AllList_Menu"))
LastRun = [Programs_LastRun] a(r) text(s_date(dategroup(ExecuteInfo.nLastExecuteTime)))
row     = at(clickable) onrclick(menu("Programs_AllList_Menu"))
views   = [Programs_AllList.Views]

[Programs_AllList_Menu]
Properties   = at(default) onclick(dialog("AppRulesEdit:Image", p_image(Rating.ModuleInfo.sImagePath), p_appID(Id)))
ChangeStatus = [ApplicationStatusMenu] use(s_IsStateRunning(HipsTask.state))
Separator
Delete       = onclick( isAppRunning(Id) ? balloon("AppIsRunning") : if(checkPassword(#pwdc_SaveSettings), deleteApplication(Id))) use(Id != #AppIdProduct)

[Programs_AllList.Views]
All = v("14000100020e;Pr00000000d1;De00000000dc;Fi0000000058;Fo000000001e;Ve0000000091;Pr000000001e;Ve000000001e;Si000000001e;Cr000000001e;Mo000000001e;Pa00000000a0;St000000009d;De0000000090;Cu0000000089;La0003000099;La0000000044;Ru0000000052;") at(default)

[Programs_AllList_Status]
Default   = text(s_AppStatusName(GroupInfo.DefGroupId)) tt(s_AppStatusDetails(GroupInfo.DefGroupId))
Current   = f(s_IsStateRunning(depend(HipsTask.state)) ? "Hotlink_Normal" : "Normal") at(clickable) text(f_AppStatusName(GroupInfo)) tt(f_AppStatusDetails(GroupInfo)) onclick(if(s_IsStateRunning(HipsTask.state),menu("ApplicationStatusMenu"))) onrclick(menu("Programs_AllList_Menu"))

[SystemMonitor_Tab_Confidential]
@ = sz(p,p)
Resources   = [HipsRules_Tab_Resources]

[SystemMonitor_Tab_OS]
@ = sz(p,p)
CategoryLbl = xy(,4)
Category    = [SystemMonitor_Tab_OS_Category]
SearchText  = a(rt) xy(180,3) text($Search)
Search      = [SystemMonitor_Search] subst( Filter(onchange( if(!ctl.value, ctl.parent.ResList.setfilter("", 1), ctl.parent.ResList.setfilter("wildcard(\"*" + escape(toupper(ctl.value)) + "*\",toupper(s_ResourceDescription(serid(Data))))", 1)))) )
ResList     = [HipsRules_Tab_Resources_ResList]

[SystemMonitor_Tab_OS_Category]
@   = $Combo sz(200,20) a(at) xy(7) rs(0,0) oninit($rfKLSystemData.Childs.foreach("ctl.add(s_ResGroupName(Name), Id)");ctl.value=10) onchange(l_group = Resource.treeFind("Childs", "Id == ctl.value"); ctl.parent.ResList.parentGroupId = l_group.Id; ctl.parent.ResList.parentGroupFlags = l_group.Flags)

;------------- Network Monitor -----------

[NetworkMonitor]
@   = $DlgAttrBase sz(720,570) at(resizable,minimizable,dragable,a_close) mg(0,0)
Header = [ProductHeader] sz(p,53)
Tab = [NetworkMonitor_Tab] a(la)

[NetworkMonitor_Tab]
@       = $Tab xy(7,7,7,45)
Conn    = [NetworkMonitor_Tab_Conn] mg(7,7) h(5428)
Packets = [NetworkMonitor_Tab_Packets] mg(7,7) h(5593)
Traffic = [NetworkMonitor_Tab_Traffic] mg(7,7) h(5429)
Banned  = [NetworkMonitor_Tab_BannedHosts] mg(7,7) h(14831)

[NetworkMonitor_Tab_BannedHosts]
@       = sz(p,p) alias(taskview) ns(ids)
List    = [BannedHosts_Body_List]

[NetworkMonitor_Tab_Conn]
@       = sz(p,p) use(s_IsStateRunning(Hips.state))
All     = $Check onclick(ctl.List.setfilter(ctl.value ? "" : "stricmp(objfile(Image), \"avp.exe\")"))
List    = [NetworkMonitor_Tab_Conn_List]

[NetworkMonitor_Tab_Conn_List]
@               = $List a(la) xy(,7) at(sorted,rememberdata) alias(vector.Connections) v(Connections) filter(stricmp(objfile(Image), "avp.exe"))
App             = sz(120) i(getIconAsync(Image)) text(objfile(Image)) group(ImagePath,Image,default)
Proto           = sz(60) text(s_Protocols(Proto))
Direction       = sz(70) text(s_NetDirection(Direction))
LocalIP         = sz(90) text(ip(LocalIP))
LocalPort       = sz(70) text(LocalPort)
RemoteIP        = sz(100) text(ip(RemoteIP))
RemotePort      = sz(80) text(if(RemotePort, RemotePort))
Duration        = sz(50) text(timestamp(ActiveTime))
BytesRecieved   = sz(60) text(f_ObjSize(InBytes))
BytesSent       = sz(60) text(f_ObjSize(OutBytes))

[Grid.Groups]
ImagePath = [Grid.Group.Template] expand(1) i(getIconAsync(val)) text(s_AppName(moduleAppId(val)))

[NetworkMonitor_Tab_Packets]
@       = sz(p,p)
ViewLbl = xy(,4)
View    = [NetworkMonitor_Tab_Packets_View]
Log     = [NetworkMonitor_Tab_Packets_Log]

[NetworkMonitor_Tab_Packets_View]
@           = $Combo sz(a,a) a(at) xy(7) rs(0,0) onchange(ctl.parent.Log.setfilter(s_LogFilter(ctl.value), 1))
All         = v(0)
Blocked     = v(1)
BlockedIn   = v(2)
BlockedOut  = v(3)
Allowed     = v(4)
AllowedIn   = v(5)
AllowedOut  = v(6)
CreateRule	= v(7)

[NetworkMonitor_Tab_Packets_Log]
@           = $List a(la) xy(,7) alias(firewallpackets) at(rememberdata) refresh(100) prm(#dbNetworkPacketRules)
Time        = sz(140) text(datetimeDT(Timestamp)) sort(index,sortup)
Verdict     = sz(85) text( (Flags & 8)? $CreateRule : s_Verdict((Flags & 2) ? #eALLOWED : #eDENIED)) i((Flags & 0x02) ? "low" : "med")
App         = sz(200) text(if(AppID, $AppName)) i(if(AppID, $AppIcon))
Proto       = sz(50) text(s_Protocols(Proto)) filter(auto)
LocalAddr   = sz(100) text(ip(LocalIP)) group(FwAddrL, l_ipHash = ipHash(LocalIP); c_ipHash(l_ipHash, LocalIP); l_ipHash)
LocalPort   = sz(50) text(if(LocalPort, LocalPort)) group(FwPortL, LocalPort)
RemoteAddr  = sz(80) text(ip(RemoteIP)) group(FwAddrR, l_ipHash = ipHash(RemoteIP); c_ipHash(l_ipHash, RemoteIP); l_ipHash)
RemotePort  = sz(50) text(if(RemotePort, RemotePort)) group(FwPortL, RemotePort)
NetSeverity = sz(160) text(s_NetSeverity(NetSeverity)) i(s_NetZoneTypeIcon(NetSeverity))
;RuleName    = sz(120) text(object(HipsResourceID)) visible(0)
row         = at(clickable) i((Flags & 4) ? "listctrls,6" : "listctrls,5") onrclick(menu("NetworkMonitor_Tab_Packets_Log.Menu"))

[NetworkMonitor_Tab_Packets_Log.Menu]
@       = t(menu)
Rule    = at(clickable) enable(AppID) onclick(l_netAct.serinit(#stFwEvent); l_netAct.IcmpCode = IcmpCode; l_netAct.IcmpType = IcmpType;  l_netAct.Proto = Proto; l_netAct.Direction = Flags & 4 ? #wsOutStream : #wsInStream; l_netAct.RemoteIP = RemoteIP; l_netAct.RemotePort = RemotePort; l_netAct.LocalIP = LocalIP; l_netAct.LocalPort = LocalPort; dialog("PacketRuleCreate", p_appID(AppID), p_netAct(l_netAct), p_saveRule(1), p_blocked(!(Flags & 2))))

[Grid.Groups]
FwAddrR = [Grid.Group.Template] expand(1)
FwAddrL = [Grid.Group.Template] expand(1)
FwPortR = [Grid.Group.Template] expand(1)
FwPortL = [Grid.Group.Template] expand(1)

;---------- PdmSettings ------------

[PdmSettings]
@       = $Dlg at(resizable) sz(550,284) alias(taskedit) h($IsKAV ? 14681 : 14681) btns(Ok(enable(Set.find("f_PDM2_IsSettingEnabledAndShown()"))))
Body	= [PDM2_Settings_Body]

[PDM2_Settings_Body]
@			= $DlgBodyAttr
ThreatList	= [PDM2_Settings_Body_ThreatList_Group]

[PDM2_Settings_Body_ThreatList_Group]
@ 			= sz(p,270)
Rules   	= [PdmSettings_Rules]
RuleLabel   = sz(a,a) a(la) xy(,7)
RuleDescr	= t(richedit) at(readonly,nofocus,vscroll) sz(p,56) a(la) xy(,7) alias(descriptor) dataowner(Rules) text($PDM2_RuleDescr)

[PdmSettings_Rules]
@   		= $List sz(p,150) alias(vector) v(Set) filter(f_PDM2_EventType_IsShow(EventTypeSetting,nFlags))
Event  		= at(checked) sz(240,225) text(s_PDM2_ThreatType(EventTypeSetting)) i(s_PDM2_ThreatTypeIcon(EventTypeSetting)) v(bEnabled)
Action 		= sz(150) text(s_PDM2_RulesAction(Action))
Log    		= sz(50) text(s_OnOff(bLog))
Probability	= sz(70) text(s_PDM2_ThreatFAProbability(EventTypeSetting))

;------------- PDM2_ThreatActionEdit ----------------------

[PDM2_ThreatActionEdit]
@		= $DlgAttr sz(260,a) h(14700)
Dlg		= [PDM2_ThreatActionEdit.Dlg]

[PDM2_ThreatActionEdit.Dlg]
@			= $DlgBodyAttr sz(p,a)
ActionGroup	= [PDM2_ThreatActionEdit_Body]

[PDM2_ThreatActionEdit_Body]
@					= sz(p,a) v(Action)
ActionAsk 			= t(radio) v(1) sz(a,a)
ActionQuarantine	= t(radio) v(4) a(la) sz(a,a) xy(,7) visible(s_PDM2_ShowQuarantineAction(EventTypeSetting))
ActionTerminate		= t(radio) v(3) a(la) sz(a,a) xy(,7) visible(s_PDM2_ShowTerminateAction(EventTypeSetting))
ActionAllow			= t(radio) v(0) a(la) sz(a,a) xy(,7) visible(s_PDM2_ShowAllowAction(EventTypeSetting))
ActionBlock			= t(radio) v(2) a(la) sz(a,a) xy(,7) visible(s_PDM2_ShowBlockAction(EventTypeSetting))

;------------- PDM2_RollbackActionEdit ----------------------

[PDM2_RollbackActionEdit]
@	= $DlgAttr sz(260,a) h(14688)
Dlg	= [PDM2_RollbackActionEdit.Dlg]

[PDM2_RollbackActionEdit.Dlg]
@			= $DlgBodyAttr sz(p,a)
Text		= sz(p)
ActionGroup	= [PDM2_RollbackActionEdit_Body]

[PDM2_RollbackActionEdit_Body]
@			= sz(p,a)  v(bAutoRollback)
ActionOff	= t(radio) v(#PDM2RollBack_off) sz(a,a)
ActionAuto	= t(radio) v(#PDM2RollBack_auto) a(la) sz(a,a) xy(,7)
ActionAsk	= t(radio) v(#PDM2RollBack_ask) a(la) sz(a,a) xy(,7)

;--------------- PDM2_RootKitPeriod -----------------------

[PDM2_RootKitPeriod]
@		= $DlgAttr sz(270,a) h(14701)
Dlg		= [PDM2_RootKitPeriodDlg]

[PDM2_RootKitPeriodDlg]
@		= $DlgBodyAttr sz(p,a)
Period	= sz(a)
Min		= a(rs)
Value	= t(edit) at(number) a(ps) sz(45) nl(1,999) xy($Edit_CommentOffsetX,$Edit_CenterOffsetY) v(Timeout)

;----------------- PDM2_AlertDetails ----------------------

[PDM2_AlertDetails]
@      = $DlgAttr sz(400,350) alias(alertinfodlg) at(resizable,nohelp,a_close) text($PDM2_AlertDetails)
Body   = [PDM2_AlertDetails_Body]

[PDM2_AlertDetails_Body]
@            = $Tab
AddInfo	     = [PDM2_AlertDetails_AddInfo]    mg(7,7) use($PDM2_AlertDetails_Show_InfoPage)       text($PDM2_AlertDetailsInfo)
DllList	     = [PDM2_AlertDetails_Modules]    mg(7,7) use($PDM2_AlertDetails_Show_DLLs)
ChildProcs   = [PDM2_AlertDetails_ChildProcs] mg(7,7) use($PDM2_AlertDetails_Show_ChildProcs)
HostsOld     = [PDM2_AlertDetails_HostsOld]   mg(7,7) use($PDM2_AlertDetails_Show_Hosts)
HostsNew     = [PDM2_AlertDetails_HostsNew]   mg(7,7) use($PDM2_AlertDetails_Show_Hosts)
History      = [PDM2_AlertDetails_History]    mg(7,7) use($PDM2_AlertDetails_Show_History)

[PDM2_AlertDetails_ChildProcs]
List         = [PDM2_AlertDetails_ChildProcs_List]

[PDM2_AlertDetails_ChildProcs_List]
@	         = t(list) alias(vector) at(sorted) sz(p,p) v(ChildProcList)
ImagePath    = sz(p,45) i(const(getIcon(ImagePath, ImagePath ? "unkapp" : "Main.big", 1))) text(ImagePath)
PID          = text(ProcessId)
CommandLine  = sz(p,45) text(CommandLine)

[PDM2_AlertDetails_AddInfo]
Info         = t(richedit) at(readonly,vscroll) a(lt) sz(p,p) text(s_AlertDetailsPDM_AddInfo_Text(EventType)))

[PDM2_AlertDetails_Modules]
$InfoOffsetX = 100
DllPath        = a(as) at(singleline)
DllPathEdit    = t(edit) a(ls) sz(p) xy($InfoOffsetX,,,3) at(readonly,noborder,compresspath) text(NewImage.ImagePath)
DllSize        = t(value) at(singleline) sep($InfoOffsetX) $Left_Next text(f_ObjSize(NewImage.ObjectSize))
DllTimeCr      = t(value) at(singleline) sep($InfoOffsetX) $Left_Next text(datetime(NewImage.tCreation))
DllTimeMdf     = t(value) at(singleline) sep($InfoOffsetX) $Left_Next text(datetime(NewImage.tModify))
DllVersion     = t(value) at(singleline) sep($InfoOffsetX) $Left_Next text(unicode(NewImage.Version))
DllVendor      = t(value) at(singleline) sep($InfoOffsetX) $Left_Next text(unicode(NewImage.Vendor))
DllDescription = t(value) at(singleline) sep($InfoOffsetX) $Left_Next text(unicode(NewImage.Description))
DllList        = [PDM2_AlertDetails_DllList]

[PDM2_AlertDetails_DllList]
@ 		       = t(list) alias(vector) sz(p,p) at(sorted) a(la) xy(,10) v(DllList)
DllPath		   = sz(p,40) i(const(getIcon(ImagePath, ImagePath ? "unkapp" : "Main.big", 1))) text(ImagePath)
DllSize		   = text(f_ObjSize(ObjectSize))
DllTimeCr	   = sz(130) text(datetime(tCreation))
DllTimeMdf	   = sz(130) text(datetime(tModify))
DllVersion	   = text(Version)
DllVendor	   = text(Vendor)
DllDescription = text(Description)
;DllInUse	   = v($(bInUse,YesNo))

[PDM2_AlertDetails_HostsOld]
HostsFileContent = t(edit) at(readonly,multiline) sz(p,p) text(ValueOld)

[PDM2_AlertDetails_HostsNew]
HostsFileContent = t(edit) f("Code") at(readonly,multiline) sz(p,p) text(Value)

[PDM2_AlertDetails_History]
@          = alias(pdm_rollback_viewhistory)
List       = [PDM2_AlertDetails_History_List] xy(,,,$ButtonsLineSizeY)
Save       = $Button a(lb) enable(!History.bSaved) use(0)

[PDM2_AlertDetails_History_List]
@          = t(list) alias(vector) at(singlesel,sorted) sz(p,p) v(History.aEntries)
Type       = text(s_PDM2_HistoryEventType(nType)) sz(100)
ObjectName = text(sObjectName) sz(400)

;---------------- SandBoxSettings ------------------------

[SandBoxSettings]
@       = $Dlg sz(380,342) at(resizable) alias(taskedit) ns(SandBox) text($SandBox)
Tab     = [SandBoxSettings_Tab]

[SandBoxSettings_Tab]
@       = $DlgBodyAttr t(tab)
Boxes   = [SandBoxSettings_Tab_Boxes] h(14672)
Apps    = [SandBoxSettings_Tab_Apps] h(14673)

[SandBoxSettings_Tab_Boxes]
@       = sz(p,p) mg(7,7)
BoxList = [SandBoxSettings_BoxList]

[SandBoxSettings_Tab_Apps]
@       = sz(p,p) mg(7,7)
AppList = [SandBoxApps_Tab_Apps_AppList] subst(Box(at(hidden) group(SandBoxID, nBoxID, default)) )

[SandBoxSettings_BoxList]
@       = $List at(noheader) alias(vector) v(Sandboxes)
Name    = sz(a,a) at(checked) text(s_SandBoxName(ID, ser(ID))) v(bmask(Flags, 0x1))
footer  = [Grid.Footer2.Template] subst(Add(onclick(if(dialog("SandBoxApps"), ID = Sandboxes.ser().getNextSbID()))) Edit(onclick(dialog("SandBoxApps"))) )
row     = sz(a,a) i("Main")

[SandBoxApps]
@   = $Dlg sz(366,392) at(resizable)
Tab = [SandBoxApps_Tab]

[SandBoxApps_Tab]
@       = $DlgBodyAttr t(tab) alias(settings)
General = [SandBoxApps_Tab_General] h(14674)

[SandBoxApps_Tab_General]
@                    = sz(p,p) mg(7,7) btns(Ok(enable(Name)))
BoxName              = [LValue] sz(p,a) xy(,7) subst(Name() Val(t(edit) v(Name) xy(45,)))
Enabled              = $Check xy(,7) v(bmask(Flags, 0x1)) text("Enabled")
CleanOnInactive      = $Check xy(,7) v(bmask(Flags, 0x2)) text("Clean on inactive")
DeleteOnInactive     = $Check xy(,7) v(bmask(Flags, 0x4)) text("Delete on inactive")
EnableSharedFolder   = $Check xy(,7) v(bmask(Flags, 0x8)) onok(if(bmask(Flags, 0x8), SharedFolder = env("SandboxSharedFolder"))) text("Enable shared folder")
EnableScm            = $Check xy(,7) v(bmask(Flags, 0x200)) text("Enable SCM")
EnableLocalCom       = $Check xy(20,7) v(bmask(Flags, 0x100)) text("Enable DCOM") enable(Flags & 0x200)
EnableFsRedirect     = $Check xy(,7) v(bmask(Flags, 0x400)) text("Enable file system redirection")
EnableRegRedirect    = $Check xy(,7) v(bmask(Flags, 0x800)) text("Enable registry redirection")
DenyAccessProcessIn  = $Check xy(,7) v(bmask(Flags, 0x100000)) text("Deny access to sandboxed processes")
DenyAccessProcessOut = $Check xy(,7) v(bmask(Flags, 0x200000)) text("Deny access to native processes")
DenyAccPrivateData   = $Check xy(,7) v(bmask(Flags, 0x400000)) text("Deny access to user private data")
BorderColor          = t(richedit) a(la) xy(,14) sz(a,a) at(noborder,readonly,nofocus)
BorderWidthSlider    = t(slider) at() a(la) sz(p,30) xy(,4,60) nl(1,10) v(BorderWidth)
BorderWidthEdit      = t(edit) at(number) a(rs) sz(50) nl(1,10) v(BorderWidth)

[SandBoxApps_Tab_General_ColorEdit]
@		= $DlgAttr sz(260,a)
Dlg		= [SandBoxApps_Tab_General_ColorEdit.Dlg]

[SandBoxApps_Tab_General_ColorEdit.Dlg]
@			= $DlgBodyAttr sz(p,a)
Text		= sz(p)
ColorGroup	= [SandBoxApps_Tab_General_ColorEdit_Body]

[SandBoxApps_Tab_General_ColorEdit_Body]
@			= sz(p,a)  v(BorderColor)
ColorRed	= t(radio) v(0xff0000) text(s_SandBox_Colors(0xff0000)) a(la) sz(a,a)
ColorOrange = t(radio) v(0xff8000) text(s_SandBox_Colors(0xff8000)) a(la) sz(a,a) xy(,7)
ColorYellow	= t(radio) v(0xffff00) text(s_SandBox_Colors(0xffff00)) a(la) sz(a,a) xy(,7)
ColorGreen	= t(radio) v(0x00ff00) text(s_SandBox_Colors(0x00ff00)) a(la) sz(a,a) xy(,7)
ColorCyan	= t(radio) v(0x00ffff) text(s_SandBox_Colors(0x00ffff)) a(la) sz(a,a) xy(,7)
ColorBlue	= t(radio) v(0x0000ff) text(s_SandBox_Colors(0x0000ff)) a(la) sz(a,a) xy(,7)
ColorPurple	= t(radio) v(0x8f00ff) text(s_SandBox_Colors(0x8f00ff)) a(la) sz(a,a) xy(,7)

[SandBoxApps_Tab_Apps_AppList]
@           = $List alias(vector) v(Apps) ext(1)
Application = [SandBoxApps_Tab_Apps_AppList_Application]
Box         = text(f_GetSandBoxName(nBoxID)) extprm(1)
footer      = [Grid.Footer2.Template] subst(Add(onclick(if(f_AppIDFromAppBrowsePath(AppID, ""), nBoxID = 1))) Edit(onclick(dialog("AppRulesEdit:SandBox", p_appID(AppID))) ))
row         = sz(a,a) i($AppIcon)

[SandBoxApps_Tab_Apps_AppList_Application]
@       = sz(200,a) at(fixedpos) text($AppName)
Name    = sz(200,a) text($AppModule)
Path    = sz(250,a) text($AppPath)

[Grid.Groups]
SandBoxID = [Grid.Group.Template] expand(1) text(f_GetSandBoxName(val))
