[MainWindow_Body.AppCtrl]
@           = $TaskTab ext(1) h(26087)
Header      = a(lt) f("Header6KGreen") xy(-1)
InfoIcon    = $TaskInfoIcon onclick(url($HelpURLMainWndAppCtl))
TaskSep     = $TaskSep_Temp
Descr       = f("Description") a(la) xy(,,,4) text(if($CanRunSafeDesktop&& $CanRunSafeBrowser, $SafeDesktopAndSafeBrowseAvailable, if($CanRunSafeBrowser,$SafeBrowseAvailable,$SafeNothingAvailable) ))
SafeDesktop = [MainWindow_Body.AppCtrl.Item] use($CanRunSafeDesktop) xy(,10) visible(1) subst( Icon(i("LaunchSafeDesktop")) Text() Desc() AddLink( [MainWindow_Body.AppCtrl.SafeDesktop_AddLink] use(1)) ) onclick(if(!SafeDesktopId(), f_IfErrThenMsg(runSafeDesktop(), "SandBoxError"),f_IfErrThenMsg(goToBaseDesktop(), "SandBoxError")))
SafeBrowse  = [MainWindow_Body.AppCtrl.Item] use($CanRunSafeBrowser && !SafeDesktopId()) xy(,10) visible(1) subst( Icon(i("LaunchSafeBrowser")) Text() Desc() AddLink( [MainWindow_Body.AppCtrl.ClearBrowse_AddLink] use(1)) ) onclick(f_IfErrThenMsg(runSafeBrowser(), "SandBoxError"))
vkbd        = [MainWindow_Body.AppCtrl.Item] xy(,10) visible(f_isInstalled("VirtualKeyboard") && f_isVkbdInstalled()) subst( Icon(i("vkbd32")) Text() Desc()) onclick(window("VirtualKeyboard"))

[MainWindow_Body.AppCtrl.Item]
@       = sz(p,a) a(la) at(btnlike) mg(9,9) bg(ctl.selected ? "HilightBtn_sel" : (ctl.hotlight ? "HilightBtn" : "")) ext(1)
Icon    = a(lt) sz(p,a) extprm(1)
Text    = a(lt) sz(p,a) xy(48) f("Header6Lite") extprm(1)
Desc	= a(sa) sz(p,a) xy(,4) f("Description")  extprm(1)
AddLink = a(sa) use(0) extprm(1) xy(,3)

[MainWindow_Body.AppCtrl.SafeDesktop_AddLink]
ClearDesktop = $LinkKL a(lt) text($ClearUrl) onclick(l_noErr =0; l_err = clearDesktop(); if(l_err== #errSTATE_INVALID, if(msg("SandBoxStartedCleanConfirm",#m_yesno), l_err = terminateSandbox(), l_noErr = 1) ); if(!l_noErr, f_SanboxClearMsg(l_err))) use( !SafeDesktopId() )
PublicFolder = $LinkKL a(at) xy(10) text($PublicFolder) onclick(open(env("SandboxSharedFolder")))
SandBoxDebugSettings  = $LinkKL a(at) xy(10) onclick(window("SandBoxSettings")) text($SandboxSettings)

[MainWindow_Body.AppCtrl.ClearBrowse_AddLink]
ClearBrowse = $LinkKL a(lt) text($ClearUrl) onclick(f_SanboxClearMsg(clearBrowse()))
SandBoxDebugSettings  = $LinkKL a(at) xy(10) onclick(window("SandBoxSettings")) text($SandboxSettings)
;Settings    = $LinkKL a(at) xy(10) text($Settings_2) onclick(url())


[WL]
@    = [StyledWindowT_Small]  at(dragable,a_ok,nohelp) sz(440,a) subst(BodyEx([AppCtrl_WhiteListing]))


[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) at(clickable) onclick(window("AppRules"))
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(200,a)
Summary = [Value2] subst(Name(f("Header0")) Val(a(rb) xy(7,3) f("Header0") text(ctl.Val1.value + ctl.Val2.value + ctl.Val3.value + ctl.Val4.value)) ) a(at) xy(,8)
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))))
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")); f_IfErrThenMsg(sandBoxRunApp(nBoxID, f_AppInfo(AppID).sImagePath), "SandBoxError"))
RunAtDesktop       = text("Run at new desktop") onclick(f_IfErrThenMsg(sandBoxRunAppAtDesktop(nBoxID, f_AppInfo(AppID).sImagePath),"SandBoxError"))
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)
RunDesktop = text("Start Sandboxed Desktop") a(la) xy(0,10) t(hotlink) f("Header1Green") onclick(exec(env("ProductRoot").addPath("sbstart.exe"), "-desktop 1 -shell"))
DesktopSandbox = text("Sandboxed Desktops List") a(la) xy(0,10) t(hotlink) f("DescriptionBlue") onclick(fillDesktopList(); dialog("SandboxedDesktopsList"))

[SandboxedDesktopsList]
@  = [StyledWindowT_Small] at(dragable,a_ok) subst( BodyEx( [SandboxedDesktopsList_Body] ) ) sz(374,a) text("Sandboxed Desktops List") alias(taskview) ns(SandBox)

[SandboxedDesktopsList_Body]
@        = sz(p,a)
DeskList = [SandboxedDesktopsList_List] sz(p,120)

[SandboxedDesktopsList_List]
@           = $List sz(p,120) alias(vector) v(Desktops) ext(1) at(singlesel,noheader)
Application = text(Name) at(clickable)
footer  = [Grid.Footer2.Template] subst(Delete(use(0)) Edit(text("Go") onclick(goToDesktop(Name))) Add(use(0)))





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

[MainReport.Hips]
@ = [ProfileReport] subst(Group1([MainReport.SystemWatch_Events]) Descr([MainReport.Protection_Events_Descr]) ActionsArea(subst(Other(subst(GroupFilter(onclick(ctl.menu("MainWindow.Hips_Filters"))))))) 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]
@ = alias(statex) prm("Firewall:"+serid("TrafficReportStatistics")) ns(ctl.ser("TrafficReportStatistics"))
PeriodSwitch   = [Statistics_Switch_Time] extprm(1) a(ra) \
				 subst(IsChange( +onchange( ctl.ListArea.setTimeRange("",ctl.PeriodBegin.value,ctl.PeriodEnd.value, f_ParCtlEx_GetStatRangePeriod(ctl.PeriodType.value)) ) ) )
ListArea       = [NetworkMonitor_Tab_Traffic_ListArea] a(la) xy(,5,,160)
StatArea       = [NetworkMonitor_Tab_Traffic_StatArea] a(lb)

[NetworkMonitor_Tab_Traffic_StatArea]
@           = sz(p,150) rs(100,0) bg1("ColorWindow") b1(System)
Stat        = [NetworkMonitor_Tab_Traffic_StatArea_Stat_Data]
Legend      = [MainWindow.SystemWatch_WorkArea_SysPerf_Legend] a(rt) xy(,4) sz(a,a) 

[NetworkMonitor_Tab_Traffic_StatArea_Stat_Data]
@          = sz(p,p)
Day        = [NetworkMonitor_Tab_Traffic_StatArea_Stat_Data_ChartDay]   a(lt) xy(,,,5) visible(ctl.PeriodSwitch.PeriodType.value == #ePeriodDay )
Week       = [NetworkMonitor_Tab_Traffic_StatArea_Stat_Data_ChartWeek]  a(lt) xy(,,,5) visible(ctl.PeriodSwitch.PeriodType.value == #ePeriodWeek )
Month      = [NetworkMonitor_Tab_Traffic_StatArea_Stat_Data_ChartMonth] a(lt) xy(,,,5) visible(ctl.PeriodSwitch.PeriodType.value == #ePeriodMonth  )
Year       = [NetworkMonitor_Tab_Traffic_StatArea_Stat_Data_ChartYear]  a(lt) xy(,,,5) visible(ctl.PeriodSwitch.PeriodType.value == #ePeriodYear )

[NetworkMonitor_Tab_Traffic_StatArea_Stat_Data_ChartDay]
@       = $ChartStat sz(p,p) at(disable_auto_tt) union(2) v(Total.Discrete) alias(vector)
$GetPeriodStart = ctl.PeriodSwitch.PeriodBegin.value
$NetMon_ChartUsageElem_In = t(chartseries) bg("ChartOrange_a") mg(3,,0)
$NetMon_ChartUsageElem_Out = t(chartseries) bg("Chart5_a") mg(0,,3)
Plot    = t(chartplotarea)
AxisY   = $ChartStatAxisY
AxisX   = $ChartStatAxisX
Val_1_in   = $NetMon_ChartUsageElem_In text("00:00") v(Total.Discrete.at(0 ).BytesIn) tt( s_TTHour_NM( $GetPeriodStart + 00*3600, Total.Discrete.at(0)) )
Val_1_out  = $NetMon_ChartUsageElem_Out v(Total.Discrete.at(0 ).BytesOut) mg(0,,3) tt( s_TTHour_NM( $GetPeriodStart + 00*3600, Total.Discrete.at(0)) )
Val_2_in   = $NetMon_ChartUsageElem_In text("01:00") v(Total.Discrete.at(1 ).BytesIn) tt(s_TTHour_NM( $GetPeriodStart + 01*3600, Total.Discrete.at(1 )))
Val_2_out  = $NetMon_ChartUsageElem_Out v(Total.Discrete.at(1 ).BytesOut) tt(s_TTHour_NM( $GetPeriodStart + 01*3600, Total.Discrete.at(1 )))
Val_3_in   = $NetMon_ChartUsageElem_In text("02:00") v(Total.Discrete.at(2 ).BytesIn) tt(s_TTHour_NM( $GetPeriodStart + 02*3600, Total.Discrete.at(2 )))
Val_3_out  = $NetMon_ChartUsageElem_Out v(Total.Discrete.at(2 ).BytesOut) tt(s_TTHour_NM( $GetPeriodStart + 02*3600, Total.Discrete.at(2 )))
Val_4_in   = $NetMon_ChartUsageElem_In text("03:00") v(Total.Discrete.at(3 ).BytesIn) tt(s_TTHour_NM( $GetPeriodStart + 03*3600, Total.Discrete.at(3 )))
Val_4_out  = $NetMon_ChartUsageElem_Out v(Total.Discrete.at(3 ).BytesOut) tt(s_TTHour_NM( $GetPeriodStart + 03*3600, Total.Discrete.at(3 )))
Val_5_in   = $NetMon_ChartUsageElem_In text("04:00") v(Total.Discrete.at(4 ).BytesIn) tt(s_TTHour_NM( $GetPeriodStart + 04*3600, Total.Discrete.at(4 )))
Val_5_out  = $NetMon_ChartUsageElem_Out v(Total.Discrete.at(4 ).BytesOut) tt(s_TTHour_NM( $GetPeriodStart + 04*3600, Total.Discrete.at(4 )))
Val_6_in   = $NetMon_ChartUsageElem_In text("05:00") v(Total.Discrete.at(5 ).BytesIn) tt(s_TTHour_NM( $GetPeriodStart + 05*3600, Total.Discrete.at(5 )))
Val_6_out  = $NetMon_ChartUsageElem_Out v(Total.Discrete.at(5 ).BytesOut) tt(s_TTHour_NM( $GetPeriodStart + 05*3600, Total.Discrete.at(5 )))
Val_7_in   = $NetMon_ChartUsageElem_In text("06:00") v(Total.Discrete.at(6 ).BytesIn) tt(s_TTHour_NM( $GetPeriodStart + 06*3600, Total.Discrete.at(6 )))
Val_7_out  = $NetMon_ChartUsageElem_Out v(Total.Discrete.at(6 ).BytesOut) tt(s_TTHour_NM( $GetPeriodStart + 06*3600, Total.Discrete.at(6 )))
Val_8_in   = $NetMon_ChartUsageElem_In text("07:00") v(Total.Discrete.at(7 ).BytesIn) tt(s_TTHour_NM( $GetPeriodStart + 07*3600, Total.Discrete.at(7 )))
Val_8_out  = $NetMon_ChartUsageElem_Out v(Total.Discrete.at(7 ).BytesOut) tt(s_TTHour_NM( $GetPeriodStart + 07*3600, Total.Discrete.at(7 )))
Val_9_in   = $NetMon_ChartUsageElem_In text("08:00") v(Total.Discrete.at(8 ).BytesIn) tt(s_TTHour_NM( $GetPeriodStart + 08*3600, Total.Discrete.at(8 )))
Val_9_out  = $NetMon_ChartUsageElem_Out v(Total.Discrete.at(8 ).BytesOut) tt(s_TTHour_NM( $GetPeriodStart + 08*3600, Total.Discrete.at(8 )))
Val_10_in  = $NetMon_ChartUsageElem_In text("09:00") v(Total.Discrete.at(9 ).BytesIn) tt(s_TTHour_NM( $GetPeriodStart + 09*3600, Total.Discrete.at(9 )))
Val_10_out = $NetMon_ChartUsageElem_Out v(Total.Discrete.at(9 ).BytesOut) tt(s_TTHour_NM( $GetPeriodStart + 09*3600, Total.Discrete.at(9 )))
Val_11_in  = $NetMon_ChartUsageElem_In text("10:00") v(Total.Discrete.at(10).BytesIn) tt(s_TTHour_NM( $GetPeriodStart + 10*3600, Total.Discrete.at(10)))
Val_11_out = $NetMon_ChartUsageElem_Out v(Total.Discrete.at(10).BytesOut) tt(s_TTHour_NM( $GetPeriodStart + 10*3600, Total.Discrete.at(10)))
Val_12_in  = $NetMon_ChartUsageElem_In text("11:00") v(Total.Discrete.at(11).BytesIn) tt(s_TTHour_NM( $GetPeriodStart + 11*3600, Total.Discrete.at(11)))
Val_12_out = $NetMon_ChartUsageElem_Out v(Total.Discrete.at(11).BytesOut) tt(s_TTHour_NM( $GetPeriodStart + 11*3600, Total.Discrete.at(11)))
Val_13_in  = $NetMon_ChartUsageElem_In text("12:00") v(Total.Discrete.at(12).BytesIn) tt(s_TTHour_NM( $GetPeriodStart + 12*3600, Total.Discrete.at(12)))
Val_13_out = $NetMon_ChartUsageElem_Out v(Total.Discrete.at(12).BytesOut) tt(s_TTHour_NM( $GetPeriodStart + 12*3600, Total.Discrete.at(12)))
Val_14_in  = $NetMon_ChartUsageElem_In text("13:00") v(Total.Discrete.at(13).BytesIn) tt(s_TTHour_NM( $GetPeriodStart + 13*3600, Total.Discrete.at(13)))
Val_14_out = $NetMon_ChartUsageElem_Out v(Total.Discrete.at(13).BytesOut) tt(s_TTHour_NM( $GetPeriodStart + 13*3600, Total.Discrete.at(13)))
Val_15_in  = $NetMon_ChartUsageElem_In text("14:00") v(Total.Discrete.at(14).BytesIn) tt(s_TTHour_NM( $GetPeriodStart + 14*3600, Total.Discrete.at(14)))
Val_15_out = $NetMon_ChartUsageElem_Out v(Total.Discrete.at(14).BytesOut) tt(s_TTHour_NM( $GetPeriodStart + 14*3600, Total.Discrete.at(14)))
Val_16_in  = $NetMon_ChartUsageElem_In text("15:00") v(Total.Discrete.at(15).BytesIn) tt(s_TTHour_NM( $GetPeriodStart + 15*3600, Total.Discrete.at(15)))
Val_16_out = $NetMon_ChartUsageElem_Out v(Total.Discrete.at(15).BytesOut) tt(s_TTHour_NM( $GetPeriodStart + 15*3600, Total.Discrete.at(15)))
Val_17_in  = $NetMon_ChartUsageElem_In text("16:00") v(Total.Discrete.at(16).BytesIn) tt(s_TTHour_NM( $GetPeriodStart + 16*3600, Total.Discrete.at(16)))
Val_17_out = $NetMon_ChartUsageElem_Out v(Total.Discrete.at(16).BytesOut) tt(s_TTHour_NM( $GetPeriodStart + 16*3600, Total.Discrete.at(16)))
Val_18_in  = $NetMon_ChartUsageElem_In text("17:00") v(Total.Discrete.at(17).BytesIn) tt(s_TTHour_NM( $GetPeriodStart + 17*3600, Total.Discrete.at(17)))
Val_18_out = $NetMon_ChartUsageElem_Out v(Total.Discrete.at(17).BytesOut) tt(s_TTHour_NM( $GetPeriodStart + 17*3600, Total.Discrete.at(17)))
Val_19_in  = $NetMon_ChartUsageElem_In text("18:00") v(Total.Discrete.at(18).BytesIn) tt(s_TTHour_NM( $GetPeriodStart + 18*3600, Total.Discrete.at(18)))
Val_19_out = $NetMon_ChartUsageElem_Out v(Total.Discrete.at(18).BytesOut) tt(s_TTHour_NM( $GetPeriodStart + 18*3600, Total.Discrete.at(18)))
Val_20_in  = $NetMon_ChartUsageElem_In text("19:00") v(Total.Discrete.at(19).BytesIn) tt(s_TTHour_NM( $GetPeriodStart + 19*3600, Total.Discrete.at(19)))
Val_20_out = $NetMon_ChartUsageElem_Out v(Total.Discrete.at(19).BytesOut) tt(s_TTHour_NM( $GetPeriodStart + 19*3600, Total.Discrete.at(19)))
Val_21_in  = $NetMon_ChartUsageElem_In text("20:00") v(Total.Discrete.at(20).BytesIn) tt(s_TTHour_NM( $GetPeriodStart + 20*3600, Total.Discrete.at(20)))
Val_21_out = $NetMon_ChartUsageElem_Out v(Total.Discrete.at(20).BytesOut) tt(s_TTHour_NM( $GetPeriodStart + 20*3600, Total.Discrete.at(20)))
Val_22_in  = $NetMon_ChartUsageElem_In text("21:00") v(Total.Discrete.at(21).BytesIn) tt(s_TTHour_NM( $GetPeriodStart + 21*3600, Total.Discrete.at(21)))
Val_22_out = $NetMon_ChartUsageElem_Out v(Total.Discrete.at(21).BytesOut) tt(s_TTHour_NM( $GetPeriodStart + 21*3600, Total.Discrete.at(21)))
Val_23_in  = $NetMon_ChartUsageElem_In text("22:00") v(Total.Discrete.at(22).BytesIn) tt(s_TTHour_NM( $GetPeriodStart + 22*3600, Total.Discrete.at(22)))
Val_23_out = $NetMon_ChartUsageElem_Out v(Total.Discrete.at(22).BytesOut) tt(s_TTHour_NM( $GetPeriodStart + 22*3600, Total.Discrete.at(22)))
Val_24_in  = $NetMon_ChartUsageElem_In text("23:00") v(Total.Discrete.at(23).BytesIn) tt(s_TTHour_NM( $GetPeriodStart + 23*3600, Total.Discrete.at(23)))
Val_24_out = $NetMon_ChartUsageElem_Out v(Total.Discrete.at(23).BytesOut) tt(s_TTHour_NM( $GetPeriodStart + 23*3600, Total.Discrete.at(23)))

[NetworkMonitor_Tab_Traffic_StatArea_Stat_Data_ChartWeek]
@       = $ChartStat sz(p,p) at(disable_auto_tt) union(2) v(Total.Discrete) alias(vector)
$GetPeriodStart = ctl.PeriodSwitch.PeriodBegin.value
$NetMon_ChartUsageElem_In = t(chartseries) bg("ChartOrange_a") mg(3,,0) ta(cc)
$NetMon_ChartUsageElem_Out = t(chartseries) bg("Chart5_a") mg(0,,3)
Plot    = t(chartplotarea)
AxisY   = $ChartStatAxisY
AxisX   = $ChartStatAxisX
Val_1_in   = $NetMon_ChartUsageElem_In v( Total.Discrete.at(0 ).BytesIn )  tt(s_TTWeek_NM( 0, Total.Discrete.at(0))) text(s_DayOfWeek_Short((firstdayofweek()+0)%7))
Val_1_out  = $NetMon_ChartUsageElem_Out v(Total.Discrete.at(0 ).BytesOut) mg(0,,3) tt(s_TTWeek_NM( 0, Total.Discrete.at(0)))
Val_2_in   = $NetMon_ChartUsageElem_In v( Total.Discrete.at(1 ).BytesIn)  tt(s_TTWeek_NM( 1, Total.Discrete.at(1))) text(s_DayOfWeek_Short((firstdayofweek()+1)%7))
Val_2_out  = $NetMon_ChartUsageElem_Out v(Total.Discrete.at(1 ).BytesOut) mg(0,,3) tt(s_TTWeek_NM( 1, Total.Discrete.at(1)))
Val_3_in   = $NetMon_ChartUsageElem_In v( Total.Discrete.at(2 ).BytesIn)  tt(s_TTWeek_NM( 2, Total.Discrete.at(2))) text(s_DayOfWeek_Short((firstdayofweek()+2)%7))
Val_3_out  = $NetMon_ChartUsageElem_Out v(Total.Discrete.at(2 ).BytesOut) mg(0,,3) tt(s_TTWeek_NM( 2, Total.Discrete.at(2)))
Val_4_in   = $NetMon_ChartUsageElem_In v( Total.Discrete.at(3 ).BytesIn)  tt(s_TTWeek_NM( 3, Total.Discrete.at(3))) text(s_DayOfWeek_Short((firstdayofweek()+3)%7))
Val_4_out  = $NetMon_ChartUsageElem_Out v(Total.Discrete.at(3 ).BytesOut) mg(0,,3) tt(s_TTWeek_NM( 3, Total.Discrete.at(3)))
Val_5_in   = $NetMon_ChartUsageElem_In v( Total.Discrete.at(4 ).BytesIn)  tt(s_TTWeek_NM( 4, Total.Discrete.at(4))) text(s_DayOfWeek_Short((firstdayofweek()+4)%7))
Val_5_out  = $NetMon_ChartUsageElem_Out v(Total.Discrete.at(4 ).BytesOut) mg(0,,3) tt(s_TTWeek_NM( 4, Total.Discrete.at(4)))
Val_6_in   = $NetMon_ChartUsageElem_In v( Total.Discrete.at(5 ).BytesIn)  tt(s_TTWeek_NM( 5, Total.Discrete.at(5))) text(s_DayOfWeek_Short((firstdayofweek()+5)%7))
Val_6_out  = $NetMon_ChartUsageElem_Out v(Total.Discrete.at(5 ).BytesOut) mg(0,,3) tt(s_TTWeek_NM( 5, Total.Discrete.at(5)))
Val_7_in   = $NetMon_ChartUsageElem_In v( Total.Discrete.at(6 ).BytesIn)  tt(s_TTWeek_NM( 6, Total.Discrete.at(6))) text(s_DayOfWeek_Short((firstdayofweek()+6)%7))
Val_7_out  = $NetMon_ChartUsageElem_Out v(Total.Discrete.at(6 ).BytesOut) mg(0,,3) tt(s_TTWeek_NM( 6, Total.Discrete.at(6)))

[NetworkMonitor_Tab_Traffic_StatArea_Stat_Data_ChartMonth]
@       = $ChartStat sz(p,p) at(disable_auto_tt) union(2) v(Total.Discrete) alias(vector)
$GetPeriodStart = ctl.PeriodSwitch.PeriodBegin.value
$NetMon_ChartUsageElem_In = t(chartseries) bg("ChartOrange_a") mg(3,,0) ta(cc)
$NetMon_ChartUsageElem_Out = t(chartseries) bg("Chart5_a") mg(0,,3)
Plot    = t(chartplotarea)
AxisY   = $ChartStatAxisY
AxisX   = $ChartStatAxisX
Val_1_in   = $NetMon_ChartUsageElem_In v( Total.Discrete.at(0 ).BytesIn)  tt(s_TTDay_NM( $GetPeriodStart + 0*86400, Total.Discrete.at(0))) text("01")
Val_1_out  = $NetMon_ChartUsageElem_Out v(Total.Discrete.at(0 ).BytesOut) mg(0,,3) tt(s_TTDay_NM( $GetPeriodStart + 0*86400, Total.Discrete.at(0)))
Val_2_in   = $NetMon_ChartUsageElem_In v( Total.Discrete.at(1 ).BytesIn)  tt(s_TTDay_NM( $GetPeriodStart + 1*86400, Total.Discrete.at(1))) text("02")
Val_2_out  = $NetMon_ChartUsageElem_Out v(Total.Discrete.at(1 ).BytesOut) mg(0,,3) tt(s_TTDay_NM( $GetPeriodStart + 1*86400, Total.Discrete.at(1)))
Val_3_in   = $NetMon_ChartUsageElem_In v( Total.Discrete.at(2 ).BytesIn)  tt(s_TTDay_NM( $GetPeriodStart + 2*86400, Total.Discrete.at(2))) text("03")
Val_3_out  = $NetMon_ChartUsageElem_Out v(Total.Discrete.at(2 ).BytesOut) mg(0,,3) tt(s_TTDay_NM( $GetPeriodStart + 2*86400, Total.Discrete.at(2)))
Val_4_in   = $NetMon_ChartUsageElem_In v( Total.Discrete.at(3 ).BytesIn)  tt(s_TTDay_NM( $GetPeriodStart + 3*86400, Total.Discrete.at(3))) text("04")
Val_4_out  = $NetMon_ChartUsageElem_Out v(Total.Discrete.at(3 ).BytesOut) mg(0,,3) tt(s_TTDay_NM( $GetPeriodStart + 3*86400, Total.Discrete.at(3)))
Val_5_in   = $NetMon_ChartUsageElem_In v( Total.Discrete.at(4 ).BytesIn)  tt(s_TTDay_NM( $GetPeriodStart + 4*86400, Total.Discrete.at(4))) text("05")
Val_5_out  = $NetMon_ChartUsageElem_Out v(Total.Discrete.at(4 ).BytesOut) mg(0,,3) tt(s_TTDay_NM( $GetPeriodStart + 4*86400, Total.Discrete.at(4)))
Val_6_in   = $NetMon_ChartUsageElem_In v( Total.Discrete.at(5 ).BytesIn)  tt(s_TTDay_NM( $GetPeriodStart + 5*86400, Total.Discrete.at(5))) text("06")
Val_6_out  = $NetMon_ChartUsageElem_Out v(Total.Discrete.at(5 ).BytesOut) mg(0,,3) tt(s_TTDay_NM( $GetPeriodStart + 5*86400, Total.Discrete.at(5)))
Val_7_in   = $NetMon_ChartUsageElem_In v( Total.Discrete.at(6 ).BytesIn)  tt(s_TTDay_NM( $GetPeriodStart + 6*86400, Total.Discrete.at(6))) text("07")
Val_7_out  = $NetMon_ChartUsageElem_Out v(Total.Discrete.at(6 ).BytesOut) mg(0,,3) tt(s_TTDay_NM( $GetPeriodStart + 6*86400, Total.Discrete.at(6)))
Val_8_in   = $NetMon_ChartUsageElem_In v( Total.Discrete.at(7 ).BytesIn)  tt(s_TTDay_NM( $GetPeriodStart + 7*86400, Total.Discrete.at(7))) text("08")
Val_8_out  = $NetMon_ChartUsageElem_Out v(Total.Discrete.at(7 ).BytesOut) mg(0,,3) tt(s_TTDay_NM( $GetPeriodStart + 7*86400, Total.Discrete.at(7)))
Val_9_in   = $NetMon_ChartUsageElem_In v( Total.Discrete.at(8 ).BytesIn)  tt(s_TTDay_NM( $GetPeriodStart + 8*86400, Total.Discrete.at(8))) text("09")
Val_9_out  = $NetMon_ChartUsageElem_Out v(Total.Discrete.at(8 ).BytesOut) mg(0,,3) tt(s_TTDay_NM( $GetPeriodStart + 8*86400, Total.Discrete.at(8)))
Val_10_in   = $NetMon_ChartUsageElem_In v( Total.Discrete.at(9 ).BytesIn)  tt(s_TTDay_NM( $GetPeriodStart + 9*86400, Total.Discrete.at(9))) text("10")
Val_10_out  = $NetMon_ChartUsageElem_Out v(Total.Discrete.at(9 ).BytesOut) mg(0,,3) tt(s_TTDay_NM( $GetPeriodStart + 9*86400, Total.Discrete.at(9)))
Val_11_in   = $NetMon_ChartUsageElem_In v( Total.Discrete.at(10 ).BytesIn)  tt(s_TTDay_NM( $GetPeriodStart + 10*86400, Total.Discrete.at(10))) text("11")
Val_11_out  = $NetMon_ChartUsageElem_Out v(Total.Discrete.at(10 ).BytesOut) mg(0,,3) tt(s_TTDay_NM( $GetPeriodStart + 10*86400, Total.Discrete.at(10)))
Val_12_in   = $NetMon_ChartUsageElem_In v( Total.Discrete.at(11 ).BytesIn)  tt(s_TTDay_NM( $GetPeriodStart + 11*86400, Total.Discrete.at(11))) text("12")
Val_12_out  = $NetMon_ChartUsageElem_Out v(Total.Discrete.at(11 ).BytesOut) mg(0,,3) tt(s_TTDay_NM( $GetPeriodStart + 11*86400, Total.Discrete.at(11)))
Val_13_in   = $NetMon_ChartUsageElem_In v( Total.Discrete.at(12 ).BytesIn)  tt(s_TTDay_NM( $GetPeriodStart + 12*86400, Total.Discrete.at(12))) text("13")
Val_13_out  = $NetMon_ChartUsageElem_Out v(Total.Discrete.at(12 ).BytesOut) mg(0,,3) tt(s_TTDay_NM( $GetPeriodStart + 12*86400, Total.Discrete.at(12)))
Val_14_in   = $NetMon_ChartUsageElem_In v( Total.Discrete.at(13 ).BytesIn)  tt(s_TTDay_NM( $GetPeriodStart + 13*86400, Total.Discrete.at(13))) text("14")
Val_14_out  = $NetMon_ChartUsageElem_Out v(Total.Discrete.at(13 ).BytesOut) mg(0,,3) tt(s_TTDay_NM( $GetPeriodStart + 13*86400, Total.Discrete.at(13)))
Val_15_in   = $NetMon_ChartUsageElem_In v( Total.Discrete.at(14 ).BytesIn)  tt(s_TTDay_NM( $GetPeriodStart + 14*86400, Total.Discrete.at(14))) text("15")
Val_15_out  = $NetMon_ChartUsageElem_Out v(Total.Discrete.at(14 ).BytesOut) mg(0,,3) tt(s_TTDay_NM( $GetPeriodStart + 14*86400, Total.Discrete.at(14)))
Val_16_in   = $NetMon_ChartUsageElem_In v( Total.Discrete.at(15 ).BytesIn)  tt(s_TTDay_NM( $GetPeriodStart + 15*86400, Total.Discrete.at(15))) text("16")
Val_16_out  = $NetMon_ChartUsageElem_Out v(Total.Discrete.at(15 ).BytesOut) mg(0,,3) tt(s_TTDay_NM( $GetPeriodStart + 15*86400, Total.Discrete.at(15)))
Val_17_in   = $NetMon_ChartUsageElem_In v( Total.Discrete.at(16 ).BytesIn)  tt(s_TTDay_NM( $GetPeriodStart + 16*86400, Total.Discrete.at(16))) text("17")
Val_17_out  = $NetMon_ChartUsageElem_Out v(Total.Discrete.at(16 ).BytesOut) mg(0,,3) tt(s_TTDay_NM( $GetPeriodStart + 16*86400, Total.Discrete.at(16)))
Val_18_in   = $NetMon_ChartUsageElem_In v( Total.Discrete.at(17 ).BytesIn)  tt(s_TTDay_NM( $GetPeriodStart + 17*86400, Total.Discrete.at(17))) text("18")
Val_18_out  = $NetMon_ChartUsageElem_Out v(Total.Discrete.at(17 ).BytesOut) mg(0,,3) tt(s_TTDay_NM( $GetPeriodStart + 17*86400, Total.Discrete.at(17)))
Val_19_in   = $NetMon_ChartUsageElem_In v( Total.Discrete.at(18 ).BytesIn)  tt(s_TTDay_NM( $GetPeriodStart + 18*86400, Total.Discrete.at(18))) text("19")
Val_19_out  = $NetMon_ChartUsageElem_Out v(Total.Discrete.at(18 ).BytesOut) mg(0,,3) tt(s_TTDay_NM( $GetPeriodStart + 18*86400, Total.Discrete.at(18)))
Val_20_in   = $NetMon_ChartUsageElem_In v( Total.Discrete.at(19 ).BytesIn)  tt(s_TTDay_NM( $GetPeriodStart + 19*86400, Total.Discrete.at(19))) text("20")
Val_20_out  = $NetMon_ChartUsageElem_Out v(Total.Discrete.at(19 ).BytesOut) mg(0,,3) tt(s_TTDay_NM( $GetPeriodStart + 19*86400, Total.Discrete.at(19)))
Val_21_in   = $NetMon_ChartUsageElem_In v( Total.Discrete.at(20 ).BytesIn)  tt(s_TTDay_NM( $GetPeriodStart + 20*86400, Total.Discrete.at(20))) text("21")
Val_21_out  = $NetMon_ChartUsageElem_Out v(Total.Discrete.at(20 ).BytesOut) mg(0,,3) tt(s_TTDay_NM( $GetPeriodStart + 20*86400, Total.Discrete.at(20)))
Val_22_in   = $NetMon_ChartUsageElem_In v( Total.Discrete.at(21 ).BytesIn)  tt(s_TTDay_NM( $GetPeriodStart + 21*86400, Total.Discrete.at(21))) text("22")
Val_22_out  = $NetMon_ChartUsageElem_Out v(Total.Discrete.at(21 ).BytesOut) mg(0,,3) tt(s_TTDay_NM( $GetPeriodStart + 21*86400, Total.Discrete.at(21)))
Val_23_in   = $NetMon_ChartUsageElem_In v( Total.Discrete.at(22 ).BytesIn)  tt(s_TTDay_NM( $GetPeriodStart + 22*86400, Total.Discrete.at(22))) text("23")
Val_23_out  = $NetMon_ChartUsageElem_Out v(Total.Discrete.at(22 ).BytesOut) mg(0,,3) tt(s_TTDay_NM( $GetPeriodStart + 22*86400, Total.Discrete.at(22)))
Val_24_in   = $NetMon_ChartUsageElem_In v( Total.Discrete.at(23 ).BytesIn)  tt(s_TTDay_NM( $GetPeriodStart + 23*86400, Total.Discrete.at(23))) text("24")
Val_24_out  = $NetMon_ChartUsageElem_Out v(Total.Discrete.at(23 ).BytesOut) mg(0,,3) tt(s_TTDay_NM( $GetPeriodStart + 23*86400, Total.Discrete.at(23)))
Val_25_in   = $NetMon_ChartUsageElem_In v( Total.Discrete.at(24 ).BytesIn)  tt(s_TTDay_NM( $GetPeriodStart + 24*86400, Total.Discrete.at(24))) text("25")
Val_25_out  = $NetMon_ChartUsageElem_Out v(Total.Discrete.at(24 ).BytesOut) mg(0,,3) tt(s_TTDay_NM( $GetPeriodStart + 24*86400, Total.Discrete.at(24)))
Val_26_in   = $NetMon_ChartUsageElem_In v( Total.Discrete.at(25 ).BytesIn)  tt(s_TTDay_NM( $GetPeriodStart + 25*86400, Total.Discrete.at(25))) text("26")
Val_26_out  = $NetMon_ChartUsageElem_Out v(Total.Discrete.at(25 ).BytesOut) mg(0,,3) tt(s_TTDay_NM( $GetPeriodStart + 25*86400, Total.Discrete.at(25)))
Val_27_in   = $NetMon_ChartUsageElem_In v( Total.Discrete.at(26 ).BytesIn)  tt(s_TTDay_NM( $GetPeriodStart + 26*86400, Total.Discrete.at(26))) text("27")
Val_27_out  = $NetMon_ChartUsageElem_Out v(Total.Discrete.at(26 ).BytesOut) mg(0,,3) tt(s_TTDay_NM( $GetPeriodStart + 26*86400, Total.Discrete.at(26)))
Val_28_in   = $NetMon_ChartUsageElem_In v( Total.Discrete.at(27 ).BytesIn)  tt(s_TTDay_NM( $GetPeriodStart + 27*86400, Total.Discrete.at(27))) text("28")
Val_28_out  = $NetMon_ChartUsageElem_Out v(Total.Discrete.at(27 ).BytesOut) mg(0,,3) tt(s_TTDay_NM( $GetPeriodStart + 27*86400, Total.Discrete.at(27)))
Val_29_in   = $NetMon_ChartUsageElem_In v( Total.Discrete.at(28 ).BytesIn)  tt(s_TTDay_NM( $GetPeriodStart + 28*86400, Total.Discrete.at(28)) visible( Total.Discrete.size() > 28 ) text("29")
Val_29_out  = $NetMon_ChartUsageElem_Out v(Total.Discrete.at(28 ).BytesOut) mg(0,,3) tt(s_TTDay_NM( $GetPeriodStart + 28*86400, Total.Discrete.at(28))) visible( Total.Discrete.size() > 28 )
Val_30_in   = $NetMon_ChartUsageElem_In v( Total.Discrete.at(29 ).BytesIn)  tt(s_TTDay_NM( $GetPeriodStart + 29*86400, Total.Discrete.at(29))) visible( Total.Discrete.size() > 29 ) text("30")
Val_30_out  = $NetMon_ChartUsageElem_Out v(Total.Discrete.at(29 ).BytesOut) mg(0,,3) tt(s_TTDay_NM( $GetPeriodStart + 29*86400, Total.Discrete.at(29))) visible( Total.Discrete.size() > 29 )
Val_31_in   = $NetMon_ChartUsageElem_In v( Total.Discrete.at(30 ).BytesIn)  tt(s_TTDay_NM( $GetPeriodStart + 30*86400, Total.Discrete.at(30))) visible( Total.Discrete.size() > 30 ) text("31")
Val_31_out  = $NetMon_ChartUsageElem_Out v(Total.Discrete.at(30 ).BytesOut) mg(0,,3) tt(s_TTDay_NM( $GetPeriodStart + 30*86400, Total.Discrete.at(30))) visible( Total.Discrete.size() > 30 )


[NetworkMonitor_Tab_Traffic_StatArea_Stat_Data_ChartYear]
@       = $ChartStat sz(p,p) at(disable_auto_tt) union(2) v(Total.Discrete) alias(vector)
$GetPeriodStart = ctl.PeriodSwitch.PeriodBegin.value
$NetMon_ChartUsageElem_In = t(chartseries) bg("ChartOrange_a") mg(3,,0) ta(cc)
$NetMon_ChartUsageElem_Out = t(chartseries) bg("Chart5_a") mg(0,,3)
Plot    = t(chartplotarea)
AxisY   = $ChartStatAxisY
AxisX   = $ChartStatAxisX
Val_1_in   = $NetMon_ChartUsageElem_In v( Total.Discrete.at(0 ).BytesIn)  tt( s_TTMonth_NM( 0, Total.Discrete.at(0)) ) text(s_MonthOfYear( 0))
Val_1_out  = $NetMon_ChartUsageElem_Out v(Total.Discrete.at(0 ).BytesOut) mg(0,,3) tt(s_TTMonth_NM( 0, Total.Discrete.at(0)) )
Val_2_in   = $NetMon_ChartUsageElem_In v( Total.Discrete.at(1 ).BytesIn)  tt(s_TTMonth_NM( 1, Total.Discrete.at(1)) ) text(s_MonthOfYear( 1))
Val_2_out  = $NetMon_ChartUsageElem_Out v(Total.Discrete.at(1 ).BytesOut) mg(0,,3) tt(s_TTMonth_NM( 1, Total.Discrete.at(1)))
Val_3_in   = $NetMon_ChartUsageElem_In v( Total.Discrete.at(2 ).BytesIn)  tt(s_TTMonth_NM( 2, Total.Discrete.at(2))) text(s_MonthOfYear( 2))
Val_3_out  = $NetMon_ChartUsageElem_Out v(Total.Discrete.at(2 ).BytesOut) mg(0,,3) tt(s_TTMonth_NM( 2, Total.Discrete.at(2)))
Val_4_in   = $NetMon_ChartUsageElem_In v( Total.Discrete.at(3 ).BytesIn)  tt(s_TTMonth_NM( 3, Total.Discrete.at(3))) text(s_MonthOfYear( 3))
Val_4_out  = $NetMon_ChartUsageElem_Out v(Total.Discrete.at(3 ).BytesOut) mg(0,,3) tt(s_TTMonth_NM( 3, Total.Discrete.at(3)))
Val_5_in   = $NetMon_ChartUsageElem_In v( Total.Discrete.at(4 ).BytesIn)  tt(s_TTMonth_NM( 4, Total.Discrete.at(4))) text(s_MonthOfYear( 4))
Val_5_out  = $NetMon_ChartUsageElem_Out v(Total.Discrete.at(4 ).BytesOut) mg(0,,3) tt(s_TTMonth_NM( 4, Total.Discrete.at(4)))
Val_6_in   = $NetMon_ChartUsageElem_In v( Total.Discrete.at(5 ).BytesIn)  tt(s_TTMonth_NM( 5, Total.Discrete.at(2))) text(s_MonthOfYear( 5))
Val_6_out  = $NetMon_ChartUsageElem_Out v(Total.Discrete.at(5 ).BytesOut) mg(0,,3) tt(s_TTMonth_NM( 5, Total.Discrete.at(2)))
Val_7_in   = $NetMon_ChartUsageElem_In v( Total.Discrete.at(6 ).BytesIn)  tt(s_TTMonth_NM( 6, Total.Discrete.at(2))) text(s_MonthOfYear( 6))
Val_7_out  = $NetMon_ChartUsageElem_Out v(Total.Discrete.at(6 ).BytesOut) mg(0,,3) tt(s_TTMonth_NM( 6, Total.Discrete.at(2)))
Val_8_in   = $NetMon_ChartUsageElem_In v( Total.Discrete.at(7 ).BytesIn)  tt(s_TTMonth_NM( 7, Total.Discrete.at(2))) text(s_MonthOfYear( 7))
Val_8_out  = $NetMon_ChartUsageElem_Out v(Total.Discrete.at(7 ).BytesOut) mg(0,,3) tt(s_TTMonth_NM( 7, Total.Discrete.at(2)))
Val_9_in   = $NetMon_ChartUsageElem_In v( Total.Discrete.at(8 ).BytesIn)  tt(s_TTMonth_NM( 8, Total.Discrete.at(2))) text(s_MonthOfYear( 8))
Val_9_out  = $NetMon_ChartUsageElem_Out v(Total.Discrete.at(8 ).BytesOut) mg(0,,3) tt(s_TTMonth_NM( 8, Total.Discrete.at(2)))
Val_10_in   = $NetMon_ChartUsageElem_In v( Total.Discrete.at(9 ).BytesIn)  tt(s_TTMonth_NM( 9, Total.Discrete.at(2))) text(s_MonthOfYear( 9))
Val_10_out  = $NetMon_ChartUsageElem_Out v(Total.Discrete.at(9 ).BytesOut) mg(0,,3) tt(s_TTMonth_NM( 9, Total.Discrete.at(2)))
Val_11_in   = $NetMon_ChartUsageElem_In v( Total.Discrete.at(10 ).BytesIn)  tt(s_TTMonth_NM( 10, Total.Discrete.at(2))) text(s_MonthOfYear( 10))
Val_11_out  = $NetMon_ChartUsageElem_Out v(Total.Discrete.at(10 ).BytesOut) mg(0,,3) tt(s_TTMonth_NM( 10, Total.Discrete.at(2)))
Val_12_in   = $NetMon_ChartUsageElem_In v( Total.Discrete.at(11 ).BytesIn)  tt(s_TTMonth_NM( 11, Total.Discrete.at(2))) text(s_MonthOfYear( 11))
Val_12_out  = $NetMon_ChartUsageElem_Out v(Total.Discrete.at(11 ).BytesOut) mg(0,,3) tt(s_TTMonth_NM( 11, Total.Discrete.at(2)))


[NetworkMonitor_Tab_Traffic_ListArea]
@           = b(System) a(la) sz(p,p) rs(100,100)
List        = [MainWindow.SystemWatch_WorkArea_List]
Toolbar     = [Grid.Toolbar.Template] a(lt) b() t(listtoolbar) subst(Add(use(0)) Edit(use(0)) Delete(use(0)) Other([NetworkMonitor_Tab_Traffic_ListArea_ActionsArea] use(1)) ) 

[NetworkMonitor_Tab_Traffic_ListArea_ActionsArea]
@           = a(la) sz(p,p) rs(100,0)
Label       = f("Header3_BoldGreen") xy(7,7)
SearchEdit  = [SystemMonitor_Search] a(rs) xy(4,-2) subst( Filter(onchange(ctl.List.setfilter("wildcard(" + toExpr("*" + ctl.value + "*") + ", ctl.List.rowdatatext(), 3)",2))) )

[MainWindow.SystemWatch_WorkArea_List]
@           = $ListToolbar at(noborder) alias(vector) v(App) a(la) use(f_isInstalled("Firewall")) ext(1)
Application = at(fixedpos) ia(lc) sz(200)  text($AppName) i($AppIcon)
TrafficIn   = sz(150) text(f_ObjSize(Total.BytesIn)) a(r)
TrafficOut  = sz(150) text(f_ObjSize(Total.BytesOut)) a(r)
row         = f("Normal")

[HipsRules]
@ = [StyledWindowT_Tab]  alias(taskedit) ns(Hips) at(resizable,minimizable,dragable,a_ok,a_cancel) sz($TopWindows_Min_X,$TopWindows_Min_Y,720,570) subst( BodyEx( [HipsRules_Body] ))

[HipsRules_Body]
@      = sz(p,p)
Tab    = [HipsRules_Tab]

[HipsRules_Tab]
@             = $Tab a(la) mg(7,7)
ConfRes       = [SystemMonitor_Tab_Confidential] use(!p_fwTabs) h(14817)
OSRes         = [SystemMonitor_Tab_OS] use(!p_fwTabs) h(14818)
ExclusionsRes = [SystemMonitor_Tab_Exclusions] use(!p_fwTabs) h(27175)
Rules         = [HipsRules_Tab_Rules] use(p_fwTabs && f_isInstalled("Firewall")) h(25720)
Packets       = [HipsRules_Tab_Packets] use(p_fwTabs && f_isInstalled("Firewall")) h(25595)
Nets          = [HipsRules_Tab_Nets1] use(p_fwTabs && f_isInstalled("NetWatch")) h(5122)

[HipsRules_Tab_Resources]
@       = sz(p,p) h(16144)
Category    = [HipsRules_Tab_Resources_Category]
Search      = [SystemMonitor_Search] subst( Filter(onchange( ctl.parent.ResList.List.setfilter("wildcard(" + toExpr("*" + ctl.value + "*") + ", ctl.parent.ResList.List.rowdatatext(), 3)", 2))) )
ResList     = [HipsRules_Tab_Resources_GrpList_Ex] a(la) xy(,7)
;ResList     = [HipsRules_Tab_Resources_GrpList] a(la) xy(,7)

[HipsRules_Tab_Resources_GrpList_Ex]
@ = sz(p,p) b(System)
List    = [HipsRules_Tab_Resources_GrpList]
Toolbar = [Grid.Toolbar.Template] a(lt) b() t(listtoolbar) subst( \
Add( enable(!(parentGroupFlags & #rfDisableEdit)) onclick(add(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( enable(canEdit() && !(Flags & #rfDisableEdit) && (Id & #HIPS_RESID_FLAG_USER)) onclick(edit( Data ? dialog("BrowseForNamedRes") : Data.Name = dialog("Hips_GroupNameEdit")) ) ) \
Delete( enable(canDelete() && !(Flags & #rfDisableEdit) && Id & #HIPS_RESID_FLAG_USER) )  \
Other( use(1) $TB_Btn subst(Icon(i("listctrls,9"))) enable(!(parentGroupFlags & #rfDisableEdit)) onclick(add(dialog("Hips_GroupNameEdit"))) ) \
)

;Other(use(1) t(hotlink) f("Hotlink_Normal") i("listctrls,0") enable(!(parentGroupFlags & #rfDisableEdit)) onclick(add(dialog("Hips_GroupNameEdit")))  ) \

[HipsRules_Tab_Resources_Category]
@   = $Combo sz(200,20) a(at) 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.List.parentGroupId = l_group.Id; ctl.parent.ResList.List.parentGroupFlags = l_group.Flags; ctl.parent.ResList.List.showRoot = (l_group.Id == #riKLPrivateData))

[HipsRules_Tab_Resources_GrpList]
$GroupTex = (bmask(Flags, #rfCreateByUser) && Data && Name == "" ? $AddedByUser : s_ResGroupName(Name) )
@        = $ListToolbar 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($GroupTex) i(Data ? s_ResourceDescriptionIcon(serid(Data)) : s_ResGroupIcon(Name))
Resource = sz(a) text(if(Data, s_ResourceDescription(serid(Data))))

[HipsRules_Tab_Resources_ResList]
@           = $ListToolbar 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)))

[HipsRules_Tab_Resources_ResList_Ex]
@       = sz(p,p) b(System)
List    = [HipsRules_Tab_Resources_ResList]
Toolbar = [Grid.Toolbar.Template] a(lt) b() t(listtoolbar) subst( \
Add( enable(!(parentGroupFlags & #rfDisableEdit)) onclick(add(if(menu("Hips_ResListAddMenu"), (Flags = Flags | #rfCreateByUser; Id = getHipsNewResID(); ParentID = debugTrace(parentGroupId, "AAAAAA"); l_serID = s_ResourceSerID(Flags & #rtMask); Data.serinit(l_serID); if(dialog("BrowseForNamedRes"), (if(!(parentGroupFlags & #rtMask), mask(parentGroupFlags, #rtMask) = Flags & #rtMask); ParentID = debugTrace(ctl.Category.value, "BBB"); true))))))) \
Edit(enable(canEdit() && !(Flags & #rfDisableEdit) && (Id & #HIPS_RESID_FLAG_USER)) onclick(edit(dialog("BrowseForNamedRes")))) \
Delete(enable(canDelete() && !(Flags & #rfDisableEdit) && (Id & #HIPS_RESID_FLAG_USER)) ) \
)

[BrowseForNamedRes]
@       = [StyledWindowT_Small] alias(settings) at(dragable,a_ok,a_cancel) sz(a,a) btns(Ok(enable(ctl.Name.Val.value != "" && ctl.Value.Val.value != ""))) h(24781) subst( BodyEx( [BrowseForNamedRes_Body] ))

[BrowseForNamedRes_Body]
@       = sz(a,a)
Name	= [LValue] subst(Name() Val(t(edit) xy(60) v(Name)))
Value   = [LValue] subst(Name() Val(t(edit) text(s_ResourceDescription(serid(Data))) xy(60) at(readonly))) a(la) xy(0,7) sz(350,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)) ))

[Rules_Legend]
@     = sz(p,a) ext(1)
Allow = i("States16,0") a(as) xy(,,$Control_Shift,) extprm(1)
Deny  = i("States16,1") a(as) xy(,,$Control_Shift,) extprm(1)
Ask   = i("States16,3") a(as) xy(,,$Control_Shift,) extprm(1)
Mix   = i("States16,2") a(as) xy(,,$Control_Shift,) extprm(1)
ByApp = i("States16,4") a(as) xy(,,$Control_Shift,) extprm(1)

[HipsRules_Tab_Rules]
@ = h(5020)
Legend = [Rules_Legend] a(lb) subst(ByApp(use(0)))
Info   = [HipsRules_Tab_Rules_Info] a(lp) xy(,7)

[HipsRules_Tab_Rules_Info]
@ = sz(p,p)
AppCategoryCombo = [HipsRules_AppCategoryCombo]
SearchBox        = [SystemMonitor_Search] a(rs) subst( Filter(onchange(ctl.Info.List.setfilter("wildcard(" + toExpr("*" + ctl.value + "*") + ", ctl.parent.List.rowdatatext(), 3)", 2) )) )
Data             = [HipsRules_Tab_Rules_Data] a(la) xy(,10)

[HipsRules_AppCategoryCombo]
$FilterTrafItem = TrafficStat.App.find(\"AppID == \" + toExpr(Id))
@               = t(combo) a(lt) sz(a,a) onchange(if(ctl.value == "All",  ctl.List.setfilter("", 10), \
                                              if(ctl.value == "Network", ctl.parent.List.setfilter("$FilterTrafItem.Total.BytesIn + $FilterTrafItem.Total.BytesOut > 0", 10))))
All
Network

[HipsRules_Tab_Rules_Data]
@ = b(System) sz(p,p)
List    = [HipsRules_Tab_RulesList]
Toolbar  = [Grid.Toolbar.Template] a(lt) b() t(listtoolbar) subst(Add(use(0)) Edit(onclick(edit(dialog("AppRulesEdit", p_image(Name), p_appID(Id))))) Delete(use(0)) ) 

[HipsRules_Tab_RulesList]
$Item      = Applications.find("Id == " + toExpr(Id))
@          = $ListToolbar at(singlesel,noroot, noborder) alias(tree.AppGroups) v(Application) childs(Childs) unique(Id == newItem.Id,0) id(Name) filter(ParentID != #HIPS_APPID_ROOT || Id >= #HIPS_APPID_TRUSTED && Id <= #HIPS_APPID_UNTRUSTED)
Name       = [HipsRules_Tab_Rules_Name]
Network    = id(#riKLNetwork) at(clickable) sz(120) ia(cc) i(s_RuleState(depend(State))) tt(s_RuleStateTxt(depend(State))) onclick(ctl.menu("HipsRuleColumn.Menu")) onrclick(menu("HipsRuleColumn.Menu")) text()
Popularity = i(var pData; pData = $Item; if(pData, s_PopularityIcon(f_WoCUsersCount2Level(pData.WoCInfo.UsersCount)))) text()
Traffic    = [HipsRules_Tab_Rules_Traffic]
row        = at(clickable) onrclick(menu("AppRules_Body_DisplayArea_Menu"); ctl.parent.setchanged())

[HipsRules_Tab_Rules_Name]
@       = sz(400) 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)))

[HipsRules_Tab_Rules_Traffic]
$TrafItem  = TrafficStat.App.find("AppID == " + toExpr(Id))
@          = sz(100) ta(r) text(Id & #HIPS_APPID_FLAG_GROUP ? "" : f_ObjSize($TrafItem.Total.BytesIn + $TrafItem.Total.BytesOut))
TrafficIn  = sz(100) ta(r) text(Id & #HIPS_APPID_FLAG_GROUP ? "" : f_ObjSize($TrafItem.Total.BytesIn))
TrafficOut = sz(100) ta(r) text(Id & #HIPS_APPID_FLAG_GROUP ? "" : f_ObjSize($TrafItem.Total.BytesOut))

[HipsRules_Tab_RulesList.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)
Legend = [Rules_Legend] a(lb) subst(Ask(use(0)))
Info   = [HipsRules_Tab_Packets_Info] a(lp) xy(,7) sz(p,p)

[HipsRules_Tab_Packets_Info]
@ = b(System)
Label   = mg(,7)
List    = [PacketRuleList] v(vRuleList) filter(RuleTypeId == #HIPS_RULE_TYPE_PACKET)
Toolbar = [Grid.Toolbar.Template] b() a(lt) t(listtoolbar) subst(Add(onclick(add( dialog("[PacketRuleEdit] oninit(AppIdEx = 0; RuleTypeId = #HIPS_RULE_TYPE_PACKET; RuleId = getHipsNewRuleID())") ))) Edit(onclick(edit(dialog("[PacketRuleEdit]")))) MoveUp(use(1)) MoveDown(use(1)) Other( use(1) $TB_Btn a(rc) xy(2) onclick(dialog("FwSettings")) ))

[HipsRules_Tab_Nets1]
@ = b(System)
List    = [HipsRules_Tab_Nets]
Toolbar = [Grid.Toolbar.Template] a(lt) b() t(listtoolbar) subst( \
Add(use(0)) \
Edit(onclick( isNode ? dialog("AdapterEdit", p_data(NetWatch.Adapters.find("ID == ctl.parent.List.val"))) : edit( dialog("NetworkEdit")) )) \
Delete(enable(!isNode && !(State & #znConnected) && TypeOfInterface != #If_Internet)))

[HipsRules_Tab_Nets]
@           = $ListToolbar alias(vector.Networks) v(NetWatch.Zones) group(AdapterID,AdapterID,default) filter(State & #znVisible)
Name        = sz(300) text(FriendlyName) i(s_NetZoneTypeIcon(Severity)) v(ID) 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")))




[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_GetText = (adapterInfo.TypeOfInterface == #If_OtherNetwork ? $OtherNetworks : adapterInfo.FriendlyName)
$AdapterID_GetIcon = (f_NetAdapterIcon(adapterInfo.TypeOfInterface, -1, adapterInfo.State, 0))
AdapterID       = [Grid.Group.Template] expand(1) bp(var adapterInfo; adapterInfo = NetWatch.Adapters.find("ID == val");ctl.text=$AdapterID_GetText;ctl.icon=$AdapterID_GetIcon)
HipsRuleColumn  = at(clickable) sz(120) 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]
@    = [StyledWindowT_Small] at(dragable,a_ok,a_cancel,resizable) subst( BodyEx( [HipsGroups_Body] )) sz(600,400) alias(taskedit) ns(Hips) h(p_fwRules ? 15990 : 15989)

[HipsGroups_Body]
@         = $DlgBodyAttr
SearchBox = [SystemMonitor_Search] a(rs) xy(,-2,,4) subst( Filter(onchange(ctl.Rules.setfilter("wildcard(" + toExpr("*" + ctl.value + "*") + ", ctl.Rules.rowdatatext(), 3)",100))) )
Rules     = [HipsGroups_Rules]

[HipsGroups_Rules]
; if you don't want to edit settings for particular applications, use a proper filter for the tree.AppGroups: filter(Id >= #HIPS_APPID_TRUSTED && Id <= #HIPS_APPID_UNTRUSTED)
@       = $List a(la) at(singlesel,noroot) alias(tree.AppGroups) v(Application) childs(Childs) unique(Id == newItem.Id,0) id(Name)
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")

; ------------- AppRules -------------

[AppRules]
@ = [StyledWindowT]  alias(taskedit) ns(Hips) at(resizable,minimizable,dragable,a_ok,a_cancel) sz($TopWindows_Min_X,$TopWindows_Min_Y,720,570) subst( BodyEx( [AppRules_Body] )) h(5020)

[AppRules_Body]
@                = a(lt) mg(7,7,7,7) sz(p,p) h(5020)
AppCategoryCombo = [AppRules_Body_AppCategoryCombo]
SearchBox        = [SystemMonitor_Search] a(rs) subst( Filter(onchange(ctl.List.setfilter("wildcard(" + toExpr("*" + ctl.value + "*") + ", ctl.List.rowdatatext(), 3)",100))) ) use(1)
ListArea         = [AppRules_Body_ListArea]

[AppRules_Body_ListArea]
@           = a(la) sz(p,p) xy(,7)
Legend      = [AppRules_Body_Legend]
DisplayArea = [AppRules_Body_DisplayArea] 

[AppRules_Body_DisplayArea]
@ = b(System) a(lp) sz(p,p) xy(,7)
Toolbar = [Grid.Toolbar.Template] b() subst( Add(use(0)) \
                                             Edit(enable(ctl.List.seldata()) onclick(ctl.List.edit(dialog("AppRulesEdit", p_image(ctl.List.seldata().Name), p_appID(ctl.List.seldata().Id))))) \
                                             Delete(use(1) enable(ctl.List.seldata() && (ctl.List.seldata().ParentID != #HIPS_APPID_ROOT))) onclick(ctl.List.delete())))
List    = [AppRules_Body_DisplayArea_List] a(la)

[AppRules_Body_DisplayArea_List]
$Item      = Applications.find("Id == " + toExpr(Id))
@          = $List at(singlesel,noroot,noborder) alias(tree.AppGroups) v(Application) childs(Childs) unique(Id == newItem.Id,0) id(Name) filter(ParentID != #HIPS_APPID_ROOT || Id >= #HIPS_APPID_TRUSTED && Id <= #HIPS_APPID_UNTRUSTED)
Name       = [HipsRules_Tab_Rules_Name]
Status     = i(f_AppStatusIconMerge3(appGroup(Application, ser()), hasAppCustomRules(Application.ser(), Id), Flags & 0x01)) text() sz(60,a)
Network  = id(#riKLNetwork) at(clickable)  ia(cc) i(s_RuleState(depend(State))) tt(s_RuleStateTxt(depend(State)))  onrclick(menu("HipsRuleColumn.Menu")) text() sz(60,a)
SystemData = id(#riKLSystemData) at(clickable) sz(60,a) ia(cc) i(s_RuleState(depend(State))) tt(s_RuleStateTxt(depend(State))) onclick(ctl.menu("HipsRuleColumn.Menu")) onrclick(menu("HipsRuleColumn.Menu")) text()
PrivateData= id(#riKLPrivateData) at(clickable) sz(60,a) ia(cc) i(s_RuleState(depend(State))) tt(s_RuleStateTxt(depend(State))) onclick(ctl.menu("HipsRuleColumn.Menu")) onrclick(menu("HipsRuleColumn.Menu")) text()
Start    = id(770) at(clickable) sz(60,a) ia(cc) i(s_RuleState(depend(State))) tt(s_RuleStateTxt(depend(State))) onrclick(menu("HipsRuleColumn.Menu")) text()
Popularity = i(var pData; pData = $Item; if(pData, s_PopularityIcon(f_WoCUsersCount2Level(pData.WoCInfo.UsersCount)))) text() sz(120,a)
row        = at(clickable) onrclick(menu("AppRules_Body_DisplayArea_Menu"); ctl.parent.setchanged())

[AppRules_Body_DisplayArea_Menu]
$IsGroupItem    = bmask(Id, #HIPS_APPID_FLAG_GROUP)
@               = t(menu)
Rules           = props(if(!$IsGroupItem, "at(default)")) text(s_AppRulesMenuItemText($IsGroupItem)) onclick(edit(dialog("AppRulesEdit", p_image(Name), p_appID(Id))))
MakeSubgroup    = use($IsGroupItem) onclick(add(dialog("Hips_GroupNameEdit")))
ResetAppRules   = use(!$IsGroupItem) onclick(resetGroupRules(Id, Resource))
ResetGroupRules = use($IsGroupItem) [AppRules_Body_DisplayArea_Menu_ResetGroupRules]
DeleteProgram   = onclick(delete()) enable(canDelete()) use(!$IsGroupItem)
Category        = [AppRules_Body_DisplayArea_Menu_Category] use(!$IsGroupItem)
DeleteGroup     = onclick(delete()) enable(canDelete()) use($IsGroupItem && ParentID != #HIPS_APPID_ROOT)

[AppRules_Body_DisplayArea_Menu_Category]
Trusted     = text(s_AppGroupName("KLAppTrusted")) enable(hipsGetRootGroup(Id) != "KLAppTrusted") onclick(ctl.List.moveTo("Name == \"KLAppTrusted\""))
Low         = text(s_AppGroupName("KLAppRestrictedLow")) enable(hipsGetRootGroup(Id) != "KLAppRestrictedLow") onclick(ctl.List.moveTo("Name == \"KLAppRestrictedLow\""))
High        = text(s_AppGroupName("KLAppRestrictedHi")) enable(hipsGetRootGroup(Id) != "KLAppRestrictedHi") onclick(ctl.List.moveTo("Name == \"KLAppRestrictedHi\""))
Untrusted   = text(s_AppGroupName("KLAppUntrusted")) enable(hipsGetRootGroup(Id) != "KLAppUntrusted") onclick(ctl.List.moveTo("Name == \"KLAppUntrusted\""))

[AppRules_Body_DisplayArea_Menu_ResetGroupRules]
ResetSelected    = onclick(resetGroupRules(Id, Resource))
ResetRecursively = onclick(resetGroupEntriesRules(ctl.List.seldata(),Resource))

[AppRules_Body_AppCategoryCombo]
@            = t(combo) a(lt) sz(a,a) onchange(if(ctl.value == "All",     ctl.List.setfilter("ParentID != #HIPS_APPID_ROOT || Id >= #HIPS_APPID_TRUSTED && Id <= #HIPS_APPID_UNTRUSTED", 10), \
                                               if(ctl.value == "StartUp", ctl.List.setfilter("var pData; pData = Applications.find(\"Id == \" + toExpr(Id)); if(pData, pData.Startup, false)", 10))))
All
StartUp

[AppRules_Body_Legend]
@              = sz(p,a) a(lb)
;SystemStatus   = a(la) i("ProcHipsStatus,13")
UserStatus     = a(as) i("ProcHipsStatus,12") xy(14)
CustomSettings = [Value] sz(a,a) at(noowncontent) subst(Name(sz(16,16) i("Proc_status,4")) Val(a(at) text(ctl.text = ctl.parent.text)) ) a(as) xy(14)

[MainWindow.Hips_Filters]
@           = at(enum) v(ctl.parent.parent.value)
AllItems    = at(radiolike) v("1400010003b2;Ti14100000a40000000000000000;Ap00000000d4;Pa0000000033;Na0000000037;PI0000000035;Co0000000035;Ta1002000050;Ac10000000a0;Ob1000000104;Ty100000003c;Pa2000000064;Na2000000064;Ve1000000096;De000000001e;De100000001e;De100000001e;De100000001e;Ex100000001e;Re2002000050;")
ByApp       = at(radiolike) v("140001000322;Ti10100000a4;Ap04020000d4;Pa0000000033;Na0000000037;PI0000000035;Co0000000035;Ta1002000050;Ac10000000a0;Ob1000000148;Ty100000003c;Pa200000008c;Na2000000080;Ve1000000096;De000000001e;De100000001e;De100000001e;De100000001e;Ex100000001e;Re2002000050;")

[MainWindow.Hips_Filters2]
@           = at(enum) v(ctl.parent.parent.value)
AllItems    = at(radiolike) v("140001000301;Pr0010000183;De00000000dc;Fi0000000058;Fo000000001e;Ve0000000091;Pr000000001e;Ve000000001e;Si000000001e;Cr000000001e;Mo000000001e;St000000017e;De000000001e;Cu000000001e;")
ByApp       = at(radiolike) v("140001000301;Pr041000018362614c20796b73726e6f697461726f702e636e49202c6572;De00000000dc;Fi0000000058;Fo000000001e;Ve0000000091;Pr000000001e;Ve000000001e;Si000000001e;Cr000000001e;Mo000000001e;St000000017e;De000000001e;Cu000000001e;")

[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("ChartOrange")))
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) onclick1($ProfileHome_Report) onrclick1(if(f_isInstalled("Firewall") && (f_isInstalled("HipsTask") || f_isInstalled("pdm")), menu("SystemWatchChartMenu"))) chartstyle(bar)
Report  = $Link a(lt) xy(20) text($Reports) onclick(window("MainReport:SystemWatch"))
line1   = t(chartline) id(Hips_InBytes) bg("ChartOrange") 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(ctl.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]
@  = [StyledWindowT_Small] at(dragable,a_ok,a_cancel) subst( BodyEx( [FwSettings_Body] ) ) sz(300,a) h(7455)

[FwSettings_Body]
@           = sz(p,a)
FtpTracking = $Check v(bmask(FirewallSettings.Flags, #fwFtpTracking))
NoGuiAction = $Check xy(,7) v(bmask(FirewallSettings.Flags, #fwCantAskDeny))
OnShutdown  = $Check xy(,7,,) 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) $LValueShift text(f_displayPath(p_pid, ModuleInfo.sImagePath)))) a(sa)
FileNotExist    = [FileInfo_Tab_IfFileNotExist]
GroupPInfo      = [FileInfo_Tab_GroupProductInfo]
GroupSign       = [FileInfo_Tab_GroupSignature]
GroupKsn        = [FileInfo_Tab_GroupKsn]

[FileInfo_Tab_IfFileNotExist]
@       = sz(p,a) a(la) xy(,21) use( !(AppDFlags & 0x01) )
Descr   = a(la) sz(p,a) $LValueShift

[FileInfo_Tab_GroupProductInfo]
@           = sz(p,a) a(la) xy(,21) use(AppDFlags & 0x01)
Vendor      = [LValue] xy(,) subst(Name() Val($LValueShift text(ModuleInfo.sVendor)))
Product     = [LValue] xy(,$Control_Shift) subst(Name() Val($LValueShift text(ModuleInfo.sProduct)))
Version     = [LValue] xy(,$Control_Shift) subst(Name() Val($LValueShift text(ModuleInfo.sVersion)))
Size        = [LValue] xy(,10) subst(Name() Val($LValueShift text(f_ObjSize(ModuleInfo.nObjectSize))))
Created     = [LValue] xy(,$Control_Shift) subst(Name() Val($LValueShift text(ModuleInfo.tCreation > 0 ? datetime(ModuleInfo.tCreation) : "")))
Modified    = [LValue] xy(,$Control_Shift) subst(Name() Val($LValueShift text(datetime(ModuleInfo.tModify))))

[FileInfo_Tab_GroupSignature]
@           = sz(p,a) a(la) xy(,21) use(AppDFlags & 0x01)
Group       = [LValue] xy(,) subst(Name(a(lt)) Val($LValueShift f("Normal_Bold") text(f_AppRootGroupName(strGroupPath) + $AppGroupByUser ) i(mergeIcon(f_AppRootGroupIcon(strGroupPath), if(AppDFlags & 0x02, "Proc_status,6", "Proc_status,5"))))) use(strGroupPath)
Rating      = [LValue] xy(,$Control_Shift) subst(Name(a(lt)) Val($LValueShift text(s_PMRating(Rating))))
ScanResult  = [LValue] xy(,$Control_Shift) subst(Name(a(lt)) Val($LValueShift text(ScanResult.DetectName))) use(ScanDetected && ScanResult.DetectName)
Origin      = [LValue] xy(,$Control_Shift) subst(Name(a(lt)) Val($LValueShift text(f_ProcessInfo(EventCreated.PID).Module.sImagePath))) use(EventCreated.PID)
Sign        = [LValue] xy(,$Control_Shift) subst(Name(a(lt)) Val($LValueShift text(f_SignStatus())))
SignDate    = [LValue] xy(,$Control_Shift) subst(Name(a(lt)) Val($LValueShift text(datetime(Signature.dtSignedTime)))) use(Signature.dtSignedTime)

[FileInfo_Tab_GroupKsn]
@           = sz(p,a) a(la) xy(,21) oninit(l_WoCInfo = if(ProcMon.UseKLSRL, c_WoCInfo(appID, appWoCInfo(appID))))
Popularity  = [LValue] a(lt) subst(Name() Val($LValueShift text(if(ProcMon.UseKLSRL, f_Customers(l_WoCInfo.UsersCount), $KSNDisabled))))
Found       = [LValue] a(sa) xy(,$Control_Shift) subst(Name() Val($LValueShift text(datetime(l_WoCInfo.FirstRequestTime)))) use(ProcMon.UseKLSRL)
Geography   = [LValue] a(sa) xy(,$Control_Shift) subst(Name(sz(a,a,,,$LValueLeftArea)) Val($LValueShift text(f_formatGeoSharing(l_WoCInfo.GeoSharing)))) visible(ctl.Val.text) use(ProcMon.UseKLSRL)

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

[AppExecuteChain]
@  = [StyledWindowT_Small] at(dragable,resizable,a_close) subst( BodyEx( [AppExecuteChain_Body] ) ) sz(400,170) h(15838)

[AppExecuteChain_Body]
@ = sz(p,p) a(lt)
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) 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]
@    = [StyledWindowT_Small_Tab] at(dragable,a_ok,a_cancel,resizable) subst( Body(xy($Border_Shift,$DialogPanelSizeY_top,$Border_Shift,$DialogPanelSizeY_bottom)) BodyEx( [AppRulesEdit_Body] )) props(env("Localization") == "sr" ? "sz(716,514)" : "sz(600,540)") alias(appprop) ns(Hips) onok(p_WasChild && isSettingsDirty() ? msg("ConfirmChangeStatusWithChild", #m_yesno) : true)

[AppRulesEdit_Body]
@           = sz(p,p)
Hdr         = [AppRulesEdit_Hdr]
Separator   = [AppRulesEdit_Separator]
Tab         = [AppRulesEdit_Tab]

[AppRulesEdit_Hdr]
@       = a(la) sz(p,a) mg(7,7) rs(100,0) bg("MainWindow")
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) rs(100,0)

[AppRulesEdit_Tab]
@           = $Tab a(la) xy(,$DialogPanelSize_DiffTabStd,,) rs(100,100)
Image       = [FileInfo_Tab] mg(21,7) use(!(appID & #HIPS_APPID_FLAG_GROUP)) h(25697)
Group       = [AppRulesEdit_Tab_Group] mg(21,7) h(15988)
Files       = [AppRulesEdit_Tab_Files] h(25703)
Permiss     = [AppRulesEdit_Tab_Permiss] h(25705)
Net         = [AppRulesEdit_Tab_Net] h(25710)
History     = [AppRulesEdit_Tab_History] mg(7,7) h(25715)
Excludes    = [AppRulesEdit_Tab_Excludes] mg(21,7) h(25719)

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

[AppRulesEdit_Tab_Files]
@       = sz(p,p) mg(10,7) use(!p_OnlyFileInfo && Application.treeFind("Childs", "Id == appID") && f_isInstalled("Hips"))
Legend = [Rules_Legend] a(lb) subst(Mix(use(0)) ByApp(use(0)))
List    = [AppRulesEdit_Tab_Rules_Files] a(lp) xy(,7)

[AppRulesEdit_Tab_Permiss]
@       = sz(p,p) mg(10,7) use(!p_OnlyFileInfo && Application.treeFind("Childs", "Id == appID") && f_isInstalled("Hips"))
Legend = [Rules_Legend] a(lb) subst(Mix(use(0)) ByApp(use(0)))
List    = [AppRulesEdit_Tab_Rules_Permiss] a(lp) xy(,7)

[AppRulesEdit_Tab_Net]
@         = sz(p,p) mg(10,7) use(!p_OnlyFileInfo && Application.treeFind("Childs", "Id == appID") && f_isInstalled("Firewall"))
Lst       = [AppRulesEdit_Tab_Net_Lst] a(lt) sz(p,a)
Rule      = t(richedit) at(readonly,nofocus,vscroll) sz(p,p) a(la) xy(,7) alias(descriptor) dataowner(List) bp(l_ws = if(ResIdEx,c_ws(ResIdEx, Resource.treeFind("Childs", "Id == ResIdEx"))); l_ip = c_ip(ResIdEx2, Resource.treeFind("Childs", "Id == ResIdEx2"))) text(ctl.parent.List.canEdit() ? $NetRuleDescr : $NetRuleDescrReadOnly)

[AppRulesEdit_Tab_Net_Lst]
@ = b(System)
List      = [PacketRuleList] sz(p,170) a(lt) v(vRuleList) filter(AppIdEx == appID && RuleTypeId == #HIPS_RULE_TYPE_FW)
Toolbar   = [Grid.Toolbar.Template] a(lt) b() t(listtoolbar) subst(Add(onclick(add( dialog("[PacketRuleEdit] oninit(AppIdEx = appID; RuleTypeId = #HIPS_RULE_TYPE_FW; RuleId = getHipsNewRuleID())") ))) Edit(onclick(edit(dialog("[PacketRuleEdit]")))) MoveUp(use(1)) MoveDown(use(1)))

[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_Files]
$Col    = sz(a)  ia(cc) text("") at(clickable)
@       = $List 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)) id(Name)
Name    = sz(200) text(s_ResGroupName(Name))
Read    = $Col i(f_AppRuleIcon(depend(Rule.AccessFlag) >> 4)) onrclick(menu("HipsAppRuleMenu.1")) sz(80,a)
Write   = $Col i(f_AppRuleIcon(depend(Rule.AccessFlag))) onrclick(menu("HipsAppRuleMenu.0")) sz(80,a)
Remove  = $Col i(f_AppRuleIcon(depend(Rule.AccessFlag) >> 12)) onrclick(menu("HipsAppRuleMenu.3")) sz(80,a)
Create  = $Col i(f_AppRuleIcon(depend(Rule.AccessFlag) >> 8)) onrclick(menu("HipsAppRuleMenu.2")) sz(80,a)

[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"))
Details = sz(p,a) a(la) text(s_AppGroupDetails(ModuleInfo.sImagePath)) use(s_AppGroupDetails(ModuleInfo.sImagePath))

[AppRulesEdit_Tab_Rules_Permiss]
@       = $List at(expandall) a(lt) alias(tree.ResRule) v(Resource) childs(Childs) root(Name == "KLPrivileges")
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"))
ExecInf = [AppRulesEdit_Tab_History_Execute] a(lb) sz(p,a)
Events  = [AppRulesEdit_Tab_History_Events] a(lp)

[AppRulesEdit_Tab_History_Events]
@       = sz(p, p) b(System)
List    = [Product_Events_Report_Ex] subst(Report( v(#eTASK_GROUP_HIPS) prm(#dbRTP) filter(TaskGroup == #eTASK_GROUP_HIPS && (AppID == appID || ObjectID == appID || OldObjectID == appID))) Time(group()) Object(sz(160)) Application(use(0)) InSandbox(use(0)) Verdict(use(0)) Reason(use(0)) Task(use(0)))

[AppRulesEdit_Tab_History_Execute]
AreaSpace     = a(lt) sz(p,4)
ExecLabel     = a(la)
ExecCount     = a(as) text( nExecuteCountFromLastChange + if( (nExecuteCountFromLastChange != nExecuteCountTotal), "  (" + nExecuteCountTotal + ")" ))
LastExec      = a(rs) text(datetime(nLastExecuteTime))
LastExecLabel = a(ps)

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

[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("States16,0,0,0,0,0,0") v(#HIPS_FLAG_ALLOW) extprm(1) $txt
Deny        = at(radiolike) i("States16,1,1,1,1,1,1") v(#HIPS_FLAG_DENY) extprm(1) $txt
Ask         = at(radiolike) i("States16,3,3,3,3,3,3") v(#HIPS_FLAG_ASK) extprm(1) $txt
ByApp       = at(radiolike) i("States16,4,4,4,4,4,4") v(#HIPS_FLAG_BYAPP) extprm(1) $txt use(0)
Separator
Log         = at(chklike) i("States16,5,5,5,5,5,5") 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] alias(settings) h(24793) subst( Name() Example(use(0))) ext(1)

[Hips_AppGroupNameEdit]
@ = [EditSimpleItem] alias(settings) 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) extprm(1)
IpRange     = at(radiolike) v(#rtIpRange) extprm(1)

[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(var state; state = getHipsRuleState(ParentID, EditResID); if(state < #HIPS_RULE_STATE_INH_DENY, s_RuleState(state+#HIPS_RULE_STATE_INH_DENY), s_RuleState(state))) v(#HIPS_RULE_STATE_INH) use(ParentID != #HIPS_APPID_ROOT)
Separator
Allow       = at(radiolike) i("States16,0,0,0,0,0,0") v(#HIPS_RULE_STATE_ALLOW)
Deny        = at(radiolike) i("States16,1,1,1,1,1,1") v(#HIPS_RULE_STATE_DENY)
Ask         = at(radiolike) i("States16,3,3,3,3,3,3") v(#HIPS_RULE_STATE_ASK)

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

[WebServiceEdit]
@       = [StyledWindowT_Small] at(dragable,a_ok,a_cancel) subst( BodyEx( [WebServiceEdit_Body] ))  sz(430,a) onapply(c_ws().clear()) h(5051) btns(Ok(enable(Id & #HIPS_RESID_FLAG_USER)))

[WebServiceEdit_Body]
@           = sz(p,a) ext(1)
Name        = [LValue] subst(Name() Val([WebServiceEdit_Name])) enable(Id & #HIPS_RESID_FLAG_USER) extprm(1)
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))
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)) 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))  onok(if(ctl.visible, f_ParsePortsError(ctl.value, Data.LocalPorts), true))))

[WebServiceEdit_Name]
@         = sz(p,a) xy(120) ext(1)
Templates = a(rt) sz(a,a) xy(,2,2) at(btnlike) bg("ShevronFirewall,3,1,0,2,0,0") onclick( if(browsewebservices(), (ctl.parent.parent.RemotePorts.Val.value = f_formatPorts(Data.RemotePorts); ctl.parent.parent.LocalPorts.Val.value = f_formatPorts(Data.LocalPorts))) ) use(0) extprm(1)
Name      = a(pt) sz(p,a) t(edit) v(Name) onshow(if(!Name, ctl.value = $NewWebServiceName)) onok(if(!Name, balloon("NeedName")))

[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]
@       = [StyledWindowT_Small] at(dragable,a_ok,a_cancel) subst( BodyEx( [IpRangeEdit_Body] )) sz(330,a) onapply(c_ip().clear()) h(5053)

[IpRangeEdit_Body]
@           = sz(p,a)
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] 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(Address ? tolower(Address)==tolower(newItem.Address) : 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(26349)

[ResolveIp]
@  = [StyledWindowT_Small] at(dragable,nohelp,a_cancel) subst( BodyEx( [ResolveIp_Body] ) ) sz(330,a)

[ResolveIp_Body]
Text        = sz(250,30)
Progress    = t(progress) a(la) xy(,7) sz(p,15)

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

[PacketRuleList]
@       = $ListToolbar 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]

[PacketRuleList_Service]
@       = sz(355) at(checked) v(bmask(RuleState, 1)) bp(l_ws = if(ResIdEx,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(200) 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]
@    = [StyledWindowT_Small] alias(settings.PacketRuleEdit) at(dragable,a_ok,a_cancel) onapply(c_ws().clear(); c_ip().clear()) subst( BodyEx( [PacketRuleEdit_Body] ) ) sz(450,a) h(5404)

[PacketRuleEdit_Body]
@       = sz(p,a) mg(14,14)
Action  = [LValue] a(la) subst(Name() Val(a(ls) xy(120,-4) [PacketRuleEdit_Action]))
Service = [PacketRuleEdit_Service] xy(,17)
Address = [PacketRuleEdit_Address] xy(,17)
Log     = $Check a(ra) xy(,17) v(bmask(AccessFlag, #HIPS_FLAG_LOG)) enable((AccessFlag & #HIPS_FLAG_ALL_ACTIONS) != #HIPS_FLAG_BYAPP)

[PacketRuleEdit_Action]
@       = $Combo sz(p,a) v(mask(AccessFlag, #HIPS_FLAG_ALL_ACTIONS)) ext(1)
Allow   = a(ls) xy(120) v(#HIPS_FLAG_ALLOW)
Block   = a(as) xy(7) f("Normal_Bold") v(#HIPS_FLAG_DENY)
Skip    = a(as) f("Normal_Bold") v(#HIPS_FLAG_BYAPP) visible(!AppIdEx) onok(if(ctl.selected && !f_isTcpUdpEx(ctl.Service.List.seldata().Data), balloon("WrongAction"))) extprm(1)

[PacketRuleEdit_Service]
@    = a(la) sz(p,135)
Body = [WebServiceEdit_Body] ns(WebService) subst( Name( subst( Val([WebServiceEdit_Name] subst( Templates(use(1)))) )))

[PacketRuleEdit_Address]
@            = a(la) sz(p,a) onok(ResIdEx2=s_AddrGet(ctl.Address.Val.value);true) ext(1)
Address      = [LValue] a(la) subst(Name() Val(a(ls) xy(120,-4) [PacketRuleEdit_Address_Combo] onshow(ctl.value = s_AddrInit(ResIdEx2))))
NetSel       = [LValue] a(la) xy(,14) subst(Val(xy(120) [PacketRuleEdit_Address_NetSel])) visible(ctl.Address.Val.value == 1)
RemoteAddrs  = [LValue] a(la) sz(p,64) xy(,14) subst(Name(a(lt)) Val(xy(120) [IpRangeEdit_Addrs_List] v(IpRange.Data.RemoteAddresses) onok(if(ctl.Address.Val.value == 2 && !IpRange.Data.RemoteAddresses.size() && !IpRange.Data.LocalAddresses.size(), balloon("NeedAddresses"))))) visible(ctl.Address.Val.value == 2)
LocalAddress = [LValue] a(la) xy(,14) subst(Name() Val(a(ls) xy(120,-4) [PacketRuleEdit_Address_Combo] subst(Net(use(0))) onshow(ctl.value = IpRange.Data.LocalAddresses.size() ? 2 : 0))) visible(!AppIdEx && ctl.Address.Val.value == 2)
LocalAddrs   = [LValue] a(la) sz(p,64) xy(,14) subst(Name(a(lt)) Val(xy(120) [IpRangeEdit_Addrs_List] v(IpRange.Data.LocalAddresses) onok(if(ctl.Address.Val.value == 2 && ctl.LocalAddress.Val.value == 2 && !IpRange.Data.LocalAddresses.size(), balloon("NeedAddresses"))))) visible(!AppIdEx && ctl.Address.Val.value == 2 && ctl.LocalAddress.Val.value == 2)

[PacketRuleEdit_Address_Combo]
@       = $Combo sz(p,a) ext(1)
Any     = v(0)
Net     = v(1) extprm(1)
Group   = v(2)

[PacketRuleEdit_Address_NetSel]
@ = sz(p,a)
Trusted = $Radio a(la)        v(50) text(s_ResGroupName("KLTrusted"))
Local   = $Radio a(la) xy(,7) v(51) text(s_ResGroupName("KLLocal"))
Public  = $Radio a(la) xy(,7) v(52) text(s_ResGroupName("KLPublic"))

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

[PacketRuleCreate]
@ = [StyledWindowT_Small] alias(settings.PacketRuleEdit) at(dragable,a_ok,a_cancel) sz(450,a) ns(Hips.settings) oninit(AppIdEx = p_appID; RuleTypeId = #HIPS_RULE_TYPE_FW; RuleId = getHipsNewRuleID(); if(p_blocked, AccessFlag = #HIPS_FLAG_DENY); WebService.Data.initFrom(p_netAct); IpRange.Data.initFrom(p_netAct)) subst(Body(mg(0,0)) BodyEx([PacketRuleCreateBody])) ext(1)

[PacketRuleCreateBody]
@    = sz(p,a)
Info = [AlertDialogT_InfoArea] subst(Info([PacketRuleCreateBody_Descr] ns(p_netAct)))
Rule = [PacketRuleEdit_Body] a(la) onok(if(!isServiceMatch(WebService.Data, p_netAct.Proto, p_netAct.Direction, p_netAct.RemotePort, p_netAct.LocalPort, p_netAct.IcmpType, p_netAct.IcmpCode),balloon("ServiceNotMatch")))

[PacketRuleCreateBody_Descr]
Ico  = sz(32,32) i(getIcon(f_AppInfo(p_appID).sImagePath, "unkapp", 1))
Info = a(as) xy(10) text(s_AppName(p_appID) + f_NetActionDescr(Proto, Direction == #wsOut || Direction == #wsOutStream) + ".")

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

[AdapterEdit]
@  = [StyledWindowT_Small_Tab] at(dragable,a_ok,a_cancel) subst( BodyEx( [AdapterEdit_Tab] ) ) sz(350,400) alias(settings)

[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 : FriendlyName)
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]
@  = [StyledWindowT_Small_Tab] at(dragable,a_ok,a_cancel) subst( BodyEx( [NetworkEdit_Tab] ) ) sz(350,400) alias(settings)

[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(FriendlyName))) 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) mg(0,8)
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(350,a) subst(TaskName(text($NewNetworkTaskName)) Body([NewNetwork_Body])) h(26505)

[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))
Header  = t(richedit) a(as) xy(17) sz(p,a) at(readonly,nofocus,noborder)
Adapter = [LValue] a(sa)        subst(Name() Val(xy(70) at(clickable) f("Hotlink_Normal") text(NetAdapter.FriendlyName) 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(FriendlyName) onclick(dialog("NetworkEdit", p_data(NewZone), p_nets(ZoneAddresses)))))

[NewNetwork_Body_Actions]
@        = $AlertActions
Question = a(la) sz(a,a) mg(10,7,10,10) xy(,5) f("Header3Lite")
Trusted  = [AlertDialog_ActionButton] enable(1) v(#znTrusted)   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())
Public   = [AlertDialog_ActionButton] enable(1) v(#znUntrusted) onclick(Severity = ctl.value; close(#m_res_ok)) subst(Name() Descr())

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

[SnifferStatistic]
@  = [StyledWindowT] at(dragable,customfooter,resizable) sz(,$TopWindows_Min_Y,720,570) subst( Footer( [SnifferStatistic.Footer] ) BodyEx( [SnifferStatistic_Body] ) ) alias(task) ns(NetDetails) h(15605) onclose(state & #StateFlagOperational ? msg("CantCloseActiveNetStat", #m_warning) : checkPassword(#pwdc_StopTask, name))

[SnifferStatistic_Body]
@           = sz(p,p) a(lt) mg(7,7)
Filter      = [SnifferStatistic_Filter] xy(,7,,7)
Splitter    = [SnifferStatistic_Splitter]

[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]
@ = [StyledWindowT]  at(resizable,minimizable,dragable,a_close) sz(,$TopWindows_Min_Y,720,570) subst( BodyEx( [SystemMonitor_Body] )) h(14800)

[SystemMonitor_Body]
@      = sz(p,p)
Tab    = [SystemMonitor_Tab_Programs] a(lt)

[SystemMonitor_Tab_Programs]
$ListsCtrl = ctl.parent.List
$UpdateFilter	= if(!ctl.Filter.value, ($ListsCtrl.RunList.List.setfilter("", 100), $ListsCtrl.AllList.List.setfilter("", 100)), \
										($ListsCtrl.RunList.List.setfilter(f_FilterString(ctl.parent.Category.value), 100), $ListsCtrl.AllList.List.setfilter(f_FilterString(ctl.parent.Category.value), 100)))
@				= sz(p,p) mg(7,7) a(la) oninit(l_curlist = $ListsCtrl.RunList.List) alias(task) ns(Hips)
Category		= [SystemMonitor_Tab_Programs_Category] onchange(if(s_IsRunListCategory(ctl.value), l_curlist = $ListsCtrl.RunList.List, l_curlist = $ListsCtrl.AllList.List); l_curlist.setfilter(s_CategoryListFilter(ctl.value), s_FilterIndex("Category")))
Search			= [SystemMonitor_Search] subst( Filter(onchange($UpdateFilter)) )
List			= [SystemMonitor_Tab_Programs_Lists] xy(,7,,20)
Legend			= [AppRules_Body_Legend]

[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_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) sz(p,p) b(System) 
AllList     = [Programs_AllList_Body] a(lt) visible(s_IsAllListCategory(ctl.parent.Category.value))
RunList     = [Programs_RunList_Body] a(lt) visible(s_IsRunListCategory(ctl.parent.Category.value)) 

[Programs_AllList_Body]
@= a(la) sz(p,p)
List 		= [Programs_AllList] sz(p,p)  at(noborder)
Toolbar    	= [Grid.Toolbar.Template] a(lt) subst(Add(use(0)) Edit(use(0)) Delete(use(0)) Other([Programs_AllList_ActionsArea] xy(1) use(1)) ) b() 

[Programs_RunList_Body]
@ = a(la) sz(p,p)
List 		= [Programs_RunList] sz(p,p) at(noborder)
Toolbar    	= [Grid.Toolbar.Template] a(lt) subst(Add(use(0)) Edit(use(0)) Delete(use(0)) Other([Programs_RunList_ActionsArea] xy(1) use(1)) ) b() 

[Programs_AllList_ActionsArea]
@              	= sz(p,p)
SetRules    	= [Programs_AllList_ActionsArea_SetRules]
StateFilters 	= [Programs_AllList_StateFilters] a(rc) xy($TB_ShiftNext)
GroupFilter 	= [TB_Button_Menu] a(pc) t(v) onchange(ctl.AllList.List.setview(ctl.value)) onclick(ctl.menu("MainWindow.Hips_Filters2"))

[Programs_AllList_StateFilters]
$SeverityBtn 	= [TB_Button_ChkLike]
$SeverityChoose = ctl.AllList.List.setfilter("var p_StatusIcon; p_StatusIcon = f_AppStatusIcon(GroupInfo.GroupId, GroupInfo.IsCustomRules);" + \
                                              if(ctl.Other.value, "p_StatusIcon == \"Proc_status,0\" || p_StatusIcon == \"Proc_status,3\" || p_StatusIcon == \"Proc_status,4\"", "false") + " || " + \
                                              if(ctl.Norm.value,  "p_StatusIcon == \"Proc_status,1\"", "false") + " || " + \
                                              if(ctl.Hight.value, "p_StatusIcon == \"Proc_status,2\"", "false"), 200)
                                               
@       = a(rc) sz(a,a) oninit(ctl.Hight.value = true; ctl.Norm.value = true; ctl.Other.value = true)
Other   = $SeverityBtn a(lc) at(rememberdata) subst(Icon(a(lc) xy(10) i("Proc_status,0")) ) onchange($SeverityChoose) 
Norm    = $SeverityBtn a(ac) at(rememberdata) subst(Icon(a(lc) xy(10) i("Proc_status,1")) ) onchange($SeverityChoose) 
Hight  	= $SeverityBtn a(ac) at(rememberdata) subst(Icon(a(lc) xy(10) i("Proc_status,2")) ) onchange($SeverityChoose)

[Programs_RunList_ActionsArea]
$SetFilter  = ctl.RunList.List.setfilter(f_SetCategoryListFilter(!ctl.parent.StartRun.value, !ctl.parent.Avp.value, !ctl.parent.System.value), s_FilterIndex("StartRun"))
; ----
@           = a(lt) sz(p,p) rs(0,0)
; variables
StartRun    = $ValPrm at(rememberdata) onchange($SetFilter)
System      = $ValPrm at(rememberdata) onchange($SetFilter)
Avp         = $ValPrm at(rememberdata) onchange($SetFilter)
;
SetRules    = [Programs_AllList_ActionsArea_SetRules]
ViewType 	= [Programs_Lists_ActionsArea_View_Type] a(cc) 
menu        = [TB_Button_Menu] a(rc) onclick(ctl.menu("Programs_RunList_ActionsArea_Menu"))

[Programs_RunList_ActionsArea_Menu]
@           = at(chklike) sz(a,a)
mStartRun   = at(chklike) v(ctl.parent.StartRun.value)
mSystem     = at(chklike) v(ctl.parent.System.value)
mAvp        = at(chklike) v(ctl.parent.Avp.value)

[Programs_AllList_ActionsArea_SetRules]
@        = t(v) sz(a,a) a(lc) enable(depend(l_curlist.selcount()) == 1) 
Btn      = [TB_Button] subst(Icon(i(s_Ico(#ICO_PC_SETTING_16))) Cont(xy(,1,6)) ) onclick(dialog("AppRulesEdit:Image", p_image(l_curlist.seldata(true).Rating.ModuleInfo.sImagePath), p_appID(l_curlist.seldata().Id), p_pid(l_curlist.seldata(true).RunInfo.NativePid)))

[SystemMonitor_Tab_Programs_Category]
@           = $Combo dl(20) sz(220,a) a(at) 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_Lists_ActionsArea_View_Type]
@ =  at(enum) v(depend(l_curlist.isIndented("Program"), ctl.List))
; onchanging( if(ctl.value == 1, l_curlist.setIndented("Program"), NULL))
Table	= a(ac) v(0) sz(22,24) at(radiolike) bg(ctl.selected ? "Proc_viewtype,0" : "Proc_viewtype,2")
Tree	= a(ac) v(1) sz(22,24) at(radiolike) bg(ctl.selected ? "Proc_viewtype,3" : "Proc_viewtype,1")

[Programs_RunList]
$IsClosed = (RunInfo.dtExitTime > RunInfo.dtStartTime)
$displayName = (Id == #AppIdProduct ? $ProductName : f_AppNameEx(Rating.ModuleInfo))
$pathProc = "0 \\" + if(RunInfo.Parents.size(), RunInfo.Parents.format("f_AppNameEx(f_ProcessInfo(e).Module)", " \\ ")+ " \\ " , "")  + $displayName
@        = $ListToolbar alias(vector.RunPrograms) at(sorted,rememberdata,singlesel) v(Programs) filter(RunInfo.NativePid > 4)
Program  = [Programs_Program] text($displayName) i(s_AppIcon(Id)) sort(tolower($pathProc)) indent(RunInfo.Parents.size()) 
Status   =  [Programs_RunList_Status] i(f_AppStatusIconMerge(GroupInfo)) 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"))
Popularity = i(s_PopularityIcon(f_WoCUsersCount2Level(WoCInfo.UsersCount))) sort(WoCInfo.UsersCount) text("")
PID      = a(r) sz(100) text(RunInfo.NativePid) visible(0)
UserName = sz(150) text(RunInfo.sUserName) visible(0)
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   = i(f_AppStatusIconMerge(GroupInfo)) 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"))

[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]
$displayName = (Id == #AppIdProduct ? $ProductName : f_AppNameEx(Rating.ModuleInfo))
$parentage   = if(GroupInfo.Parents.size(), " (" + GroupInfo.Parents.format("objfile(f_AppInfo(e).sImagePath)", " > ") + " > " + objfile(Rating.ModuleInfo.sImagePath) + ")")
@ = $ListToolbar alias(vector.AllPrograms) at(sorted,rememberdata,singlesel) v(Applications) onshow(l_curlist.setview(AllItems.value))
Program = [Programs_Program] text($displayName + $parentage) i(s_AppIcon(Id)) sort(tolower($displayName)) group(Programs_AllList_Group, Rating.ModuleInfo.sVendor, default)
Status  = [Programs_AllList_Status] i(f_AppStatusIconMerge(GroupInfo)) 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"))
Popularity = i(s_PopularityIcon(f_WoCUsersCount2Level(WoCInfo.UsersCount))) sort(WoCInfo.UsersCount) text("")
;LastRun = [Programs_LastRun] a(r) text(s_date(dategroup(ExecuteInfo.nLastExecuteTime)))
row     = at(clickable) onrclick(if(Id,menu("Programs_AllList_Menu")))
views   = [Programs_AllList.Views]

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

[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, GroupInfo.ChainId))) 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   = i(f_AppStatusIconMerge(GroupInfo)) 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)
Category    = [SystemMonitor_Tab_OS_Category]
Search      = [SystemMonitor_Search] subst( Filter(onchange( ctl.parent.ResList.List.setfilter("wildcard(" + toExpr("*" + ctl.value + "*") + ", ctl.parent.ResList.List.rowdatatext(), 3)", 1))) )
ResList     = [HipsRules_Tab_Resources_ResList_Ex] a(la) xy(,7) 

[SystemMonitor_Tab_OS_Category]
@   = $Combo sz(200,20) a(at) 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.List.parentGroupId = l_group.Id; ctl.parent.ResList.List.parentGroupFlags = l_group.Flags)

[SystemMonitor_Tab_Exclusions]
@       = sz(p,p) b(System) oninit(l_ParentID = Resource.treeFind("Childs", "Name == \"KLResExludeList\"").Id)
List    = [SystemMonitor_Tab_Exclusions_List]
Toolbar = [Grid.Toolbar.Template] a(lt) b() t(listtoolbar) subst(Add(enable(!(parentGroupFlags & #rfDisableEdit)) onclick(add(if(menu("[Hips_ResListAddMenu] subst(WebService(use(0)) IpRange(use(0)) )"), (Flags = Flags | #rfCreateByUser; Id = getHipsNewResID(); ParentID = parentGroupId; l_serID = s_ResourceSerID(Flags & #rtMask); Data.serinit(l_serID); if(dialog("BrowseForNamedRes"), (ParentID = l_ParentID; true))))))) \
                                             Delete(enable(canDelete() && !(Flags & #rfDisableEdit) && (Id & #HIPS_RESID_FLAG_USER)) ) \
                                             Edit(enable(canEdit() && !(Flags & #rfDisableEdit) && (Id & #HIPS_RESID_FLAG_USER)) onclick(edit(dialog("BrowseForNamedRes")))) ) extprm(1)
                                             
[SystemMonitor_Tab_Exclusions_List]
@           = $List at(noborder) a(lt) xy(,$ListToolbarOffsetY) alias(vector.HipsResources) v($rfKLResExludeList.Childs) filter(Data) toolbar(ctl.Toolbar)
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)))

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

[NetworkMonitor]
@ = [StyledWindowT_Tab]  sz(,$TopWindows_Min_Y,720,570) at(resizable,minimizable,dragable,a_close) subst( BodyEx( [NetworkMonitor_Body] ))

[NetworkMonitor_Body]
@       = sz(p,p)
Tab    = [NetworkMonitor_Tab] a(lt)

[NetworkMonitor_Tab]
@           = $Tab
Conn        = [NetworkMonitor_Tab_Conn] mg(7,7) h(5428)
OpenedPorts = [NetworkMonitor_Tab_OpenedPorts] mg(7,7) h(26103)
Traffic     = [NetworkMonitor_Tab_Traffic] mg(7,7) h(5429)
Banned      = [NetworkMonitor_Tab_BannedHosts] mg(7,7) h(14831)

[NetworkMonitor_Tab_BannedHosts]
@           = a(la) sz(p,p) rs(100,100) 
List        = [NetworkMonitor_Tab_BannedHosts_ListArea]

[NetworkMonitor_Tab_BannedHosts_ListArea]
@        = b(System) sz(p,p) alias(taskview) ns(ids) a(la) sz(p,p) rs(100,100)
List     = [NetworkMonitor_Tab_BannedHosts_ListArea_List]
Toolbar  = [Grid.Toolbar.Template] a(lt) b() t(listtoolbar) subst(Add(use(0)) Edit(use(0)) Delete(use(0)) Other([NetworkMonitor_Tab_BannedHosts_ActionsArea] xy(1) use(1)) ) 

[NetworkMonitor_Tab_BannedHosts_ActionsArea]
@        = sz(p,p) rs(100,0)
Unban    = [TB_Button] subst(Icon(i("listctrls,2,2,2,2,2,2"))) enable(depend(ctl.List.selcount()) == 1) onclick(unbanHost(ctl.List.seldata()))

[NetworkMonitor_Tab_BannedHosts_ListArea_List]
@       = $ListToolbar alias(vector) v(BannedHosts) ext(1)
IP      = sz(a,a) text(ip(IP))
Time    = sz(a,a) text(datetime(Time))

[NetworkMonitor_Tab_Conn]
@        = sz(p,p) use(s_IsStateRunning(Hips.state)) alias(taskview) ns(Hips.FirewallSettings)
List      = [NetworkMonitor_Tab_Conn_Items] 
ChartArea = [NetworkMonitor_Tab_Conn_ChartArea] a(lb)

[NetworkMonitor_Tab_Conn_ChartArea]
@        = b1(System) mg(7,7) bg1("ColorWindow") rs(100,0) sz(p,150)
Chart    = [ProfileHome_Chart] subst(Name() Chart([MainWindow.SystemWatch_WorkArea_SysPerf_Chart] rs(100,0)) Legend([MainWindow.SystemWatch_WorkArea_SysPerf_Legend]) ) use(f_isInstalled("Firewall")) visible(!ctl.parent.Detected.visible || Gui.SystemWatchChartMode == 0)

[NetworkMonitor_Tab_Conn_Items]
@        = a(la) xy(,7,,160) sz(p,p) rs(100,0) b(System)
List     = [NetworkMonitor_Tab_Conn_List]
Toolbar  = [Grid.Toolbar.Template] a(lt) b() t(listtoolbar) subst(Add(use(0)) Edit(use(0)) Delete(use(0)) Other([NetworkMonitor_Tab_Conn_ToolBar] xy(1) use(1)) ) 

[NetworkMonitor_Tab_Conn_ToolBar]
$IsHipsBlock = (f_IsStateActive(Firewall.state) && Hips.FirewallSettings.WorkingMode == #fwBlockAll)
@            = a(lt) sz(p,p) rs(100,0)
All          = $ValPrm at(rememberdata) onchange(ctl.List.setfilter(ctl.value ? "" : "!f_IsModuleNameProduct(Image)"))
Rules        = [TB_Button_Menu] subst(AreaLeft(i(s_Ico(#ICO_PC_SETTING_16))))  onclick(ctl.menu("NetworkMonitor_Tab_Conn_ToolBar.Menu"))
BlockNet     = [TB_Button] subst(Icon(i(s_Ico(!$IsHipsBlock ? #ICO_NET_DENY_16 : #ICO_NET_ALLOW_16))) ) onclick( if(checkPassword(#pwdc_SaveSettings), Hips.FirewallSettings.WorkingMode = (Hips.FirewallSettings.WorkingMode == #fwBlockAll ? #fwAllow : #fwBlockAll)); savesettings()) enable(f_IsStateActive(Firewall.state))
Filter       = [TB_Button_Menu] subst(Icon()) a(rc) onclick(ctl.menu("NetworkMonitor_Tab_Conn_ToolBar_Filter.Menu"))

[NetworkMonitor_Tab_Conn_ToolBar_Filter.Menu]
@        = t(menu)
ShowAVP  = at(chklike) v(ctl.Toolbar.All.value)

[NetworkMonitor_Tab_Conn_ToolBar.Menu]
@        = t(menu)
AllRules = t(menuitem) onclick( windowDlg("HipsRules:Packets", p_fwTabs(true)) )
AppRules = t(menuitem) enable(ctl.parent.parent.List.seldata()) onclick(windowDlg("AppRulesEdit:Rules:Net", p_image(ctl.parent.parent.List.seldata().Image), p_appID(appIDFromAppPath(ctl.parent.parent.List.seldata().Image)) ) )

[NetworkMonitor_Tab_Conn_List]
@               = $ListToolbar at(sorted,rememberdata,noborder,singlesel) alias(vector.Connections) v(Connections)
App             = sz(120) i(getIconAsync(Image)) text(objfile(Image)) group(ImagePath,Image,default)
Proto           = [NetworkMonitor_Tab_Conn_List_Proto]
LocalAddress    = [NetworkMonitor_Tab_Conn_List_LocalAddress]
RemoteAddress   = [NetworkMonitor_Tab_Conn_List_RemoteAddress]
Duration        = sz(50) text(timestamp(ActiveTime))
Bytes           = [NetworkMonitor_Tab_Conn_List_Bytes]

[NetworkMonitor_Tab_Conn_List_Bytes]
@               = sz(160) text(f_ObjSize(InBytes)+"/"+f_ObjSize(OutBytes))
BytesRecieved   = sz(90) text(f_ObjSize(InBytes))
BytesSent       = sz(95) text(f_ObjSize(OutBytes))

[NetworkMonitor_Tab_Conn_List_RemoteAddress]
@               = sz(120) text(ip(RemoteIP)+if(RemotePort, ":"+RemotePort))
RemoteIP        = sz(120) text(ip(RemoteIP))
RemotePort      = sz(110) text(if(RemotePort, RemotePort))

[NetworkMonitor_Tab_Conn_List_LocalAddress]
@               = sz(120) text(ip(LocalIP)+if(LocalPort,":"+LocalPort))
LocalIP         = sz(120) text(ip(LocalIP))
LocalPort       = sz(110) text(LocalPort)

[NetworkMonitor_Tab_Conn_List_Proto]
$IconThread     = i( !Direction ? s_Ico(#ICO_NET_PINP_ALLOW) : s_Ico(#ICO_NET_POUT_ALLOW) )
; ----
@               = sz(130) $IconThread text(s_Protocols(Proto)+":"+s_NetDirection(Direction))
Proto			= sz(100) $IconThread text(s_Protocols(Proto))
Direction       = sz(70) text(s_NetDirection(Direction))

[Grid.Groups]
ImagePath            = [Grid.Group.Template] expand(1) i(getIconAsync(val)) text(s_AppName(moduleAppId(val))+"; "+$Connections)
ImagePathOpenedPorts = [Grid.Group.Template] expand(1) i(getIconAsync(val)) text(s_AppName(moduleAppId(val))+"; "+$OpenedPorts)

[NetworkMonitor_Tab_OpenedPorts]
@        = sz(p,p) use(s_IsStateRunning(Hips.state)) alias(taskview) ns(Hips.FirewallSettings)
List     = [NetworkMonitor_Tab_OpenedPorts_Items]

[NetworkMonitor_Tab_OpenedPorts_Items]
@        = a(la) xy(,7,,) sz(p,p) rs(100,0) b(System)
List     = [NetworkMonitor_Tab_OpenedPorts_List]
Toolbar  = [Grid.Toolbar.Template] a(lt) b() t(listtoolbar) subst(Add(use(0)) Edit(use(0)) Delete(use(0)) Other([NetworkMonitor_Tab_OpenedPorts_ToolBar] xy(1) use(1)) ) 

[NetworkMonitor_Tab_OpenedPorts_ToolBar]
@        = a(lt) sz(p,p) rs(100,0)
All      = $ValPrm at(rememberdata) oninit(ctl.value = 1) onchange(ctl.parent.List.setfilter(ctl.value ? "ip(LocalIP) != \"127.0.0.1\" && ip(LocalIP) != \"::1\"" : "")))
Rules    = [TB_Button_Menu] subst(AreaLeft(i(s_Ico(#ICO_PC_SETTING_16)))) onclick(ctl.menu("NetworkMonitor_Tab_Conn_ToolBar.Menu"))
Filter   = [TB_Button_Menu] a(rc) onclick(ctl.menu("NetworkMonitor_Tab_OpenedPorts_List_Filter.Menu"))

[NetworkMonitor_Tab_OpenedPorts_List_Filter.Menu]
@              = t(menu) at(enum) v(ctl.Toolbar.All.value)
All            = at(radiolike) v(0)
ExceptLoopback = at(radiolike) v(1)

[NetworkMonitor_Tab_OpenedPorts_List]
@               = $ListToolbar at(sorted,rememberdata,noborder,singlesel) alias(vector.Connections) v(OpenedPorts) filter(!f_IsModuleNameProduct(Image))
App             = sz(120) i(getIconAsync(Image)) text(objfile(Image)) group(ImagePathOpenedPorts,Image,default)
LocalPort       = sz(110) text(LocalPort)
LocalIP         = sz(120) text(ip(LocalIP))
Proto           = sz(100) text(s_Protocols(Proto))
Duration        = sz(50) text(timestamp(ActiveTime))

[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; l_Rule.serinit(#stHipsRuleItem); dialog("PacketRuleCreate", p_data(l_Rule), 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]
@    = [StyledWindowT_Small] at(dragable,resizable,a_ok,a_cancel) subst( BodyEx( [PDM2_Settings_Body] ) ) sz(550,298) alias(taskedit) h($IsKAV ? 14681 : 14681) btns(Ok(enable(Set.find("f_PDM2_IsSettingEnabledAndShown()"))))

[PDM2_Settings_Body]
@			= sz(p,p) a(lt)
ThreatList	= [PDM2_Settings_Body_ThreatList_Group]

[PDM2_Settings_Body_ThreatList_Group]
@ 			= sz(p,p) onshow(ctl.Rules.focus())
;!!!!Rules MUST BE BEFORE RuleDescr
Rules   	= [PdmSettings_Rules] 
RuleDescr	= t(richedit) at(readonly,nofocus,vscroll) sz(p,56) a(lb) alias(descriptor) dataowner(Rules) text($PDM2_RuleDescr)
RuleLabel   = sz(a,a) a(lp) xy(7,7)

[PdmSettings_Rules]
@   		= $List sz(p,125) 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]
@  = [StyledWindowT_Small] at(dragable,a_ok,a_cancel) subst( BodyEx( [PDM2_ThreatActionEdit.Dlg] ) ) sz(260,a) h(14700)

[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]
@  = [StyledWindowT_Small] at(dragable,a_ok,a_cancel) subst( BodyEx( [PDM2_RollbackActionEdit.Dlg] ) ) sz(260,a) h(14688)

[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]
@  = [StyledWindowT_Small] at(dragable,a_ok,a_cancel) subst( BodyEx( [PDM2_RootKitPeriodDlg] ) ) sz(320,a) h(14701)

[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]
@  = [StyledWindowT_Small_Tab] at(dragable,a_ok,a_cancel,resizable,nohelp,a_close) subst( BodyEx( [PDM2_AlertDetails_Body] ) ) sz(400,350) alias(alertinfodlg) text($PDM2_AlertDetails)

[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(0)
HostsNew     = [PDM2_AlertDetails_HostsNew]   mg(7,7) use(0)
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", 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)

[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]
@  = [StyledWindowT_Small_Tab] at(dragable,resizable,a_ok,a_cancel) subst( BodyEx( [SandBoxSettings_Tab] ) ) sz(380,342) alias(taskedit) ns(SandBox) text($SandBox)

[SandBoxSettings_Tab]
@       = $DlgBodyAttr $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]
@  = [StyledWindowT_Small_Tab] at(dragable,resizable,a_ok,a_cancel) subst( BodyEx( [SandBoxApps_Tab] ) ) sz(380,454)

[SandBoxApps_Tab]
@       = $DlgBodyAttr $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)) 
CleanOnInactive      = $Check xy(,7) v(bmask(Flags, 0x2))
DeleteOnInactive     = $Check xy(,7) v(bmask(Flags, 0x4)) 
EnableSharedFolder   = $Check xy(,7) v(bmask(Flags, 0x8)) onok(if(bmask(Flags, 0x8), SharedFolder = env("SandboxSharedFolder")))
EnableScm            = $Check xy(,7) v(bmask(Flags, 0x200)) 
EnableLocalCom       = $Check xy(20,7) v(bmask(Flags, 0x100))  enable(Flags & 0x200)
EnableFsRedirect     = $Check xy(,7) v(bmask(Flags, 0x400)) 
EnableRegRedirect    = $Check xy(,7) v(bmask(Flags, 0x800)) 
EnableRpcProxy       = $Check xy(,7) v(bmask(Flags, 0x1000)) 
DenyAccessProcessIn  = $Check xy(,7) v(bmask(Flags, 0x100000)) 
DenyAccessProcessOut = $Check xy(,7) v(bmask(Flags, 0x200000)) 
DenyAccPrivateData   = $Check xy(,7) v(bmask(Flags, 0x400000)) 
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]
@  = [StyledWindowT_Small] at(dragable,a_ok,a_cancel) subst( BodyEx( [SandBoxApps_Tab_General_ColorEdit.Dlg] ) ) sz(260,a)

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

[SandBoxApps_Tab_General_ColorEdit_Body]
@			= sz(p,a) a(la) xy(,7) 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))


[ProductSafeDesktopWindow]
@  = [StyledWindowT] at(dragable,a_close,nohelp,customfooter) subst( Footer( BtnsGroup( subst( Cancel( text("test") ) ) ) [DialogPanel] subst(Body( [ProductSafeDesktopWindow.Body_Check] ) ) xy1(3,3,3,3) extprm(1) ) BodyEx( [ProductSafeDesktopWindow.Body] ) ) sz(520,a) a(cc) round1(9,9) i("Main")

[ProductSafeDesktopWindow.Body]
@           = sz(p,a) bg("White") mg(20,20)
Caption     = [ProductSafeDesktopWindow_Caption]
Body        = [ProductSafeDesktopWindow.Func] xy(,25) a(la)

[ProductSafeDesktopWindow.Body_Check]
@ = $Check f("MainFtr") xy(8,) a(lc) use(1) v(userData("ProductSafeDesktopWindowNoShow"))

[ProductSafeDesktopWindow_Caption]
@           = sz(p,a)
General     = [ProductSafeDesktopWindow_Caption_General] xy(,,,4)
TaskSep     = $TaskSep_Temp
Description = a(la) f("Description")

[ProductSafeDesktopWindow_Caption_General]
@           = sz(p,a)
Icon        = a(lt) i("TaskSafeDesk48")
Caption     = a(as) sz(a,a) xy(8) f("Header6KGreen")

[ProductSafeDesktopWindow.Func]
@           = sz(p,a)
Caption     = a(la) f("Header2")
InfoIcon    = $ParamInfoIcon xy(4,2,,7) onclick(url($HelpURLSafeDesktopWindow))
Check_0     = a(la) [ItemT_BG] subst( Text() ) xy(,8)
Check_1     = a(la) [ItemT_BG] subst( Text() ) xy(,10)
Check_2     = a(la) [ItemT_BG] subst( Text() ) xy(,10)
Description = a(la) xy(,25)

[ItemT_BG]
@ = sz(p,a) ext(1)
Item = i("BulletOn") xy(,2)
Text = a(at) xy(8,) extprm(1)

[ItemT_BG_Fon]
@ = sz(10,10) bg("LegendGreen") ext(1)

[AskPrepareShutdownDesktopDialog]
@  = [StyledWindowT_Small] at(dragable,a_cancel) subst( BodyEx( [AskPrepareShutdownDesktopDialog_Actions] ) ) sz(420,a) h(27176)

[AskPrepareShutdownDesktopDialog_Actions]
@           = $DlgBodyAttr mg(10,10) sz(p,a)
Swap		= [WizardButton] xy(0,0,0,0) onclick(close(#m_res_swap)) subst(Name() Descr() ) a(la)
Shutdown    = [WizardButton] xy(0,0,0,0) onclick(close(#m_res_shutdown)) subst(Name() Descr() ) a(la)

[AskSandboxCloseAppDialog]
@  = [StyledWindowT_Small] at(dragable,a_ok,a_cancel,nohelp) subst( BodyEx( [SandboxCloseAppDialog_Actions] ) ) sz(380,a) h(15564) oninit(l_Time = 16) ontimer(1000, l_Time = l_Time-1; if(l_Time > 0, updatedata(), close(#m_res_ok)))

[SandboxCloseAppDialog_Actions]
@  = $DlgBodyAttr mg(10,10) sz(p,a)
TextDiscr
TimerVal = a(la)