[Templates]
$WeekPlanAttr = check(26,152,133),deny(229,229,229)
$Border_Sep_Grey = sz(p,1) a(la) bg("KtsTableSeparator") rs(0,0)
$Border_Sep_Blue = sz(p,1) a(la) bg("KtsTableSeparator_Blue") rs(0,0)
$ParCtlEx_ChartUsageElem = t(chartseries) mg(3) bg("ChartBg")
$ParCtlMainWindow_StatCol_Width = 250

$knopka = a(la) sz(a,a) xy(,24) at(clickable) i(depend(Enabled) ? s_Ico(#ICO_PCSW_ON) : s_Ico(#ICO_PCSW_OFF)) onclick((Enabled = !Enabled); sound("key2.wav"))
$knopka_text = a(as) xy(10,2)  f(depend(Enabled) ? "Header1KGreen" : "Header1Red")

; кнопки для ToolBar
$ToolbarBtn = a(ac) at(chklike) sz(22,22) mg(3,,,3) xy(1) bg(ctl.selected ? "ToolBarItemPressed" : (ctl.hotlight ? "ToolBarItemHilight" : ""))

[MainWindow_Body.ParCtl]
@        = $TaskTab ext(1) at(enum) alias(task) ns(ParCtl) ontimer(10000, if(repopulateSettingsUserAccounts(ser(users)), (ctl.UserList.reinit();ctl.updatedata()) )) h(25657)
Header   = a(lt) f("Header6KGreen") xy(-1) text($ParCtl)
InfoIcon = $TaskInfoIcon onclick(url($HelpURLSettingsParCtl))
TaskSep  = $TaskSep_Temp
Descr    = at(readonly,noborder,nofocus) f("Description") a(la) xy(,,,9)
UserList = [MainWindow_Body.ParCtl.UserList]
footer   = [MainWindow_Body.ParCtl.UserList.Footer] visible(ctl.parent.UserList.getTotalPages() > 1)

[MainWindow_Body.ParCtl.UserList.Footer]
@ = sz(a,15) a(cb)
Prev = a(lc) at(btnlike) i("ParCtlArrows,2") enable(ctl.parent.UserList.isPrevEnabled()) onclick(ctl.parent.UserList.doPrev())
Text = a(ac) xy(9,,10,) f("Header0Light")
Next = a(ac) at(btnlike) i("ParCtlArrows,0") enable(ctl.parent.UserList.isNextEnabled()) onclick(ctl.parent.UserList.doNext())

[MainWindow_Body.ParCtl.UserList]
@ = t(itemslist) a(la) v(users) id("UserId") sz(p,p) filter("UserId!=\".DEFAULT\"&&UserId!=\".CHILD\"&&UserId!=\".TEENAGER\"")
row = [MainWindow_Body.ParCtl.Users_List_Row]

[MainWindow_Body.ParCtl.Users_List_Row]
@            = a(la) sz(p,a) at(btnlike) mg(,10) bg(ctl.selected ? "HilightBtn_sel" : (ctl.hotlight ? "HilightBtn" : "")) ns(users.find("UserId=="+toExpr(ctl.id)).settings) \
               onclick( f_ParCtl_ShowWindow("Settings", ctl.id) )
Icon         = sz(a,a) xy(10) i(depend(users);s_ParCtlEx_UserAvatarId2Image(f_ParCtlEx_GetUserAvatar(ctl.parent.id)))
Cont         = [MainWindow_Body.ParCtl.Users_List_Row_Cont]
Check        = a(ls) sz(a,a) xy(375,) at(btnlike) i(depend(Enabled) ? s_Ico(#ICO_PCSW_ON) : s_Ico(#ICO_PCSW_OFF)) onclick((f_Check_ParctlFirstStartDialog(); Enabled = !Enabled); sound("key2.wav"))

[MainWindow_Body.ParCtl.Users_List_Row_Cont]
@            = a(as) sz(a,a) xy(15,10) oninit(ctl.setTimeRange(ctl.parent.id, 0, 0, 0)) alias(statex) prm("ParCtl:" + serid("ParentalControlCommonReportStatistics"))  ns(ctl.ser("ParentalControlCommonReportStatistics"))
Name         = sz(a,a) a(lt) f("Header3KGreenLite") text(depend(f_UserName(ctl.parent.parent.id)))
LastViolation= sz(a,a) a(la) xy(,9) t(richtext) f("KtsDescriptionDGrey")

;---------- ParCtlMainWindow ------------------

[ParCtlMainWindow]
$prmOnInit = oninit( if(!productData("DisableParctlNoPasswordDialog") && (!AskForParCtl || !EnablePswrdProtect),dialog("ParctlFirstStartDialog")) )
$prmFooter = [DialogPanel] sz(p,42) mg(6,,8) subst( Bckgnd(use(0)) ResizeBackground(use(0)) Sep(use(0)) Help(use(1)) )
@  = [StyledWindowT] at(dragable,a_close,minimizable,customfooter) alias(task) ns(ParCtl) subst( BodyEx( [ParCtlMainWindow_BodyEx] ) Footer( $prmFooter ) ) $prmOnInit


[ParCtlMainWindow_BodyEx]
Header    = [ParCtlMainWindow_Header]
Body      = [ParCtlMainWindow_Body]

[ParCtlMainWindow_Header]
@            = sz(p,54)
hdr          = [ProductHeader] sz(p,p) subst(Sep(use(0)) Bg(use(0)) _rs(use(0)) Logo(use(1) xy(5,21) bg("titledsc_parctl")) ) extprm(1)
AlphaWarning = sz(a,a) a(ct) f("Header0") use(!$IsRelease) text($AlphaWarning)

[ParCtlMainWindow_Body]
@         = sz(p,p) xy(,12,,$DialogPanelSizeY) alias(navigator2) pages(Area) a(lt) ontimer(10000, if(repopulateSettingsUserAccounts(ser(users)), updatedata()))
Navigator = [ParCtlMainWindow_Navigator]
Area      = [ParCtlMainWindow_Body_Area] a(at) sz(p,p) mg(15,15,15,15) bg("ColorWindow")
Top       = a(st) sz(p,5) bg("WizardTabTop")
Bottom    = a(sb) sz(p,5) bg("WizardTabBottom")

[ParCtlMainWindow_Navigator]
@         = sz(a,p) xy(12) order(0) at(enum)
Border    = a(rt) sz(5,p) xy(,5,,5) bg("WizardTabLeft")
Users     = [MainWindow_Navigator_Button] a(lt) xy(,63) subst(Icon(i("ParCtlTabUsers") xy(11,4,3)) Text() Desc())
Stat      = [MainWindow_Navigator_Button] subst(Icon(i("ParCtlTabStat") xy(11,4,3)) Text() Desc())
Topleft    = a(rt) sz(5,5) bg("WizardTabTL")
BottomLeft = a(rb) sz(5,5) bg("WizardTabBL")

[ParCtlMainWindow_Body_Area]
$AreaItem = sz(p,p) mg(,0)
Stat      = [ParCtlMainWindow_Body_Area_Stat] $AreaItem
Users     = [ParCtlMainWindow_Body_Area_Users] $AreaItem

[ParCtlMainWindow_Body_Area_Stat]
Header         = [InfoLink] subst(Text(f("Header4Lite")) Icon(onclick(url($ParentalControlURL)))) xy(-1) extprm(1)
Descr          = f("KtsDescriptionGrey") a(la) extprm(1)
User           = [ParCtlMainWindow_Body_Area_Stat_User] xy(,15) a(la)
PeriodSwitch   = [MainThreats_Tab_Statistics_Line] a(la) xy(,20) subst(IsChange(+onchange(ctl.parent.Body.setTimeRange(ctl.parent.User.Id.value, ctl.PeriodBegin.value, ctl.PeriodEnd.value, f_ParCtlEx_GetStatRangePeriod(ctl.PeriodType.value)))) ) use(1)
Body           = [ParCtlMainWindow_Body_Area_Stat_Body] a(la) xy(,10)

[ParCtlMainWindow_Body_Area_Stat_User]
@              = sz(p,a) a(la)
Avatar         = i(s_ParCtlEx_UserAvatarId2Image(f_ParCtlEx_GetUserAvatar(ctl.Id.value))) sz(a,a)
Id             = t(combo) a(lt) xy(70) at(sorted) f("Header0") sz(240,a) items(vector(users) v(UserId) text(if(UserId!=".DEFAULT"&&UserId!=".CHILD"&&UserId!=".TEENAGER", f_UserName(UserId)))) onchange(ctl.PeriodSwitch.PeriodBegin.setchanged())
Descr          = [ValueA] a(la) xy(70,5) subst(Name(f("KtsDescriptionDGrey")) Val(f("KtsHeader0") text(s_ParCtlEx_User_Enabled(users.ser().findSettingsUserAccount(ctl.Id.value).settings.Enabled))) )
FullReport     = $LinkKL a(sb) text($LinkFullReport) onclick(window("ParCtlUserReport", p_User(ctl.Id.value)))

[ParCtlMainWindow_Body_Area_Stat_Body]
@              = sz(p,a) at(enum, rememberdata) alias(statex) prm("ParCtl:" + serid("InternetUsageControlReportStatistics"), serid("WebSiteControlReportStatistics"), serid("FileDownloadControlReportStatistics"), serid("InstantMessangerControlReportStatistics"), serid("ComputerControlReportStatistics"), serid("AppControlReportStatistics"))
Internet       = [ParCtlUserReport_MainStat_ItemT] subst(Name(i("ParCtlExAll16,0")) Body([ParCtlMainWindow_Body_Area_Stat_Body_Internet])      Body2([ParCtlMainWindow_Body_Area_Stat_Body_InternetSel])      BodyEx([ParCtlMainWindow_Body_Area_Stat_Body_InternetEx]) )
Communication  = [ParCtlUserReport_MainStat_ItemT] subst(Name(i("ParCtlExAll16,1")) Body([ParCtlMainWindow_Body_Area_Stat_Body_Communication]) Body2([ParCtlMainWindow_Body_Area_Stat_Body_CommunicationSel]) BodyEx([ParCtlMainWindow_Body_Area_Stat_Body_CommunicationEx]) )
Computer       = [ParCtlUserReport_MainStat_ItemT] subst(Name(i("ParCtlExAll16,2")) Body([ParCtlMainWindow_Body_Area_Stat_Body_Computer] visible(1)) Body2(use(0))                                            BodyEx([ParCtlMainWindow_Body_Area_Stat_Body_ComputerEx]) )

[ParCtlMainWindow_Body_Area_Stat_Body_Internet]
Col1 = [ParCtlMainWindow_Body_Area_Stat_Body_Internet_Col1] a(lt) sz(p,a) rs(50,0)
Col2 = [ParCtlMainWindow_Body_Area_Stat_Body_Internet_Col2] a(at) sz(p,a) xy(14)

[ParCtlMainWindow_Body_Area_Stat_Body_InternetSel]
Col1 = [ParCtlMainWindow_Body_Area_Stat_Body_Internet_Col1] a(lt) sz(p,a) rs(50,0) subst(DomainsBlocked(use(0)))

[ParCtlMainWindow_Body_Area_Stat_Body_Internet_Col1]
@              = ext(1)
Duration       = [ValueA] a(la) subst(Name(f("KtsDescriptionDGrey")) Val(f("KtsHeader0") text(timestamp(ctl.ser("InternetUsageControlReportStatistics").TotalTime))) ) xy(,,,6)
DomainsBlocked = [ValueA] a(la) subst(Name(f("KtsDescriptionDGrey")) Val(f("KtsHeader0") text(ctl.ser("WebSiteControlReportStatistics").CriticalCount)) ) extprm(1)

[ParCtlMainWindow_Body_Area_Stat_Body_Internet_Col2]
@            = ext(1)
Dummy        = [ValueA] xy(,,,6) extprm(1)
FilesBlocked = [ValueA] a(la) subst(Name(f("KtsDescriptionDGrey")) Val(f("KtsHeader0") text(ctl.ser("FileDownloadControlReportStatistics").CriticalCount)) )

[ParCtlMainWindow_Body_Area_Stat_Body_InternetEx]
Col1     = [ParCtlMainWindow_Body_Area_Stat_Body_InternetEx_Col1] a(la) sz(p,a) rs(50,0)
Col2     = [ParCtlMainWindow_Body_Area_Stat_Body_InternetEx_Col2] a(as) sz(p,a) xy(14)

[ParCtlMainWindow_Body_Area_Stat_Body_InternetEx_Col1]
@        = ns(ctl.ser("WebSiteControlReportStatistics"))
Total    = [Value] a(la) subst(Name(f("KtsDescriptionDGrey")) Val(f("KtsHeader0") text(Count)) )
Sep      = a(la) sz(p,2) bg("ParctlSeparator") xy(,7,,7)
Top1     = [Value] a(la) subst(Name(sz(190,a) at(singleline) f("KtsDescriptionDGrey") text("1. " + Domains[0].Domain)) Val(f("KtsDescriptionDGrey") text(Domains[0].Count)) ) visible(Domains.size() >= 1)
Top2     = [Value] a(la) subst(Name(sz(190,a) at(singleline) f("KtsDescriptionDGrey") text("2. " + Domains[1].Domain)) Val(f("KtsDescriptionDGrey") text(Domains[1].Count)) ) visible(Domains.size() >= 2)
Top3     = [Value] a(la) subst(Name(sz(190,a) at(singleline) f("KtsDescriptionDGrey") text("3. " + Domains[2].Domain)) Val(f("KtsDescriptionDGrey") text(Domains[2].Count)) ) visible(Domains.size() >= 3)
Sep2     = a(la) sz(0,4)
Other    = [Value] a(la) subst(Name(f("KtsDescriptionDGrey")) Val(f("KtsDescriptionDGrey") text(Count-Domains[0].Count-Domains[1].Count-Domains[2].Count)) ) visible(Domains.size() >= 4)
Blocked  = [Value] a(la) subst(Name(f("KtsDescriptionDGrey")) Val(f("KtsDescriptionDGrey") text(CriticalCount)) )

[ParCtlMainWindow_Body_Area_Stat_Body_InternetEx_Col2]
@       = ns(ctl.ser("FileDownloadControlReportStatistics"))
Total   = [Value] a(la) subst(Name(f("KtsDescriptionDGrey")) Val(f("KtsHeader0") text(Count)) )
Sep     = a(la) sz(p,2) bg("ParctlSeparator") xy(,7,,7)
Top1    = [Value] a(la) subst(Name(sz(190,a) at(singleline) f("KtsDescriptionDGrey") text("1. " + Domains[0].Domain)) Val(f("KtsDescriptionDGrey") text(Domains[0].Count)) ) visible(Domains.size() >= 1)
Top2    = [Value] a(la) subst(Name(sz(190,a) at(singleline) f("KtsDescriptionDGrey") text("2. " + Domains[1].Domain)) Val(f("KtsDescriptionDGrey") text(Domains[1].Count)) ) visible(Domains.size() >= 2)
Top3    = [Value] a(la) subst(Name(sz(190,a) at(singleline) f("KtsDescriptionDGrey") text("3. " + Domains[2].Domain)) Val(f("KtsDescriptionDGrey") text(Domains[2].Count)) ) visible(Domains.size() >= 3)
Sep2    = a(la) sz(0,4)
Other   = [Value] a(la) subst(Name(f("KtsDescriptionDGrey")) Val(f("KtsDescriptionDGrey") text(Count-Domains[0].Count-Domains[1].Count-Domains[2].Count)) ) visible(Domains.size() >= 4)
Blocked = [Value] a(la) subst(Name(f("KtsDescriptionDGrey")) Val(f("KtsDescriptionDGrey") text(CriticalCount)) )

[ParCtlMainWindow_Body_Area_Stat_Body_Communication]
@      = ns(ctl.ser("InstantMessangerControlReportStatistics"))
Col1   = [ParCtlMainWindow_Body_Area_Stat_Body_Communication_Col1] a(lt) sz(p,a) rs(50,0)
Col2   = [ParCtlMainWindow_Body_Area_Stat_Body_Communication_Col2] a(at) sz(p,a) xy(14)

[ParCtlMainWindow_Body_Area_Stat_Body_CommunicationSel]
@      = ns(ctl.ser("InstantMessangerControlReportStatistics"))
Col1   = [ParCtlMainWindow_Body_Area_Stat_Body_Communication_Col1] a(lt) sz(p,a) rs(50,0) subst(MsgBlocked(use(0)))
Col2   = [ParCtlMainWindow_Body_Area_Stat_Body_Communication_Col2] a(at) sz(p,a) xy(14)

[ParCtlMainWindow_Body_Area_Stat_Body_Communication_Col1]
@          = ext(1)
PersInfo   = [ValueA] a(la) subst(Name(f("KtsDescriptionDGrey")) Val(f("KtsHeader0") text(PersonalInfo)) ) xy(,,,6)
MsgBlocked = [ValueA] a(la) subst(Name(f("KtsDescriptionDGrey")) Val(f("KtsHeader0") text(Critical)) ) extprm(1)

[ParCtlMainWindow_Body_Area_Stat_Body_Communication_Col2]
Keywords = [ValueA] a(la) subst(Name(f("KtsDescriptionDGrey")) Val(f("KtsHeader0") text(Keywords)) )

[ParCtlMainWindow_Body_Area_Stat_Body_CommunicationEx]
@      = ns(ctl.ser("InstantMessangerControlReportStatistics"))
Col1   = [ParCtlMainWindow_Body_Area_Stat_Body_CommunicationEx_Col1] a(lt) sz(p,a) rs(50,0)

[ParCtlMainWindow_Body_Area_Stat_Body_CommunicationEx_Col1]
Total   = [Value] a(la) subst(Name(f("KtsDescriptionDGrey")) Val(f("KtsHeader0") text(Count)) )
Sep     = a(la) sz(p,2) bg("ParctlSeparator") xy(,7,,7)
Top1    = [Value] a(la) subst(Name(sz(190,a) at(singleline) f("KtsDescriptionDGrey") text("1. " + f_ParCtlEx_GetIMContactName(UserName, Contacts[0].ContactId))) Val(f("KtsDescriptionDGrey") text(Contacts[0].MsgCount)) ) visible(Contacts.size() >= 1)
Top2    = [Value] a(la) subst(Name(sz(190,a) at(singleline) f("KtsDescriptionDGrey") text("2. " + f_ParCtlEx_GetIMContactName(UserName, Contacts[1].ContactId))) Val(f("KtsDescriptionDGrey") text(Contacts[1].MsgCount)) ) visible(Contacts.size() >= 2)
Top3    = [Value] a(la) subst(Name(sz(190,a) at(singleline) f("KtsDescriptionDGrey") text("3. " + f_ParCtlEx_GetIMContactName(UserName, Contacts[2].ContactId))) Val(f("KtsDescriptionDGrey") text(Contacts[2].MsgCount)) ) visible(Contacts.size() >= 3)
Sep2    = a(la) sz(0,4)
Other   = [Value] a(la) subst(Name(f("KtsDescriptionDGrey")) Val(f("KtsDescriptionDGrey") text(Count-Contacts[0].MsgCount-Contacts[1].MsgCount-Contacts[2].MsgCount)) ) visible(Contacts.size() >= 4)
Blocked = [Value] a(la) subst(Name(f("KtsDescriptionDGrey")) Val(f("KtsDescriptionDGrey") text(Critical)) )

[ParCtlMainWindow_Body_Area_Stat_Body_Computer]
Col1 = [ParCtlMainWindow_Body_Area_Stat_Body_Computer_Col1] a(lt) sz(p,a) rs(50,0)
Col2 = [ParCtlMainWindow_Body_Area_Stat_Body_Computer_Col2] a(at) sz(p,a) xy(14)

[ParCtlMainWindow_Body_Area_Stat_Body_Computer_Col1]
Duration = [ValueA] a(la) subst(Name(f("KtsDescriptionDGrey")) Val(f("KtsHeader0") text(timestamp(ctl.ser("ComputerControlReportStatistics").TotalTime))) ) xy(,,,6)

[ParCtlMainWindow_Body_Area_Stat_Body_Computer_Col2]
AppBlocked  = [ValueA] a(la) subst(Name(f("KtsDescriptionDGrey")) Val(f("KtsHeader0") text(ctl.ser("AppControlReportStatistics").CriticalCount)) ) xy(,,,6)

[ParCtlMainWindow_Body_Area_Stat_Body_ComputerEx]
@    = ns(ctl.ser("AppControlReportStatistics"))
Col1 = [ParCtlMainWindow_Body_Area_Stat_Body_ComputerEx_Col1] a(lt) sz(p,a) rs(50,0)
Col2 = [ParCtlMainWindow_Body_Area_Stat_Body_ComputerEx_Col2] a(at) sz(p,a) xy(14)

[ParCtlMainWindow_Body_Area_Stat_Body_ComputerEx_Col1]
Total  = [Value] a(la) subst(Name(f("KtsDescriptionDGrey")) Val(f("KtsDescriptionDGrey")) )
Sep    = a(la) sz(p,2) bg("ParctlSeparator") xy(,7,,7)
Top1   = [Value] a(la) subst(Name(sz(190,a) at(singleline) f("KtsDescriptionDGrey") text("1. " + f_ParCtlEx_GetAUAppName(UserName, Apps[0].AppID))) Val(f("KtsDescriptionDGrey") text(timestamp(Apps[0].Duration)))) visible(Apps.size() >= 1)
Top2   = [Value] a(la) subst(Name(sz(190,a) at(singleline) f("KtsDescriptionDGrey") text("2. " + f_ParCtlEx_GetAUAppName(UserName, Apps[1].AppID))) Val(f("KtsDescriptionDGrey") text(timestamp(Apps[1].Duration)))) visible(Apps.size() >= 2)
Top3   = [Value] a(la) subst(Name(sz(190,a) at(singleline) f("KtsDescriptionDGrey") text("3. " + f_ParCtlEx_GetAUAppName(UserName, Apps[2].AppID))) Val(f("KtsDescriptionDGrey") text(timestamp(Apps[2].Duration)))) visible(Apps.size() >= 3)
Sep2   = a(la) sz(0,4)
Other  = [Value] a(la) subst(Name(f("KtsDescriptionDGrey")) Val(f("KtsDescriptionDGrey") text(timestamp(Duration-Apps[0].Duration-Apps[1].Duration-Apps[2].Duration))) ) visible(Apps.size() >= 4)

[ParCtlMainWindow_Body_Area_Stat_Body_ComputerEx_Col2]

[ParCtlMainWindow_Body_Area_Users]
@              = ext(1) h(25657) onshow(ctl.UsersList.List.focus())
Header         = [InfoLink] subst(Text(f("Header4Lite")) Icon(onclick(url($ParentalControlSettingsHelpURL)))) xy(-1) extprm(1)
Descr          = f("KtsDescriptionGrey") a(la) extprm(1)
ParCtlStateDesc = f("KtsHeader1Lite") a(la) xy(,20)
ParCtlState     = a(as) xy(2) f(state == #StateRunning ? "KtsHeader1Green" : "KtsHeader1Red") text(s_ParCtlEx_Enabled(state == #StateRunning))
ParCtlPausePlay = t(hotlink) sz(a,30) xy(-5,3) mg(6) f("Header3KGreenLite") i(state == #StateRunning?"ParCtlOptionsIcon,4" : "ParCtlOptionsIcon,6") a(la) bg(ctl.hotlight ? "HilightBtn" : "") onclick(if(state == #StateRunning,if(checkPassword(#pwdc_OpenParctl),setstate(#TASK_REQUEST_PAUSE, name)),setstate(#TASK_REQUEST_RUN, name)))
ParCtlStop      = t(hotlink) sz(a,30) mg(6) f("Header3KGreenLite") i(ctl.enabled ? "ParCtlOptionsIcon,2" : "ParCtlOptionsIcon,3") a(as) enable(state == #StateRunning) bg(ctl.hotlight ? "HilightBtn" : "") onclick(if(state == #StateRunning,if(checkPassword(#pwdc_OpenParctl),(setstate(#TASK_REQUEST_STOP, name))))))
ToolBar         = [ParCtlMainWindow_Body_Area_Users_ListArea_Toolbar] a(la) xy(,7)
UsersList       = [ParCtlMainWindow_Body_Area_Users_ListArea] a(la) xy(,-1)

[ParCtlMainWindow_Body_Area_Users_ListArea_Toolbar]
$FindUser = users.find("UserId=="+toExpr(ctl.UsersList.List.seldata().UserId)).settings
@      = a(la) sz(p,a) enable(state == #StateRunning)
Left   = a(lt) sz(a,a) bg("ToolbarGreenLeft")
Right  = a(rt) sz(a,a) bg("ToolbarGreenRight")
Middle = a(lt) sz(p,a) xy(5,,5) bg("ToolbarGreenMiddle")
UserPlayStop = [ParCtlMainWindow.Label] a(lt) xy(8,3) subst(Icon(i(   var pSett; pSett = $FindUser; (pSett.Enabled ? "ParCtlOptionsIcon,2" : "ParCtlOptionsIcon,6") )) Label(text(var pSett; pSett = $FindUser; s_ParCtlEx_Set_Enable(pSett.Enabled))) ) onclick(var pSett; pSett = $FindUser; pSett.Enabled = !pSett.Enabled; true) enable(ctl.UsersList.List.seldata())
UserSetup    = [ParCtlMainWindow.Label] a(as) mg(2,0,0,0) subst(Icon(i( s_Ico(#ICO_PC_SETTING_16) )) Label(text()) ) onclick(ctl.UsersList.List.edit(dialog("ParCtlUserSettings"))) enable(ctl.UsersList.List.seldata())
UserReport   = [ParCtlMainWindow.Label] a(as) mg(0,0,30,0) subst(Icon(i("report16")) Label(text()) ) onclick(window("ParCtlUserReport", $ModalIfRemote, p_User(ctl.UsersList.List.seldata().UserId))) enable(ctl.UsersList.List.seldata()) 
;; dialog development link UserReport2  = [ParCtlMainWindow.Label] subst(Icon(i("ParCtlExAll16,6")) Label(text()) ) xy(7) a(as) onclick(window("BrowseInstalledSoftwareDialog", p_User(ctl.UsersList.List.seldata().UserId)))

[ParCtlMainWindow_Body_Area_Users_ListArea]
@    = sz(p,p) enable(ctl.ToolBar.enabled)
List = [ParCtlMainWindow_Body_Area_Users_List]

[ParCtlMainWindow_Body_Area_Users_List]
@       = $List alias(vector) v(users) filter(UserId!=".DEFAULT"&&UserId!=".CHILD"&&UserId!=".TEENAGER") at(noheader,singlesel,nosearch) onshow(if(!ctl.selcount(),ctl.focus())) onfocus(l_CurrentUserId=UserId)
fakeRow = text(toupper(f_UserName(UserId))) sort(,sortup)
row     = [ParCtlMainWindow_Body_Area_Users_List_Row]

[ParCtlMainWindow_Body_Area_Users_List_Row]
@            = sz(p,a) at(custom) mg(,10) bg(ctl.enabled && ctl.selected ? "SelectedListItem" : "White")
Icon         = sz(a,a) xy(10) i(s_ParCtlEx_UserAvatarId2Image(f_ParCtlEx_GetUserAvatar(UserId)))
Name         = sz(a,a) a(as) xy(15,10) i(s_ParCtlEx_ComponentEnabled_Icon(settings.Enabled)) f("Header3KGreenLite") text(f_UserName(UserId))
UserControl  = sz(a,a) a(sa) xy(,4) f("KtsDescriptionDGrey") 
ControlState = sz(a,a) a(as) f(settings.Enabled? "KtsHeader0Green":"KtsHeader0Red") text(s_ParCtlEx_User_Enabled(settings.Enabled))
;MinVSize    = sz(1,36) a(la) visible(ctl.parent.selected)

;---------- ParCtlUserSettings ------------------

;__DELETE__ - [ParCtlUserSettings] подлежит уничтожению
[ParCtlUserSettings]
@  = [StyledWindowT] at(dragable,a_ok,a_cancel) subst( BodyEx( [ParCtlUserSettings_BodyEx] ) ) sz(800,a) alias(settings) bg(isOsGuiThemed ? "ColorWindow" : "ColorWindowClassic")

[ParCtlUserSettings_BodyEx]
Header      = sz(p,54)
Body        = [ParCtlUserSettings_Body] ns(settings)
Export      = t(hotlink) a(rt) xy(15,20)  f("Header0") i("ParCtlExAll16,24") onclick(if(browsefilesave(l_SaveFilePath, $BrowseForConfig, "pctl"), (f_IfErrThenMsg(cfgParCtrlSave(l_SaveFilePath, UserId, ser(UserId)), "SettingsOperationError");true)))
Import      = t(hotlink) a(ps) xy(10)     f("Header0") i("ParCtlExAll16,23") onclick(if(dialog("ImportUserSettingsDialog"),true))
;;DebugWin1     = t(hotlink) a(as) xy(20)     f("Header0White") i("ParCtlExAll16,24") onclick(dialog("ParCtlEx_InternetTerminateTimeoutWindow"))
;;DebugWin1     = t(hotlink) a(lt) xy(480,40) f("Header0White") i("ParCtlExAll16,23") onclick(dialog("ParCtlEx_AppTerminateTimeoutWindow"))
;;DebugWin2     = t(hotlink) a(as) xy(20)     f("Header0White") i("ParCtlExAll16,24") onclick(dialog("ParCtlEx_ComputerTerminateTimeoutWindow"))

[ParCtlUserSettings_Body]
@           = $DlgBodyAttr sz(p,a) a(la) alias(navigator2) pages(WorkArea)
Navigator   = [ParCtlUserSettings_Navigator]
SepVert     = sz(1,p) a(as) b(Group) rs(0,0)
WorkArea    = [ParCtlUserSettings_Navigator_WorkArea] a(at) mg(12,7)

[ParCtlUserSettings_Navigator]
$GroupHdr = f("Header0") sz(a,a) xy(,13,,7) a(la)
@                = onshow(ctl.top.Body.BodyEx.Body.WorkArea.Settings.Navigator.value = ctl.top.Body.ctlFind("BodyEx.Bdy.WorkArea.Report.Navigator").value,"from report") at(enum) sz(220,p) mg(7,7) rs(0,100) bg((isOsGuiThemed || true) ? "TopNavigator" : "ColorWindow")
AddView          = [ParCtl_Navigator_Item] subst(Icon(i(s_ParCtlEx_ComponentEnabled_Icon(Enabled))) ) xy(,85)

ComputerUsage    = [ParCtl_Navigator_Item] subst(Icon(i(s_ParCtlEx_ComponentEnabled_Icon(ComputerControl.Enabled))) ) xy(,8)
AppUsage         = [ParCtl_Navigator_Item] subst(Icon(i(s_ParCtlEx_ComponentEnabled_Icon(AppControl.Enabled))) )

InternetUsage    = [ParCtl_Navigator_Item] subst(Icon(i(s_ParCtlEx_ComponentEnabled_Icon(InternetControl.Enabled))) ) xy(,8)
WebContent       = [ParCtl_Navigator_Item] subst(Icon(i(s_ParCtlEx_ComponentEnabled_Icon(WebControl.Enabled))) )
Download         = [ParCtl_Navigator_Item] subst(Icon(i(s_ParCtlEx_ComponentEnabled_Icon(FileDownloadControl.Enabled))) )

IM_Usage         = [ParCtl_Navigator_Item] subst(Icon(i(s_ParCtlEx_ComponentEnabled_Icon(IMControl.Enabled))) ) xy(,8)
SN_Usage         = [ParCtl_Navigator_Item] subst(Icon(i(s_ParCtlEx_ComponentEnabled_Icon(SNControl.Enabled))) )
PersonalInfo     = [ParCtl_Navigator_Item] subst(Icon(i(s_ParCtlEx_ComponentEnabled_Icon(PersonalInfo.Enabled))) )
Keywords         = [ParCtl_Navigator_Item] subst(Icon(i(s_ParCtlEx_ComponentEnabled_Icon(Keywords.Enabled))) )

[ParCtlUserSettings_Navigator_WorkArea]
@             = sz(p,470) rs(100,100)
InternetUsage = [ParCtlUserSettings_Navigator_WorkArea_InternetUsage] sz(p,p)
WebContent    = [ParCtlUserSettings_Navigator_WorkArea_WebContent] sz(p,p)
Download      = [ParCtlUserSettings_Navigator_WorkArea_Download] sz(p,p)
SafeSearch    = [ParCtlUserSettings_Navigator_WorkArea_SafeSearch] sz(p,p)
IM_Usage      = [ParCtlUserSettings_Navigator_WorkArea_IM_Usage] sz(p,p)
SN_Usage      = [ParCtlUserSettings_Navigator_WorkArea_SN_Usage] sz(p,p)
PersonalInfo  = [ParCtlUserSettings_Navigator_WorkArea_PersonalInfo] sz(p,p)
Keywords      = [ParCtlUserSettings_Navigator_WorkArea_Keywords] sz(p,p)
ComputerUsage = [ParCtlUserSettings_Navigator_WorkArea_ComputerUsage] sz(p,p)
AppUsage      = [ParCtlUserSettings_Navigator_WorkArea_AppUsage] sz(p,p)
AddView       = [ParCtlUserSettings_Navigator_WorkArea_AddView] sz(p,p)

;---------- ParCtlUserReport ------------------

[ParCtlUserReport]
@  = [StyledWindowT] at(dragable,resizable,minimizable,a_close) subst( BodyEx( [ParCtlUserReport_BodyEx] ) ) alias(task) ns(ParCtl) sz($TopWindows_Min_X,$TopWindows_Min_Y,800,556)

[ParCtlUserReport_BodyEx]
Header      = [ProductHeader_Ex] sz(p,54)
Body        = [ParCtlUserReport_Body]

[ProductHeader_Ex]
@           = sz(p,54) rs(0,0)
hdr         = [ProductHeader] sz(p,54)  extprm(1)
Descr       = a(lc) sz(a,a) xy(220,0) f("SettingsDescr") at(singleline)

[ParCtlUserReport_Body]
@           = $DlgBodyAttr a(la) alias(navigator2) pages(WorkArea)
Navigator   = [ParCtlUserReport_Navigator]
SepVert     = sz(1,p) a(as) b(Group) rs(0,0)
WorkArea    = sz(p,p) rs(100,100) a(at) mg(12,7,12,12)

[ParCtlUserReport_Navigator]
$GroupHdr = f("Header0") sz(a,a) xy(,13,,5) a(la)
@              = onshow(ctl.top.WorkArea.Report.Navigator.value = ctl.top.WorkArea.Settings.Navigator.value) at(enum) sz(220,p) mg(7,7) rs(0,100) ns(users.find("UserId == " + toExpr(p_User)).settings) bg((isOsGuiThemed || true) ? "TopNavigator" : "ColorWindow")
AddView        = [ParCtl_Navigator_Item] subst(Icon(i(s_ParCtlEx_ComponentEnabled_Icon(Enabled))) ) xy(,85)
ComputerUsage  = [ParCtl_Navigator_Item] subst(Icon(i(s_ParCtlEx_ComponentEnabled_Icon(ComputerControl.Enabled))) ) xy(,8)
AppUsage       = [ParCtl_Navigator_Item] subst(Icon(i(s_ParCtlEx_ComponentEnabled_Icon(AppControl.Enabled))) )
InternetUsage  = [ParCtl_Navigator_Item] subst(Icon(i(s_ParCtlEx_ComponentEnabled_Icon(InternetControl.Enabled))) ) xy(,8)
WebContent     = [ParCtl_Navigator_Item] subst(Icon(i(s_ParCtlEx_ComponentEnabled_Icon(WebControl.Enabled))) )
Download       = [ParCtl_Navigator_Item] subst(Icon(i(s_ParCtlEx_ComponentEnabled_Icon(FileDownloadControl.Enabled))) )
IM_Usage       = [ParCtl_Navigator_Item] subst(Icon(i(s_ParCtlEx_ComponentEnabled_Icon(IMControl.Enabled))) ) xy(,8)
SN_Usage       = [ParCtl_Navigator_Item] subst(Icon(i(s_ParCtlEx_ComponentEnabled_Icon(SNControl.Enabled))) )
PersonalInfo   = [ParCtl_Navigator_Item] subst(Icon(i(s_ParCtlEx_ComponentEnabled_Icon(PersonalInfo.Enabled))) )
Keywords       = [ParCtl_Navigator_Item] subst(Icon(i(s_ParCtlEx_ComponentEnabled_Icon(Keywords.Enabled))) )

;---------- ParCtl_Navigator_Item ------------------

[ParCtl_Navigator_Item]
@    = ext(1) a(la) xy(0,0,0,0) sz(p,23) at(radiolike) at(noowncontent) rs(0,0) bg(ctl.selected ? "GreenSel" : (ctl.hotlight? "GreenHotlight":"") )  
Icon = sz(16,16) a(lc) xy(8,,,) extprm(1)
Sel  = [ParCtl_Navigator_Item_Sel] a(a) extprm(1)

[ParCtl_Navigator_Item_Sel]
@    = ext(1) mg(4,5) a(lc) sz(p,a)
Text = text(ctl.parent.parent.text) f(ctl.parent.parent.selected ? "Normal_White" : "Normal") extprm(1)

;---------- ParCtlUserReport_MainStatItemT ---------------

[ParCtlUserReport_MainStat_ItemT]
@       = at(radiolike) sz(p,a) a(la) xy(,-1) bg("GroupBody") ext(1)
Header  = [ParCtlUserReport_MainStat_ItemT_Header]
Body    = sz(p,a) a(la) mg(30,7) xy(,-1) bg("GroupBody") visible(!ctl.parent.selected) extprm(1)
Body2   = sz(p,a) a(la) mg(30,7) xy(,-1) bg("GroupBody") visible(ctl.parent.selected) extprm(1)
BodyEx  = sz(p,a) a(la) mg(30,7) xy(,-1) bg("GroupBody") visible(ctl.parent.selected) extprm(1)

[ParCtlUserReport_MainStat_ItemT_Header]
@       = sz(p,a) mg(7,7) bg("Chart11")
Name    = a(lc) f("Header1") extprm(1)
Icon    = a(rc) sz(16,16) bg(ctl.parent.parent.selected ? "Arrows,5" : "Arrows,4")

;---------- ParCtlUserReport_Navigator_WorkArea_PageT ---------------

[Templates]
$ParCtlUserReport_NoStat_PeriodSwitch_OnChange     = +onchange(ctl.parent.parent.ListArea.List.setfilter(f_ParCtlEx_Events_PeriodFilter(ctl.PeriodBegin.value, ctl.PeriodEnd.value), 2))
$ParCtlUserReport_TimeSingle_PeriodSwitch_OnChange = +onchange(ctl.parent.parent.StatArea.Stat.setTimeRange(p_User, ctl.PeriodBegin.value, ctl.PeriodEnd.value); ctl.parent.parent.ListArea.List.setfilter(f_ParCtlEx_Events_PeriodFilter(ctl.PeriodBegin.value, ctl.PeriodEnd.value), 2))
$ParCtlUserReport_TimeRange_PeriodSwitch_OnChange  = +onchange( \
var nPeriodDescritization; var nChartPeriod; \
debugTrace(ctl.PeriodBegin.value ,"BeginTime"); \
debugTrace(ctl.PeriodEnd.value ,"EndTime"); \
nPeriodDescritization = s_ParCtlEx_GetStatRangePeriod(ctl.parent.PeriodType.value);\
ctl.parent.parent.StatArea.Stat.Period.value = ctl.parent.PeriodType.value; \
ctl.parent.parent.StatArea.Stat.PeriodStart.value = ctl.PeriodBegin.value; \
ctl.parent.parent.StatArea.Stat.setTimeRange(p_User, ctl.PeriodBegin.value, ctl.PeriodEnd.value, nPeriodDescritization); \
ctl.parent.parent.ListArea.List.setfilter(f_ParCtlEx_EventsTimeRange_PeriodFilter(ctl.PeriodBegin.value, ctl.PeriodEnd.value), 2))

$ParCtlUserReport_TimeRange_PeriodSwitch_NoArea_OnChange  = +onchange( \
var nPeriodDescritization; \
nPeriodDescritization = s_ParCtlEx_GetStatRangePeriod(ctl.parent.PeriodType.value);\
ctl.parent.parent.StatArea.Stat.setTimeRange(p_User, ctl.PeriodBegin.value, ctl.PeriodEnd.value, nPeriodDescritization) )


[ParCtlUserReport_Navigator_WorkArea_PageT]
@      = sz(p,p) ext(1)
Hdr    = [ParCtlUserReport_Navigator_WorkArea_PageT_Hdr]
Body   = [ParCtlUserReport_Navigator_WorkArea_PageT_Body] a(la) sz(p,p) rs(100,100)

[ParCtlUserReport_Navigator_WorkArea_PageT_Hdr]
@              = sz(p,a) xy(,,,10)
Title          = f("Header6KGreen") text(ctl.top.ctlFind("Navigator." + ctl.parent.parent.id).text) extprm(1)
PeriodSwitch   = [Statistics_Switch_Time] extprm(1) xy(,10)

[ParCtlUserReport_Navigator_WorkArea_PageT_Body]
StatArea  = [ParCtlUserReport_Navigator_WorkArea_PageT_Body_StatArea] sz(p,a) rs(100,0) a(lb) extprm(1)
ListArea  = [ParCtlUserReport_Navigator_WorkArea_PageT_Body_ListArea] sz(p,p) a(lp) extprm(1)

[ParCtlUserReport_Navigator_WorkArea_PageT_Body_StatArea]
@       = bg("ColorWindow")
Stat    = sz(p,100) a(la) extprm(1)

[ParCtlUserReport_Navigator_WorkArea_PageT_Body_ListArea]
@           = b(System)
List        = sz(p,p) a(la) at(rememberdata,noborder) filter(UserName == p_User) extprm(1)
Toolbar     = [Grid.Toolbar.Template] a(lt) b() t(listtoolbar) subst( Add(use(0)) Edit(use(0)) Delete(use(0)) Other([ParCtlUserReport_Navigator_WorkArea_PageT_Body_ListArea_ActionsArea] xy(0) use(1) ) ) extprm(1)

[ParCtlUserReport_Navigator_WorkArea_PageT_Body_ListArea_ActionsArea]
@                  = sz(p,p) rs(100,0) 
SeverityFilter     = [ParCtlUserReport_Navigator_WorkArea_SeverityFilterEx] a(rc) xy(4) 
ListActions        = a(lc) xy(2) extprm(1)

[ParCtlUserReport_Navigator_WorkArea_SeverityFilterEx]
$parToolbarBtnChoose = ctl.parent.parent.List.setfilter( if(ctl.Info.value,"Severity=="+#eParCtlEx_SeverityInfo,"false") + "||"+ if(ctl.Warn.value,"Severity=="+#eParCtlEx_SeverityWarning,"false") + "||"+ if(ctl.Crit.value,"Severity=="+#eParCtlEx_SeverityCritical,"false"), 1 )
@ = sz(a,a) oninit(ctl.Info.value=true;ctl.Warn.value=true;ctl.Crit.value=true)
Info = [TB_Button_ChkLike] subst(Icon(i(s_ParCtlEx_SeverityIcon(#eParCtlEx_SeverityInfo)))) onchange($parToolbarBtnChoose)
Warn = [TB_Button_ChkLike] subst(Icon(i(s_ParCtlEx_SeverityIcon(#eParCtlEx_SeverityWarning)))) onchange($parToolbarBtnChoose)
Crit = [TB_Button_ChkLike] subst(Icon(i(s_ParCtlEx_SeverityIcon(#eParCtlEx_SeverityCritical)))) onchange($parToolbarBtnChoose)

;---------- ParCtlUserReport_Navigator_WorkArea_TimeUsage_Stat ---------------

[ParCtlUserReport_Navigator_WorkArea_TimeUsage_Stat]
@           = ext(1) alias(statex) sz(p,a)
Period      = $ValPrm
PeriodStart = $ValPrm
Header      = a(ct) f("Header1") extprm(1)
SubHeader   = a(la) sz(a,a) f("Description") xy(,4,,5) extprm(1)
Data        = [ParCtlUserReport_Navigator_WorkArea_TimeUsage_Stat_Data] a(la) xy(,17) sz(p,110) rs(100,0)

[ParCtlUserReport_Navigator_WorkArea_TimeUsage_Stat_Data]
$tmpStatData = a(lt) xy(20,,,5)
$ctlPeriod = ctl.parent.Period.value
@          = sz(p,p)
YAxisDescr = a(lt) sz(a,p) ta(cb) f("Normal_Vert") at(singleline) text(s_YAxisDescr(ctl.parent.Period.value))
Day        = $tmpStatData [ParCtlUserReport_Navigator_WorkArea_TimeUsage_ChartDay]   visible( $ctlPeriod == #ePeriodDay)
Week       = $tmpStatData [ParCtlUserReport_Navigator_WorkArea_TimeUsage_ChartWeek]  visible( $ctlPeriod == #ePeriodWeek)
Month      = $tmpStatData [ParCtlUserReport_Navigator_WorkArea_TimeUsage_ChartMonth] visible( $ctlPeriod == #ePeriodMonth)
Year       = $tmpStatData [ParCtlUserReport_Navigator_WorkArea_TimeUsage_ChartYear]  visible( $ctlPeriod == #ePeriodYear)
;XAxisDescr = a(lb) sz(p,a) ta(ct) text(s_XAxisDescr(ctl.parent.Period.value))

[ParCtlUserReport_Navigator_WorkArea_TimeUsage_ChartDay]
@       = $ChartStatPctrl sz(p,p) at(disable_auto_tt)
$GetPeriodStart = ctl.parent.parent.PeriodStart.value
;$GetPeriodStart = 0
RedZone = $ValPrm v(60 - 15)
Plot    = t(chartplotarea)
AxisY   = $ChartStatAxisY
AxisX   = $ChartStatAxisX
Val_1   = $ParCtlEx_ChartUsageElem v(Descritization.at(0 )/60) tt(s_TTHour( $GetPeriodStart + 00*3600, Descritization.at(0 ))) text("00") ta(c)
Val_2   = $ParCtlEx_ChartUsageElem v(Descritization.at(1 )/60) tt(s_TTHour( $GetPeriodStart + 01*3600, Descritization.at(1 ))) text("01") ta(c)
Val_3   = $ParCtlEx_ChartUsageElem v(Descritization.at(2 )/60) tt(s_TTHour( $GetPeriodStart + 02*3600, Descritization.at(2 ))) text("02") ta(c)
Val_4   = $ParCtlEx_ChartUsageElem v(Descritization.at(3 )/60) tt(s_TTHour( $GetPeriodStart + 03*3600, Descritization.at(3 ))) text("03") ta(c)
Val_5   = $ParCtlEx_ChartUsageElem v(Descritization.at(4 )/60) tt(s_TTHour( $GetPeriodStart + 04*3600, Descritization.at(4 ))) text("04") ta(c)
Val_6   = $ParCtlEx_ChartUsageElem v(Descritization.at(5 )/60) tt(s_TTHour( $GetPeriodStart + 05*3600, Descritization.at(5 ))) text("05") ta(c)
Val_7   = $ParCtlEx_ChartUsageElem v(Descritization.at(6 )/60) tt(s_TTHour( $GetPeriodStart + 06*3600, Descritization.at(6 ))) text("06") ta(c)
Val_8   = $ParCtlEx_ChartUsageElem v(Descritization.at(7 )/60) tt(s_TTHour( $GetPeriodStart + 07*3600, Descritization.at(7 ))) text("07") ta(c)
Val_9   = $ParCtlEx_ChartUsageElem v(Descritization.at(8 )/60) tt(s_TTHour( $GetPeriodStart + 08*3600, Descritization.at(8 ))) text("08") ta(c)
Val_10  = $ParCtlEx_ChartUsageElem v(Descritization.at(9 )/60) tt(s_TTHour( $GetPeriodStart + 09*3600, Descritization.at(9 ))) text("09") ta(c)
Val_11  = $ParCtlEx_ChartUsageElem v(Descritization.at(10)/60) tt(s_TTHour( $GetPeriodStart + 10*3600, Descritization.at(10))) text("10") ta(c)
Val_12  = $ParCtlEx_ChartUsageElem v(Descritization.at(11)/60) tt(s_TTHour( $GetPeriodStart + 11*3600, Descritization.at(11))) text("11") ta(c)
Val_13  = $ParCtlEx_ChartUsageElem v(Descritization.at(12)/60) tt(s_TTHour( $GetPeriodStart + 12*3600, Descritization.at(12))) text("12") ta(c)
Val_14  = $ParCtlEx_ChartUsageElem v(Descritization.at(13)/60) tt(s_TTHour( $GetPeriodStart + 13*3600, Descritization.at(13))) text("13") ta(c)
Val_15  = $ParCtlEx_ChartUsageElem v(Descritization.at(14)/60) tt(s_TTHour( $GetPeriodStart + 14*3600, Descritization.at(14))) text("14") ta(c)
Val_16  = $ParCtlEx_ChartUsageElem v(Descritization.at(15)/60) tt(s_TTHour( $GetPeriodStart + 15*3600, Descritization.at(15))) text("15") ta(c)
Val_17  = $ParCtlEx_ChartUsageElem v(Descritization.at(16)/60) tt(s_TTHour( $GetPeriodStart + 16*3600, Descritization.at(16))) text("16") ta(c)
Val_18  = $ParCtlEx_ChartUsageElem v(Descritization.at(17)/60) tt(s_TTHour( $GetPeriodStart + 17*3600, Descritization.at(17))) text("17") ta(c)
Val_19  = $ParCtlEx_ChartUsageElem v(Descritization.at(18)/60) tt(s_TTHour( $GetPeriodStart + 18*3600, Descritization.at(18))) text("18") ta(c)
Val_20  = $ParCtlEx_ChartUsageElem v(Descritization.at(19)/60) tt(s_TTHour( $GetPeriodStart + 19*3600, Descritization.at(19))) text("19") ta(c)
Val_21  = $ParCtlEx_ChartUsageElem v(Descritization.at(20)/60) tt(s_TTHour( $GetPeriodStart + 20*3600, Descritization.at(20))) text("20") ta(c)
Val_22  = $ParCtlEx_ChartUsageElem v(Descritization.at(21)/60) tt(s_TTHour( $GetPeriodStart + 21*3600, Descritization.at(21))) text("21") ta(c)
Val_23  = $ParCtlEx_ChartUsageElem v(Descritization.at(22)/60) tt(s_TTHour( $GetPeriodStart + 22*3600, Descritization.at(22))) text("22") ta(c)
Val_24  = $ParCtlEx_ChartUsageElem v(Descritization.at(23)/60) tt(s_TTHour( $GetPeriodStart + 23*3600, Descritization.at(23))) text("23") ta(c)

[ParCtlUserReport_Navigator_WorkArea_TimeUsage_ChartWeek]
@       = $ChartStatPctrl sz(p,p) at(disable_auto_tt)
$GetPeriodStart = ctl.parent.parent.PeriodStart.value
RedZone = $ValPrm v(24 - 6)
Plot    = t(chartplotarea)
AxisY   = $ChartStatAxisY
AxisX   = $ChartStatAxisX
Val_1   = $ParCtlEx_ChartUsageElem v(Descritization.at(0)/60) tt(s_TTWeek((firstdayofweek()+0)%7, Descritization.at(0))) ta(c)
Val_2   = $ParCtlEx_ChartUsageElem v(Descritization.at(1)/60) tt(s_TTWeek((firstdayofweek()+1)%7, Descritization.at(1))) ta(c)
Val_3   = $ParCtlEx_ChartUsageElem v(Descritization.at(2)/60) tt(s_TTWeek((firstdayofweek()+2)%7, Descritization.at(2))) ta(c)
Val_4   = $ParCtlEx_ChartUsageElem v(Descritization.at(3)/60) tt(s_TTWeek((firstdayofweek()+3)%7, Descritization.at(3))) ta(c)
Val_5   = $ParCtlEx_ChartUsageElem v(Descritization.at(4)/60) tt(s_TTWeek((firstdayofweek()+4)%7, Descritization.at(4))) ta(c)
Val_6   = $ParCtlEx_ChartUsageElem v(Descritization.at(5)/60) tt(s_TTWeek((firstdayofweek()+5)%7, Descritization.at(5))) ta(c)
Val_7   = $ParCtlEx_ChartUsageElem v(Descritization.at(6)/60) tt(s_TTWeek((firstdayofweek()+6)%7, Descritization.at(6))) ta(c)

[ParCtlUserReport_Navigator_WorkArea_TimeUsage_ChartMonth]
@       = $ChartStatPctrl sz(p,p) at(disable_auto_tt)
$GetPeriodStart = ctl.parent.parent.PeriodStart.value
RedZone = $ValPrm v(24 - 6)
Plot    = t(chartplotarea)
AxisY   = $ChartStatAxisY
AxisX   = $ChartStatAxisX
Val_1   = $ParCtlEx_ChartUsageElem v(Descritization.at(0 )/60) tt(s_TTMonth( $GetPeriodStart + 00*24*3600, Descritization.at(0 ))) text("01") ta(c)
Val_2   = $ParCtlEx_ChartUsageElem v(Descritization.at(1 )/60) tt(s_TTMonth( $GetPeriodStart + 01*24*3600, Descritization.at(1 ))) text("02") ta(c)
Val_3   = $ParCtlEx_ChartUsageElem v(Descritization.at(2 )/60) tt(s_TTMonth( $GetPeriodStart + 02*24*3600, Descritization.at(2 ))) text("03") ta(c)
Val_4   = $ParCtlEx_ChartUsageElem v(Descritization.at(3 )/60) tt(s_TTMonth( $GetPeriodStart + 03*24*3600, Descritization.at(3 ))) text("04") ta(c)
Val_5   = $ParCtlEx_ChartUsageElem v(Descritization.at(4 )/60) tt(s_TTMonth( $GetPeriodStart + 04*24*3600, Descritization.at(4 ))) text("05") ta(c)
Val_6   = $ParCtlEx_ChartUsageElem v(Descritization.at(5 )/60) tt(s_TTMonth( $GetPeriodStart + 05*24*3600, Descritization.at(5 ))) text("06") ta(c)
Val_7   = $ParCtlEx_ChartUsageElem v(Descritization.at(6 )/60) tt(s_TTMonth( $GetPeriodStart + 06*24*3600, Descritization.at(6 ))) text("07") ta(c)
Val_8   = $ParCtlEx_ChartUsageElem v(Descritization.at(7 )/60) tt(s_TTMonth( $GetPeriodStart + 07*24*3600, Descritization.at(7 ))) text("08") ta(c)
Val_9   = $ParCtlEx_ChartUsageElem v(Descritization.at(8 )/60) tt(s_TTMonth( $GetPeriodStart + 08*24*3600, Descritization.at(8 ))) text("09") ta(c)
Val_10  = $ParCtlEx_ChartUsageElem v(Descritization.at(9 )/60) tt(s_TTMonth( $GetPeriodStart + 09*24*3600, Descritization.at(9 ))) text("10") ta(c)
Val_11  = $ParCtlEx_ChartUsageElem v(Descritization.at(10)/60) tt(s_TTMonth( $GetPeriodStart + 10*24*3600, Descritization.at(10))) text("11") ta(c)
Val_12  = $ParCtlEx_ChartUsageElem v(Descritization.at(11)/60) tt(s_TTMonth( $GetPeriodStart + 11*24*3600, Descritization.at(11))) text("12") ta(c)
Val_13  = $ParCtlEx_ChartUsageElem v(Descritization.at(12)/60) tt(s_TTMonth( $GetPeriodStart + 12*24*3600, Descritization.at(12))) text("13") ta(c)
Val_14  = $ParCtlEx_ChartUsageElem v(Descritization.at(13)/60) tt(s_TTMonth( $GetPeriodStart + 13*24*3600, Descritization.at(13))) text("14") ta(c)
Val_15  = $ParCtlEx_ChartUsageElem v(Descritization.at(14)/60) tt(s_TTMonth( $GetPeriodStart + 14*24*3600, Descritization.at(14))) text("15") ta(c)
Val_16  = $ParCtlEx_ChartUsageElem v(Descritization.at(15)/60) tt(s_TTMonth( $GetPeriodStart + 15*24*3600, Descritization.at(15))) text("16") ta(c)
Val_17  = $ParCtlEx_ChartUsageElem v(Descritization.at(16)/60) tt(s_TTMonth( $GetPeriodStart + 16*24*3600, Descritization.at(16))) text("17") ta(c)
Val_18  = $ParCtlEx_ChartUsageElem v(Descritization.at(17)/60) tt(s_TTMonth( $GetPeriodStart + 17*24*3600, Descritization.at(17))) text("18") ta(c)
Val_19  = $ParCtlEx_ChartUsageElem v(Descritization.at(18)/60) tt(s_TTMonth( $GetPeriodStart + 18*24*3600, Descritization.at(18))) text("19") ta(c)
Val_20  = $ParCtlEx_ChartUsageElem v(Descritization.at(19)/60) tt(s_TTMonth( $GetPeriodStart + 19*24*3600, Descritization.at(19))) text("20") ta(c)
Val_21  = $ParCtlEx_ChartUsageElem v(Descritization.at(20)/60) tt(s_TTMonth( $GetPeriodStart + 20*24*3600, Descritization.at(20))) text("21") ta(c)
Val_22  = $ParCtlEx_ChartUsageElem v(Descritization.at(21)/60) tt(s_TTMonth( $GetPeriodStart + 21*24*3600, Descritization.at(21))) text("22") ta(c)
Val_23  = $ParCtlEx_ChartUsageElem v(Descritization.at(22)/60) tt(s_TTMonth( $GetPeriodStart + 22*24*3600, Descritization.at(22))) text("23") ta(c)
Val_24  = $ParCtlEx_ChartUsageElem v(Descritization.at(23)/60) tt(s_TTMonth( $GetPeriodStart + 23*24*3600, Descritization.at(23))) text("24") ta(c)
Val_25  = $ParCtlEx_ChartUsageElem v(Descritization.at(24)/60) tt(s_TTMonth( $GetPeriodStart + 24*24*3600, Descritization.at(24))) text("25") ta(c)
Val_26  = $ParCtlEx_ChartUsageElem v(Descritization.at(25)/60) tt(s_TTMonth( $GetPeriodStart + 25*24*3600, Descritization.at(25))) text("26") ta(c)
Val_27  = $ParCtlEx_ChartUsageElem v(Descritization.at(26)/60) tt(s_TTMonth( $GetPeriodStart + 26*24*3600, Descritization.at(26))) text("27") ta(c)
Val_28  = $ParCtlEx_ChartUsageElem v(Descritization.at(27)/60) tt(s_TTMonth( $GetPeriodStart + 27*24*3600, Descritization.at(27))) text("28") ta(c)
Val_29  = $ParCtlEx_ChartUsageElem v(Descritization.at(28)/60) tt(s_TTMonth( $GetPeriodStart + 28*24*3600, Descritization.at(28))) text("29") ta(c) visible(Descritization.size() >= 29)
Val_30  = $ParCtlEx_ChartUsageElem v(Descritization.at(29)/60) tt(s_TTMonth( $GetPeriodStart + 29*24*3600, Descritization.at(29))) text("30") ta(c) visible(Descritization.size() >= 30)
Val_31  = $ParCtlEx_ChartUsageElem v(Descritization.at(30)/60) tt(s_TTMonth( $GetPeriodStart + 30*24*3600, Descritization.at(30))) text("31") ta(c) visible(Descritization.size() >= 31)

[ParCtlUserReport_Navigator_WorkArea_TimeUsage_ChartYear]
@       = $ChartStatPctrl sz(p,p) at(disable_auto_tt)
$GetPeriodStart = ctl.parent.parent.PeriodStart.value
RedZone = $ValPrm v((24*30)*2/3)
Plot    = t(chartplotarea)
AxisY   = $ChartStatAxisY
AxisX   = $ChartStatAxisX
Val_1   = $ParCtlEx_ChartUsageElem v(Descritization.at(0 )/3600) tt(s_TTYear(0 , Descritization.at(0 ))) text(s_MonthOfYear_Short( 0)) ta(c)
Val_2   = $ParCtlEx_ChartUsageElem v(Descritization.at(1 )/3600) tt(s_TTYear(1 , Descritization.at(1 ))) text(s_MonthOfYear_Short( 1)) ta(c)
Val_3   = $ParCtlEx_ChartUsageElem v(Descritization.at(2 )/3600) tt(s_TTYear(2 , Descritization.at(2 ))) text(s_MonthOfYear_Short( 2)) ta(c)
Val_4   = $ParCtlEx_ChartUsageElem v(Descritization.at(3 )/3600) tt(s_TTYear(3 , Descritization.at(3 ))) text(s_MonthOfYear_Short( 3)) ta(c)
Val_5   = $ParCtlEx_ChartUsageElem v(Descritization.at(4 )/3600) tt(s_TTYear(4 , Descritization.at(4 ))) text(s_MonthOfYear_Short( 4)) ta(c)
Val_6   = $ParCtlEx_ChartUsageElem v(Descritization.at(5 )/3600) tt(s_TTYear(5 , Descritization.at(5 ))) text(s_MonthOfYear_Short( 5)) ta(c)
Val_7   = $ParCtlEx_ChartUsageElem v(Descritization.at(6 )/3600) tt(s_TTYear(6 , Descritization.at(6 ))) text(s_MonthOfYear_Short( 6)) ta(c)
Val_8   = $ParCtlEx_ChartUsageElem v(Descritization.at(7 )/3600) tt(s_TTYear(7 , Descritization.at(7 ))) text(s_MonthOfYear_Short( 7)) ta(c)
Val_9   = $ParCtlEx_ChartUsageElem v(Descritization.at(8 )/3600) tt(s_TTYear(8 , Descritization.at(8 ))) text(s_MonthOfYear_Short( 8)) ta(c)
Val_10  = $ParCtlEx_ChartUsageElem v(Descritization.at(9 )/3600) tt(s_TTYear(9 , Descritization.at(9 ))) text(s_MonthOfYear_Short( 9)) ta(c)
Val_11  = $ParCtlEx_ChartUsageElem v(Descritization.at(10)/3600) tt(s_TTYear(10, Descritization.at(10))) text(s_MonthOfYear_Short(10)) ta(c)
Val_12  = $ParCtlEx_ChartUsageElem v(Descritization.at(11)/3600) tt(s_TTYear(11, Descritization.at(11))) text(s_MonthOfYear_Short(11)) ta(c)

;----------------- ParCtlEx Report StatTopElem ----------------------

[ParCtlExReport_StatTopElem]
@      = ext(1) sz(a,a) a(la) xy(,,,7)
Legend = a(at) sz(8,8) xy(,3) xy(,3,3) extprm(1)
Number = a(at) extprm(1)
Text   = a(at) f("Description") extprm(1)
Descr  = a(sa) f("Description") at(disabled) extprm(1)

[Templates]
$ColSeverity     = sz(40) i(if(Severity != #eParCtlEx_SeverityInfo, s_ParCtlEx_SeverityIcon(Severity))) text("")

;------------------- ParCtlUserReport.InternetUsage ----------

[ParCtlUserReport.InternetUsage]
@ = ext(1) [ParCtlUserReport_Navigator_WorkArea_PageT] subst(PeriodSwitch(subst(IsChange($ParCtlUserReport_TimeRange_PeriodSwitch_OnChange) )) List([ParCtlUserReport_Navigator_WorkArea_InternetUsage_List]) Stat([ParCtlUserReport_Navigator_WorkArea_TimeUsage_Stat] prm("ParCtl:" + serid("InternetUsageControlReportStatistics")) subst(Header() )) ) h(24805)

[ParCtlUserReport_Navigator_WorkArea_InternetUsage_List]
@              = $ListToolbar alias(events.ParCtlEx.InetUsage) refresh(100) ontimer(1000, updatedata())
Severity       = $ColSeverity
Time           = sz(120) text(datetime(DateTime)) group(ParCtlEx_InternetUsage_DateTime, dategroup(DateTime), default) sort(index, sortdown)
TimeUsage      = sz(120) text(timestamp(f_ParCtlEx_GetTimeUsage(StopTime, DateTime)))
AccessStatus   = sz(120) text(s_ParCtlEx_Access(AccessStatus))
;Reason         = sz(120) text(capitalize(s_ParCtlEx_IU_Reason(Reason)))
;Requests       = sz(120) text(Requests)

[Grid.Groups]
ParCtlEx_InternetUsage_DateTime = [ParCtlEx_InternetUsage_DateTime_Group]

[ParCtlEx_InternetUsage_DateTime_Group]
@            = sz(p,30) mg(,,,2) rs(100,0) onaggrow(if(!agg.Severity, agg.Severity = #eParCtlEx_SeverityInfo); if(agg.Severity > Severity, agg.Severity = Severity); if(StopTime != 0xFFFFFFFF, agg.GroupRunTime = agg.GroupRunTime + f_ParCtlEx_GetTimeUsage(StopTime, DateTime), agg.LastOpenedTime = DateTime))
Severity     = a(ac) xy(20) i(s_ParCtlEx_SeverityIcon(agg.Severity))
Date         = a(ac) f(ctl.parent.selected && ctl.List.focused ? "GridGroupSel" : "GridGroup")
Info         = a(ac)
border       = a(lb) xy(,-2) sz(p,2) bg("GridGroup")

;------------- ParCtlUserReport.InternetWebContent -----------------

[ParCtlUserReport.InternetWebContent]
@ = ext(1) [ParCtlUserReport_Navigator_WorkArea_PageT] subst(PeriodSwitch(subst(IsChange($ParCtlUserReport_TimeSingle_PeriodSwitch_OnChange) )) List([ParCtlUserReport_Navigator_WorkArea_InternetWebContent_List]) ListActions([ParCtlUserReport_InternetWebContent_List_Actions]) Stat([ParCtlUserReport_Navigator_WorkArea_InternetWebContent_Stat]) ) h(24806)

[ParCtlUserReport_Navigator_WorkArea_InternetWebContent_List]
@              = $ListToolbar alias(events.ParCtlEx.WebSiteControl) refresh(100) sz(p,p) ext(1) group(ParCtlEx_IWC_Domain, Domain, default)
Severity       = $ColSeverity
URL            = sz(200) text(Url)
;Domain         = sz(120) group(ParCtlEx_IWC_Domain, Domain, default) text(Domain)
Time           = sz(120) text(datetime(DateTime)) sort(index,sortup)
AccessStatus   = sz(200) text(s_ParCtlEx_IWC_Access(AccessStatus, Reason, Category))
;Reason         = sz(200) text(capitalize(s_ParCtlEx_IWC_Reason(Reason)))
;Category       = sz(150) text(f_ParCtlEx_IWC_Category_Mask(Category, 1))
row            = at(clickable) onrclick(menu("ParCtlUserReport_InternetUrls_List_Menu"))

[ParCtlUserReport_InternetUrls_List_Menu]
@              = t(menu)
OpenURL        = onclick(url(ctl.List.isNode ? ctl.List.val : Url))
sep
AllowDenyEx    = visible(ctl.ListActions.AllowDeny.visible)  enable(ctl.ListActions.AllowDeny.enabled) text(ctl.ListActions.AllowDeny.text) onclick(ctl.ListActions.AllowDeny.click())

[ParCtlUserReport_InternetWebContent_List_Actions]
$GetListSelDomain = (ctl.List.isNode ? ctl.List.val : ctl.List.seldata().Domain)
@               = ext(1) sz(a,a) enable($GetListSelDomain)
AllowDeny       = [TB_Button] xy(0) enable($GetListSelDomain) subst(Icon(i(if($GetListSelDomain && WebControl.BlackWhiteList.find("Name == " + toExpr($GetListSelDomain)).Blocked,s_Ico(#ICO_UNBLOCK_16),s_Ico(#ICO_BLOCK_16))))) onclick(var l_url; var l_domain; l_domain = $GetListSelDomain; l_url = WebControl.BlackWhiteList.find("Name == " + toExpr(l_domain),#vAdd, "Name = " + toExpr(l_domain) + "; Timestamp = utctime()"); debugTrace(l_url); debugTrace(l_url.Name); debugTrace(l_domain); l_url.Blocked = !l_url.Blocked)

[Grid.Groups]
ParCtlEx_IWC_Domain = [ParCtlEx_IWC_Domain_Group]

[ParCtlEx_IWC_Domain_Group]
@            = sz(p,30) mg(,,,2) rs(100,0) onaggrow(if(!agg.Severity, agg.Severity = #eParCtlEx_SeverityInfo); if(agg.Severity > Severity, agg.Severity = Severity); if(!agg.criticalCount,agg.criticalCount=0); if(Severity == #eParCtlEx_SeverityCritical,agg.criticalCount=agg.criticalCount+1))
Severity     = a(ac) xy(20) i(s_ParCtlEx_SeverityIcon(agg.Severity))
Domain       = a(ac) sz(a,a) i(getIcon(".html")) f(ctl.parent.selected && ctl.List.focused ? "GridGroupSel" : "GridGroup") text(val)
Info         = a(ac) sz(a,a)
border       = a(lb) xy(,-2) sz(p,2) bg("GridGroup")

[ParCtlUserReport_Navigator_WorkArea_InternetWebContent_Stat]
@         = alias(statex) prm("ParCtl:" + serid("WebSiteControlReportStatistics")) ext(1) sz(p,a) mg(0,12,0,0)
Header    = a(lt) f("Header1") visible(Domains.size())
SubHeader = a(la) f("Description") xy(,7,,5) visible(Domains.size())
Data      = [ParCtlUserReport_Navigator_WorkArea_InternetWebContent_Stat_Data] a(la) sz(p,110) rs(100,0) visible(Domains.size())

[ParCtlUserReport_Navigator_WorkArea_InternetWebContent_Stat_Data]
Top3      = [ParCtlUserReport_Navigator_WorkArea_InternetWebContent_Stat_Top3] xy(,6) 
Chart     = [ParCtlUserReport_Navigator_WorkArea_InternetWebContent_Chart]

[ParCtlUserReport_Navigator_WorkArea_InternetWebContent_Stat_Top3]
@       = sz(a,a) rs(0,0) a(la) xy(,,10)
Top_1   = [ParCtlExReport_StatTopElem] visible(Domains.size() >= 1) subst(Legend(bg("Chart2")) Number(text("1. ")) Text(text(Domains[0].Domain)) Descr() )
Top_2   = [ParCtlExReport_StatTopElem] visible(Domains.size() >= 2) subst(Legend(bg("Chart3")) Number(text("2. ")) Text(text(Domains[1].Domain)) Descr() )
Top_3   = [ParCtlExReport_StatTopElem] visible(Domains.size() >= 3) subst(Legend(bg("Chart4")) Number(text("3. ")) Text(text(Domains[2].Domain)) Descr() )

[ParCtlUserReport_Navigator_WorkArea_InternetWebContent_Chart]
@       = $ChartStat mg(20,20) a(as) sz(p,p) at(disable_auto_tt)
Plot    = t(chartplotarea)
AxisY   = $ChartStatAxisY -b()
AxisX   = $ChartStatAxisX xy(-5)
Top_1   = t(chartseries) visible(Domains.size() >= 1) mg(10) bg("Chart2") v(Domains.at(0).Count) tt(s_TTInternetWebContent_Chart(Domains[0]))
Top_2   = t(chartseries) visible(Domains.size() >= 2) mg(10) bg("Chart3") v(Domains.at(1).Count)    tt(s_TTInternetWebContent_Chart(Domains[1]))
Top_3   = t(chartseries) visible(Domains.size() >= 3) mg(10) bg("Chart4") v(Domains.at(2).Count)    tt(s_TTInternetWebContent_Chart(Domains[2]))

;------------- ParCtlUserReport.InternetDownload -----------------

[ParCtlUserReport.InternetDownload]
@ = ext(1) [ParCtlUserReport_Navigator_WorkArea_PageT] subst(PeriodSwitch(subst(IsChange($ParCtlUserReport_TimeSingle_PeriodSwitch_OnChange) )) List([ParCtlUserReport_Navigator_WorkArea_InternetDownload_List]) ListActions([ParCtlUserReport_InternetDownload_List_Actions]) Stat([ParCtlUserReport_Navigator_WorkArea_InternetDownload_Stat]) ) h(24807)

[ParCtlUserReport_Navigator_WorkArea_InternetDownload_List]
@              = $ListToolbar alias(events.ParCtlEx.FileDownloadControl) refresh(100) sz(p,p) ext(1) 
Severity       = $ColSeverity
File           = [ParCtlUserReport_Navigator_WorkArea_InternetDownload_List_File]
;Category       = sz(150) group(ParCtlEx_FDC_Category, Category) text(capitalize(s_ParCtlEx_FileCategory(Category)))
;Domain         = sz(120) group(ParCtlEx_FDC_Domain, Domain, default) text(Domain)
Time           = sz(120) text(datetime(DateTime)) sort(index,sortup)
AccessStatus   = sz(200) text(s_ParCtlEx_ID_Access(AccessStatus, Category))
;Reason         = sz(200) text(capitalize(s_ParCtlEx_FDC_Reason(Reason)))
;URL            = sz(200) text(Url)
row            = at(clickable) onrclick(menu("ParCtlUserReport_InternetUrls_List_Menu"))

[ParCtlUserReport_Navigator_WorkArea_InternetDownload_List_File]
@    = sz(200) i(getIcon("." + Extension, "unkobj")) text(FileName + "." + Extension)
Name = sz(150) text(FileName)
Type = sz(50) i(getIcon("." + Extension, "unkobj")) text(Extension))

[ParCtlUserReport_InternetDownload_List_Actions]
Category = [ParCtlUserReport_InternetDownload_List_Actions_Category]
Domain   = [ParCtlUserReport_InternetDownload_List_Actions_Domain] xy($TB_ShiftNext_Btn)

[ParCtlUserReport_InternetDownload_List_Actions_Category]
$GetListSelCategory = (ctl.List.groupId == "Category" ? ctl.List.val : ctl.List.seldata().Category)
@                   = sz(a,a) enable($GetListSelCategory) a(at)
AllowDeny           = [TB_Button] xy(0) subst(Icon(i(if( $GetListSelCategory && FileDownloadControl.Items.find("Name=="+toExpr($GetListSelCategory)).Enabled, s_Ico(#ICO_UNBLOCK_16), s_Ico(#ICO_BLOCK_16) )))) onclick(var l_category; l_category=FileDownloadControl.Items.find("Name=="+toExpr($GetListSelCategory)); l_category.Enabled = !l_category.Enabled)

[ParCtlUserReport_InternetDownload_List_Actions_Domain]
$GetListSelDomain   = (ctl.List.groupId == "Domain" ? ctl.List.val : ctl.List.seldata().Domain)
@                   = ext(1) sz(a,a) enable($GetListSelDomain) a(at)
AllowDeny           = [TB_Button] xy(0) subst(Icon(i(if($GetListSelDomain && WebControl.BlackWhiteList.find("Name == " + toExpr($GetListSelDomain)).Blocked,s_Ico(#ICO_UNBLOCK_16),s_Ico(#ICO_BLOCK_16))))) onclick(var l_url; var l_domain; l_domain = $GetListSelDomain; l_url = WebControl.BlackWhiteList.find("Name == " + toExpr(l_domain),#vAdd, "Name = " + toExpr(l_domain) + "; Timestamp = utctime()"); l_url.Blocked = !l_url.Blocked)

[Grid.Groups]
ParCtlEx_FDC_Category = [ParCtlEx_FDC_Category_Group]
ParCtlEx_FDC_Domain = [ParCtlEx_FDC_Domain_Group]

[ParCtlEx_FDC_Category_Group]
@            = sz(p,30) mg(,,,2) rs(100,0) onaggrow(if(!agg.Severity, agg.Severity = #eParCtlEx_SeverityInfo); if(agg.Severity > Severity, agg.Severity = Severity); if(AccessStatus == #eParCtlEx_AccessBlocked, agg.Blocked = agg.Blocked + 1))
Severity     = a(ac) xy(20) i(s_ParCtlEx_SeverityIcon(agg.Severity))
Category     = a(ac) sz(a,a) f(ctl.parent.selected && ctl.List.focused ? "GridGroupSel" : "GridGroup") text(capitalize(s_ParCtlEx_FileCategory(val)))
Info         = a(ac) sz(a,a)
border       = a(lb) xy(,-2) sz(p,2) bg("GridGroup")

[ParCtlEx_FDC_Domain_Group]
@            = sz(p,30) mg(,,,2) rs(100,0) onaggrow(if(!agg.Severity, agg.Severity = #eParCtlEx_SeverityInfo); if(agg.Severity > Severity, agg.Severity = Severity); if(AccessStatus == #eParCtlEx_AccessBlocked, agg.Blocked = agg.Blocked + 1))
Severity     = a(ac) xy(20) i(s_ParCtlEx_SeverityIcon(agg.Severity))
Domain       = a(ac) sz(a,a) i(getIcon(".html", "unkobj")) f(ctl.parent.selected && ctl.List.focused ? "GridGroupSel" : "GridGroup") text(val)
Info         = a(ac) sz(a,a)
border       = a(lb) xy(,-2) sz(p,2) bg("GridGroup")

[ParCtlUserReport_Navigator_WorkArea_InternetDownload_Stat]
@         = alias(statex) prm("ParCtl:" + serid("FileDownloadControlReportStatistics")) ext(1) sz(p,a) mg(0,12,0,0)
Header    = a(lt) f("Header1") visible(Domains.size())
SubHeader = a(la) f("Description") xy(,7,,5) visible(Domains.size())
Data      = [ParCtlUserReport_Navigator_WorkArea_InternetDownload_Stat_Data] a(la) sz(p,110) rs(100,0) visible(Domains.size())

[ParCtlUserReport_Navigator_WorkArea_InternetDownload_Stat_Data]
Top3      = [ParCtlUserReport_Navigator_WorkArea_InternetDownload_Stat_Top3] xy(,6)
Chart     = [ParCtlUserReport_Navigator_WorkArea_InternetDownload_Chart]

[ParCtlUserReport_Navigator_WorkArea_InternetDownload_Stat_Top3]
@       = sz(a,a) rs(0,0) a(la) xy(,,10)
Top_1   = [ParCtlExReport_StatTopElem] visible(Domains.size() >= 1) subst(Legend(bg("Chart2")) Number(text("1. ")) Text(text(Domains.at(0).Domain)) Descr() )
Top_2   = [ParCtlExReport_StatTopElem] visible(Domains.size() >= 2) subst(Legend(bg("Chart3")) Number(text("2. ")) Text(text(Domains.at(1).Domain)) Descr() )
Top_3   = [ParCtlExReport_StatTopElem] visible(Domains.size() >= 3) subst(Legend(bg("Chart4")) Number(text("3. ")) Text(text(Domains.at(2).Domain)) Descr() )

[ParCtlUserReport_Navigator_WorkArea_InternetDownload_Chart]
@       = $ChartStat mg(20,20) a(as) sz(p,p) at(disable_auto_tt)
Plot    = t(chartplotarea)
AxisY   = $ChartStatAxisY -b()
AxisX   = $ChartStatAxisX xy(-5)
Top_1   = t(chartseries) visible(Domains.size() >= 1) mg(10) bg("Chart2") v(Domains.at(0).Count) tt(s_TTInternetDownload_Chart(Domains[0]))
Top_2   = t(chartseries) visible(Domains.size() >= 2) mg(10) bg("Chart3") v(Domains.at(1).Count) tt(s_TTInternetDownload_Chart(Domains[1]))
Top_3   = t(chartseries) visible(Domains.size() >= 3) mg(10) bg("Chart4") v(Domains.at(2).Count) tt(s_TTInternetDownload_Chart(Domains[2]))

;------------- ParCtlUserReport.MessagingIM -----------------

[ParCtlUserReport.MessagingIM]
@ = ext(1) [ParCtlUserReport_Navigator_WorkArea_PageT] subst(PeriodSwitch(subst(IsChange($ParCtlUserReport_TimeSingle_PeriodSwitch_OnChange) )) List([ParCtlUserReport_Navigator_WorkArea_MessagingIM_List]) ListActions([ParCtlUserReport_MessagingIM_List_Actions]) Stat([ParCtlUserReport_Navigator_WorkArea_MessagingIM_Stat]) ) h(25596)

[ParCtlUserReport_Navigator_WorkArea_MessagingIM_List]
@              = $ListToolbar alias(events.ParCtlEx.IM) refresh(100) sz(p,p) ext(1)
Severity       = $ColSeverity
Direction      = sz(80) i("ParCtlExAll16," + (Direction == #eParCtlEx_DirectionInbound ? 10 : 11)) text("")
;Direction      = sz($ListColIconOnlySize) i("ParCtlExAll16," + (Direction == #eParCtlEx_DirectionInbound ? 10 : 11)) text("")
UserName       = sz(130) group(ParCtlEx_IM_ContactId, ContactId + ProtocolType, default) text(Direction == #eParCtlEx_DirectionInbound ? f_ParCtlEx_GetIMContactName(UserName, ContactId) : f_UserName(UserName))
Time           = sz(120) text(datetime(DateTime)) sort(index,sortup)
AccessStatus   = sz(100) text(s_ParCtlEx_Access(AccessStatus))
Reason         = sz(200) text(capitalize(s_ParCtlEx_IM_Reason(Reason)))
IsPersInfo     = sz(160) i(if(PersonalInfos, $ParCtlEx_IM_IsPersInfo_Icon)) text("") tt(PersonalInfos)
;IsPersInfo     = sz(200) sz($ListColIconOnlySize) i(if(PersonalInfos, $ParCtlEx_IM_IsPersInfo_Icon)) text("") tt(PersonalInfos)
IsKeywords     = sz(160) i(if(Keywords, $ParCtlEx_IM_IsKeywords_Icon)) text("") tt(Keywords)
;IsKeywords     = sz(200) sz($ListColIconOnlySize) i(if(Keywords, $ParCtlEx_IM_IsKeywords_Icon)) text("") tt(Keywords)

[ParCtlUserReport_MessagingIM_List_Actions]
$GetListSelData = (ctl.List.isNode ? (ctl.List.agg.ContactId ? ctl.List.finddata("ContactId == \"" + ctl.List.agg.ContactId + "\" && ProtocolType == " + ctl.List.agg.ProtocolType) : NULL) : ctl.List.seldata())
$GetListSelContactId = (ctl.List.isNode ? ctl.List.agg.ContactId : ctl.List.seldata().ContactId)
$GetListData = IMControl.Contacts.find("Id==" + toExpr($GetListSelContactId))
@               = ext(1) sz(a,a) enable($GetListSelData)
AllowDeny       = [TB_Button] xy(0) subst(Icon(i(if($GetListData.Blocked,s_Ico(#ICO_UNBLOCK_16), s_Ico(#ICO_BLOCK_16))))) onclick(var l_contactId; var p; l_contactId = $GetListSelContactId; p = IMControl.Contacts.find("Id==" + toExpr(l_contactId), #vAdd, "Id="+toExpr(l_contactId)); p.Blocked = !p.Blocked )
Open            = [TB_Button] subst(Icon(i("listctrls,10"))) onclick(dialog("ParCtlReportIMMessageDetails", p_data($GetListSelData), p_period(f_ParCtlEx_Events_PeriodFilter(ctl.PeriodBegin.value, ctl.PeriodEnd.value))))


[Grid.Groups]
ParCtlEx_IM_ContactId = [ParCtlEx_IM_ContactId_Group]

[ParCtlEx_IM_ContactId_Group]
@            = sz(p,30) mg(,,,2) rs(100,0) onaggrow(agg.ContactId = ContactId; agg.ProtocolType = ProtocolType; if(!agg.Severity, agg.Severity = #eParCtlEx_SeverityInfo); if(agg.Severity > Severity, agg.Severity = Severity); if(AccessStatus == #eParCtlEx_AccessBlocked, agg.Blocked = agg.Blocked + 1); if(PersonalInfos, agg.IsPersonalInfoSending = true); if(Keywords, agg.IsKeywords = true))
Severity     = a(ac) xy(20) i(s_ParCtlEx_SeverityIcon(agg.Severity))
ContactId    = a(ac) sz(a,a) i(s_ParCtlUserReport_IM_ContactId_Icon(f_ParCtlEx_GetIMContactGroup(p_User, agg.ContactId))) f(ctl.parent.selected && ctl.List.focused ? "GridGroupSel" : "GridGroup") text(f_ParCtlEx_GetIMContactName(p_User, agg.ContactId))
Info         = a(ac) sz(a,a) xy(,,10)
IsPersInfo   = a(ac) i($ParCtlEx_IM_IsPersInfo_Icon) visible(agg.IsPersonalInfoSending)
IsKeywords   = a(ac) i($ParCtlEx_IM_IsKeywords_Icon) visible(agg.IsKeywords)
border       = a(lb) xy(,-2) sz(p,2) bg("GridGroup")

[ParCtlUserReport_Navigator_WorkArea_MessagingIM_Stat]
@         = alias(statex) prm("ParCtl:" + serid("InstantMessangerControlReportStatistics")) ext(1) sz(p,a) mg(0,12,0,0)
Header    = a(lt) f("Header1") visible(Contacts.size())
SubHeader = a(la) f("Description") xy(,7,,5) visible(Contacts.size())
Data      = [ParCtlUserReport_Navigator_WorkArea_MessagingIM_Stat_Data] a(la) sz(p,110) rs(100,0) visible(Contacts.size())

[ParCtlUserReport_Navigator_WorkArea_MessagingIM_Stat_Data]
Top3      = [ParCtlUserReport_Navigator_WorkArea_MessagingIM_Stat_Top3] xy(,6)
Chart     = [ParCtlUserReport_Navigator_WorkArea_MessagingIM_Chart]

[ParCtlUserReport_Navigator_WorkArea_MessagingIM_Stat_Top3]
@       = sz(a,a) rs(0,0) a(la) xy(,,10)
Top_1   = [ParCtlExReport_StatTopElem] visible(Contacts.size() >= 1) subst(Legend(bg("Chart2")) Number(text("1. ")) Text(text(f_ParCtlEx_GetIMContactName(p_User, Contacts.at(0).ContactId))) Descr() )
Top_2   = [ParCtlExReport_StatTopElem] visible(Contacts.size() >= 2) subst(Legend(bg("Chart3")) Number(text("2. ")) Text(text(f_ParCtlEx_GetIMContactName(p_User, Contacts.at(1).ContactId))) Descr() )
Top_3   = [ParCtlExReport_StatTopElem] visible(Contacts.size() >= 3) subst(Legend(bg("Chart4")) Number(text("3. ")) Text(text(f_ParCtlEx_GetIMContactName(p_User, Contacts.at(2).ContactId))) Descr() )

[ParCtlUserReport_Navigator_WorkArea_MessagingIM_Chart]
@       = $ChartStat mg(20,20) a(as) sz(p,p) at(disable_auto_tt)
Plot    = t(chartplotarea)
AxisY   = $ChartStatAxisY -b()
AxisX   = $ChartStatAxisX xy(-5)
Top_1   = t(chartseries) visible(Contacts.size() >= 1) mg(10) bg("Chart2") v(Contacts.at(0).MsgCount) tt(s_TTMessagingIM_Chart(Contacts[0]))
Top_2   = t(chartseries) visible(Contacts.size() >= 2) mg(10) bg("Chart3") v(Contacts.at(1).MsgCount)    tt(s_TTMessagingIM_Chart(Contacts[1]))
Top_3   = t(chartseries) visible(Contacts.size() >= 3) mg(10) bg("Chart4") v(Contacts.at(2).MsgCount)    tt(s_TTMessagingIM_Chart(Contacts[2]))

;---------- ParCtlReportIMMessageDetails ------------------

[ParCtlReportIMMessageDetails]
@  = [StyledWindowT] at(dragable,resizable,a_close) subst( BodyEx( [ParCtlReportIMMessageDetails_Body] ns(p_data) ) ) alias(task) ns(ParCtl) sz(500,300) h(24810)

[ParCtlReportIMMessageDetails_Body]
@           = sz(p,p) a(lt) mg(7,7,7,7)
ContactId   = [LValue] xy(,,,7) subst(Name() Val(f("Header0") text(f_ParCtlEx_GetIMContactName(UserName, ContactId))) )
Group       = [LValue] xy(,,,7) subst(Name(i(s_ImGroupIcon(ctl.Val.value)) ia(r) sz(116)) Val(xy(116) [ParCtlReportIMMessageDetails_Body_Group] v(inout(f_ParCtlEx_GetIMContactGroup(UserName, ContactId), f_ParCtlEx_SetIMContactGroup(UserName, ContactId, ctl.value), true))) )
Proto       = [LValue] xy(,,,7) subst(Name() Val(f("Header0") text(s_ParCtlEx_IM_ProtocolTypes(ProtocolType))) )
Search      = [ParCtlReportIMMessageDetails_Search] a(rs) xy(,-5,,5)
List        = [ParCtlReportIMMessageDetails_List] a(la)

[ParCtlReportIMMessageDetails_Search]
@    = b(System) mg(5,1,,1) bg("ColorWindow") sz(150,a)
Icon = a(rc) i("Find")
Edit = t(edit) a(pc) sz(p) xy(2) at(noborder) onchange(if(ctl.value, ctl.List.setfilter("strfind(toupper(MessageText)," + toExpr(toupper(ctl.value)) + ")",1), ctl.List.setfilter("",1)))

[ParCtlReportIMMessageDetails_Body_Group]
@           = t(combo) f("Header0") sz(a,a)
WhiteList   = v(#eParCtlEx_IM_ReasonContactInWhiteList)
BlackList   = v(#eParCtlEx_IM_ReasonContactInBlackList)
Other       = v(0)

[ParCtlReportIMMessageDetails_List]
@             = $List alias(events.ParCtlEx.IM) at(noheader,singlesel,rememberdata,nosearch) oninit(ctl.setfilter(p_period, 1)) filter(ContactId == p_data.ContactId && ProtocolType == p_data.ProtocolType && UserName == p_data.UserName) refresh(100)
row           = [ParCtlReportIMMessageDetails_List_Row]

[ParCtlReportIMMessageDetails_List_Row]
@            = sz(p,a) at(custom) f("Description")
_space       = sz(0) xy(5,5)
Severity     = a(as) i(if(Severity != #eParCtlEx_SeverityInfo, s_ParCtlEx_SeverityIcon(Severity)))
AccessStatus = a(as) i(if(AccessStatus != #eParCtlEx_AccessAllowed, "ParCtlExAll16,12"))
Direction    = a(as) i("ParCtlExAll16," + (Direction == #eParCtlEx_DirectionInbound ? 10 : 11))
UserName     = a(as) f(ctl.parent.selected && ctl.List.focused ? "Header0White" : "Header0") text(Direction == #eParCtlEx_DirectionInbound ? f_ParCtlEx_GetIMContactName(UserName, ContactId) : f_UserName(UserName))
MessageText  = a(la) xy(5,5) f("Description") text(MessageText)
Sep          = a(la) sz(p,1) xy(,5) b(Topline_lgrey)
IsKeywords   = a(rt) xy(5,5) sz(16,16) i(if(Keywords, $ParCtlEx_IM_IsKeywords_Icon)) tt(Keywords)
IsPersInfo   = a(ps) xy(3) sz(16,16) i(if(PersonalInfos, $ParCtlEx_IM_IsPersInfo_Icon)) tt(PersonalInfos)
Time         = a(ps) f("Description") xy(20) text(datetime(DateTime))

;------------- ParCtlReportSNControlDetails -----------------

[ParCtlReportSNControlDetails]
@  = [StyledWindowT] at(dragable,resizable,a_close) subst( BodyEx( [ParCtlReportSNControlDetails_Body] ns(p_data) ) ) alias(task) ns(ParCtl) sz(520,220) h(24810)

[ParCtlReportSNControlDetails_Body]
@           = sz(p,p) a(lt) mg(7,7,7,7)
ContactId   = [LValue] xy(,,,7) subst(Name() Val(f("Header0") text(f_ParCtlEx_GetSNContactName(ContactId, ContactAlias))) )
List        = [ParCtlReportSNControlDetails_List] a(la)

[ParCtlReportSNControlDetails_List]
@           = $List alias(events.ParCtlEx.SNControl) at(noheader,singlesel,rememberdata,nosearch) oninit(ctl.setfilter(p_period, 1)) filter(ContactId == p_data.ContactId && UserName == p_data.UserName) refresh(100)
row         = [ParCtlReportSNControlDetails_List_Row]

[ParCtlReportSNControlDetails_List_Row]
@            = sz(p,a) at(custom) f("Description")
_space       = sz(0) xy(5,5)
Severity     = a(as) i(if(Severity != #eParCtlEx_SeverityInfo, s_ParCtlEx_SeverityIcon(Severity)))
AccessStatus = a(as) i(if(AccessStatus != #eParCtlEx_AccessAllowed, "ParCtlExAll16,12"))
Direction    = a(as) i("ParCtlExAll16," + (Direction == #eParCtlEx_DirectionInbound ? 10 : 11))
UserName     = a(as) f(ctl.parent.selected && ctl.List.focused ? "Header0White" : "Header0") text(Direction == #eParCtlEx_DirectionInbound ? f_ParCtlEx_GetSNContactName(ContactId, ContactAlias) : f_UserName(UserName))
MessageText  = a(la) xy(5,5) f("Description") text(MessageText)
Sep          = a(la) sz(p,1) xy(,5) b(Topline_lgrey)
Time         = a(rt) f("Description") xy(20) text(datetime(DateTime))

;------------- ParCtlUserReport.MessagingPersonalData -----------------

[ParCtlUserReport.MessagingPersonalData]
@ = ext(1) [ParCtlUserReport_Navigator_WorkArea_PageT] subst(PeriodSwitch(subst(IsChange($ParCtlUserReport_NoStat_PeriodSwitch_OnChange) )) List([ParCtlUserReport_Navigator_WorkArea_MessagingPersonalData_List]) Stat([ParCtlUserReport_Navigator_WorkArea_MessagingPersonalData_Stat]) ) h(24811)

[ParCtlUserReport_Navigator_WorkArea_MessagingPersonalData_List]
@              = $ListToolbar alias(events.ParCtlEx.PersonalInfoControl) refresh(100) sz(p,p) ext(1)
Severity       = $ColSeverity
PersonalInfo   = sz(150) text(PersonalInfo) group(ParCtlEx_MPD_PersonalInfo, PersonalInfo, default)
;Protocol       = sz(100) text(s_ParCtlEx_IM_ProtocolTypes(Protocol))
Recipient      = sz(130) text(UserName != Recipient ? f_ParCtlEx_GetIMContactName(UserName, Recipient) : f_UserName(UserName))
Time           = sz(120) text(datetime(DateTime)) sort(index,sortup) group(ParCtlEx_MPD_Date, dategroup(DateTime))
AccessStatus   = sz(100) text(s_ParCtlEx_Access(#eParCtlEx_AccessBlocked))

[Grid.Groups]
ParCtlEx_MPD_PersonalInfo = [ParCtlEx_MPD_PersonalInfo_Group]
ParCtlEx_MPD_Date         = [ParCtlEx_MPD_Date_Group]

[ParCtlEx_MPD_PersonalInfo_Group]
@            = sz(p,30) mg(,,,2) rs(100,0) onaggrow(if(!agg.Severity, agg.Severity = #eParCtlEx_SeverityInfo); if(agg.Severity > Severity, agg.Severity = Severity))
Severity     = a(ac) xy(20) i(s_ParCtlEx_SeverityIcon(agg.Severity))
Id           = a(ac) sz(a,a) f(ctl.parent.selected && ctl.List.focused ? "GridGroupSel" : "GridGroup") text(val)
Info         = a(ac) sz(a,a)
border       = a(lb) xy(,-2) sz(p,2) bg("GridGroup")

[ParCtlEx_MPD_Date_Group]
@            = sz(p,30) mg(,,,2) rs(100,0) onaggrow(if(!agg.Severity, agg.Severity = #eParCtlEx_SeverityInfo); if(agg.Severity > Severity, agg.Severity = Severity))
Severity     = a(ac) xy(20) i(s_ParCtlEx_SeverityIcon(agg.Severity))
Id           = a(ac) sz(a,a) f(ctl.parent.selected && ctl.List.focused ? "GridGroupSel" : "GridGroup")
Info         = a(ac) sz(a,a)
border       = a(lb) xy(,-2) sz(p,2) bg("GridGroup")

[ParCtlUserReport_Navigator_WorkArea_MessagingPersonalData_Stat]
@         = ext(1) sz(p,a)
Header    = a(lt) f("Header1")

;------------- ParCtlUserReport.MessagingKeywords -----------------

[ParCtlUserReport.MessagingKeywords]
@ = ext(1) [ParCtlUserReport_Navigator_WorkArea_PageT] subst(PeriodSwitch(subst(IsChange($ParCtlUserReport_NoStat_PeriodSwitch_OnChange) )) List([ParCtlUserReport_Navigator_WorkArea_MessagingKeywords_List]) Stat([ParCtlUserReport_Navigator_WorkArea_MessagingKeywords_Stat]) ) h(24812)

[ParCtlUserReport_Navigator_WorkArea_MessagingKeywords_List]
@              = $ListToolbar alias(events.ParCtlEx.KeywordsControl) refresh(100) sz(p,p) ext(1)
Severity       = $ColSeverity
;Direction      = sz(80) i("ParCtlExAll16," + (Direction == #eParCtlEx_DirectionInbound ? 10 : 11)) text("")
Keyword        = sz(150) text(Keyword) group(ParCtlEx_MPD_PersonalInfo, Keyword, default)
Recipient      = sz(160) text(UserName != Recipient ? f_ParCtlEx_GetIMContactName(UserName, Recipient) : f_UserName(UserName))
;Protocol       = sz(100) text(s_ParCtlEx_IM_ProtocolTypes(Protocol))
;AccessStatus  = sz(100) text(s_ParCtlEx_Access(#eParCtlEx_AccessBlocked))
Time           = sz(120) text(datetime(DateTime)) sort(index,sortup) group(ParCtlEx_MPD_Date, dategroup(DateTime))

[ParCtlUserReport_Navigator_WorkArea_MessagingKeywords_Stat]
@         = ext(1) sz(p,a)
Header    = a(lt) f("Header1")

;------------------- ParCtlUserReport.ComputerUsage ----------

[ParCtlUserReport.ComputerUsage]
$tmpPeriodSwitch = PeriodSwitch(subst( IsChange($ParCtlUserReport_TimeRange_PeriodSwitch_OnChange) ) )
$tmpList         = List( [ParCtlUserReport_Navigator_WorkArea_ComputerUsage_List] )
$parPrm          = "ParCtl:" + serid("ComputerControlReportStatistics")
$tmpStat         = Stat([ParCtlUserReport_Navigator_WorkArea_TimeUsage_Stat] prm($parPrm) subst(Header()) )
@ = ext(1) [ParCtlUserReport_Navigator_WorkArea_PageT] subst( $tmpPeriodSwitch $tmpList $tmpStat ) h(24803)

[ParCtlUserReport_Navigator_WorkArea_ComputerUsage_List]
@              = $ListToolbar alias(events.ParCtlEx.CompUsage) refresh(100) ontimer(1000, updatedata())
Severity       = $ColSeverity
Time           = sz(120) text(datetime(DateTime)) group(ParCtlEx_ComputerUsage_DateTime, dategroup(DateTime), default) sort(index, sortdown)
TimeUsage      = sz(100) text(timestamp(f_ParCtlEx_GetTimeUsage(StopTime, DateTime)))
;AccessStatus   = sz(200) text(s_ParCtlEx_Access(Action)+", "+s_ParCtlEx_CU_Reason(Reason))
AccessStatus   = sz(200) text(s_ParCtl_CU_GetResultDesc(Action,Reason))


[Grid.Groups]
ParCtlEx_ComputerUsage_DateTime = [ParCtlEx_ComputerUsage_DateTime_Group]

[ParCtlEx_ComputerUsage_DateTime_Group]
@            = sz(p,30) mg(,,,2) rs(100,0) onaggrow(if(!agg.Severity, agg.Severity = #eParCtlEx_SeverityInfo); if(agg.Severity > Severity, agg.Severity = Severity); if(StopTime != 0xFFFFFFFF, agg.GroupRunTime = agg.GroupRunTime + f_ParCtlEx_GetTimeUsage(StopTime, DateTime), agg.LastOpenedTime = DateTime))
Severity     = a(ac) xy(20) i(s_ParCtlEx_SeverityIcon(agg.Severity))
Date         = a(ac) f(ctl.parent.selected && ctl.List.focused ? "GridGroupSel" : "GridGroup")
Info         = a(ac)
border       = a(lb) xy(,-2) sz(p,2) bg("GridGroup")

;------------------- ParCtlUserReport.ApplicationUsage ----------

[ParCtlUserReport.ApplicationUsage]
@ = ext(1) [ParCtlUserReport_Navigator_WorkArea_PageT] subst(PeriodSwitch(subst(IsChange($ParCtlUserReport_TimeSingle_PeriodSwitch_OnChange) )) List([ParCtlUserReport_Navigator_WorkArea_ApplicationUsage_List]) ListActions([ParCtlUserReport_ApplicationUsage_List_Actions]) Stat([ParCtlUserReport_Navigator_WorkArea_ApplicationUsage_Stat]) )  h(24804)

[ParCtlUserReport_Navigator_WorkArea_ApplicationUsage_List]
@              = $ListToolbar alias(events.ParCtlEx.AppControl) refresh(100) ontimer(1000, updatedata())
Severity       = $ColSeverity
Application    = [Product_Events_Report_Application] text(f_ParCtlEx_GetAUAppName(p_User, AppID)) group(ParCtlEx_ApplicationUsage_Group, f_ParCtlEx_GetAUAppName(p_User, AppID), default) subst(PID(use(0)) CommandLine(use(0)) )
TimeUsage      = sz(150) text(timestamp(f_ParCtlEx_GetTimeUsage(StopTime, DateTime)))
AccessStatus   = sz(150) text(s_ParCtlEx_AU_Access(AccessStatus,Reason))
;Reason         = sz(150) text(capitalize(s_ParCtlEx_AU_Reason(Reason)))

[Grid.Groups]
ParCtlEx_ApplicationUsage_Group = [ParCtlEx_ApplicationUsage_Group]

[ParCtlEx_ApplicationUsage_Group]
@            = sz(p,30) mg(,,,2) rs(100,0) onaggrow(agg.AppID = AppID; if(!agg.Severity, agg.Severity = #eParCtlEx_SeverityInfo); if(agg.Severity > Severity, agg.Severity = Severity); if(StopTime != 0xFFFFFFFF, agg.GroupRunTime = agg.GroupRunTime + f_ParCtlEx_GetTimeUsage(StopTime, DateTime), agg.LastOpenedTime = DateTime))
Severity     = a(ac) xy(20) i(s_ParCtlEx_SeverityIcon(agg.Severity))
App          = a(ac) i(s_AppIcon(agg.AppID)) f(ctl.parent.selected && ctl.List.focused ? "GridGroupSel" : "GridGroup") text(val)
Info         = a(ac)
border       = a(lb) xy(,-2) sz(p,2) bg("GridGroup")

[ParCtlUserReport_ApplicationUsage_List_Actions]
$GetListSelAppID = (ctl.List.isNode ? ctl.List.agg.AppID : ctl.List.seldata().AppID)
@      = ext(1) sz(a,a) enable($GetListSelAppID)
AllowDeny  = [TB_Button] xy(0) enable($GetListSelAppID) subst(Icon(i(if( $GetListSelAppID && AppControl.Applications.find("AppID=="+toExpr($GetListSelAppID)).Blocked,s_Ico(#ICO_UNBLOCK_16),s_Ico(#ICO_BLOCK_16))))) onclick(var l_app; var l_appId; l_appId = $GetListSelAppID; l_app = AppControl.Applications.find("AppID=="+toExpr(l_appId), #vAdd, "AppID = " + l_appId + "; AppHash = filehash(f_AppInfo(" + l_appId + ").sImagePath); AppAlias = " + toExpr(AppName) + "; AddTime = utctime()"); l_app.Blocked = !l_app.Blocked)
Settings   = [TB_Button] enable($GetListSelAppID) subst(Icon(i( s_Ico(#ICO_PC_SETTING_16) ))) onclick(var p; var bFound; if(!(p=AppControl.Applications.find("AppID=="+toExpr($GetListSelAppID))), (p.serinit("AppControlAppSettings");p.AppID=$GetListSelAppID), bFound=true); if((l_DisableAppIDEdit=true;dialog("[AppUsage_Edit] alias(settings)",p_data(p))), if(!bFound, AppControl.Applications.find("AppID==" +toExpr(p.AppID), #vAdd ).sercopy(p)) );l_DisableAppIDEdit=false)

[ParCtlUserReport_Navigator_WorkArea_ApplicationUsage_Stat]
@         = alias(statex) prm("ParCtl:" + serid("AppControlReportStatistics")) ext(1) sz(p,a) mg(0,12,0,0)
Header    = a(lt) f("Header1") visible(Apps.size())
SubHeader = a(la) f("Description") xy(,7,,5) visible(Apps.size())
Data      = [ParCtlUserReport_Navigator_WorkArea_ApplicationUsage_Stat_Data] a(la) sz(p,110) rs(100,0) visible(Apps.size())

[ParCtlUserReport_Navigator_WorkArea_ApplicationUsage_Stat_Data]
Top3      = [ParCtlUserReport_Navigator_WorkArea_ApplicationUsage_Stat_Top3] xy(,6)
Chart     = [ParCtlUserReport_Navigator_WorkArea_ApplicationUsage_Chart]

[ParCtlUserReport_Navigator_WorkArea_ApplicationUsage_Stat_Top3]
@       = sz(a,a) rs(0,0) a(la) xy(,,10)
Top_1   = [ParCtlExReport_StatTopElem] visible(Apps.size() >= 1) subst(Legend(bg("Chart2")) Number(text("1. ")) Text(text(f_ParCtlEx_GetAUAppName(p_User, Apps.at(0).AppID))) Descr() )
Top_2   = [ParCtlExReport_StatTopElem] visible(Apps.size() >= 2) subst(Legend(bg("Chart3")) Number(text("2. ")) Text(text(f_ParCtlEx_GetAUAppName(p_User, Apps.at(1).AppID))) Descr() )
Top_3   = [ParCtlExReport_StatTopElem] visible(Apps.size() >= 3) subst(Legend(bg("Chart4")) Number(text("3. ")) Text(text(f_ParCtlEx_GetAUAppName(p_User, Apps.at(2).AppID))) Descr() )

[ParCtlUserReport_Navigator_WorkArea_ApplicationUsage_Chart]
@       = $ChartStat mg(20,20) a(as) sz(p,p) at(disable_auto_tt)
Plot    = t(chartplotarea)
AxisY   = $ChartStatAxisY -b()
AxisX   = $ChartStatAxisX xy(-5)
Top_1   = t(chartseries) visible(Apps.size() >= 1) mg(10) bg("Chart2") v(Apps.at(0).Duration) tt(s_TTApplicationUsage_Chart(Apps[0], p_User))
Top_2   = t(chartseries) visible(Apps.size() >= 2) mg(10) bg("Chart3") v(Apps.at(1).Duration) tt(s_TTApplicationUsage_Chart(Apps[1], p_User))
Top_3   = t(chartseries) visible(Apps.size() >= 3) mg(10) bg("Chart4") v(Apps.at(2).Duration) tt(s_TTApplicationUsage_Chart(Apps[2], p_User))

;--- ParCtlUserSettings_Navigator_WorkArea_InternetUsage --

[ParCtlUserSettings_Navigator_WorkArea_InternetUsage]
@              = ns(InternetControl) h(24096)
Header         = f("Header6KGreen")
Sep1           = a(sa) sz(p,1) xy(,7) b(Group)
Description    = a(la) xy(,8)

Knopka = $knopka
Enable  = $knopka_text text($Enable2)

;Enable         = $Check xy(,23) v(Enabled) f("Header0")
Sep2           = a(la) sz(p,1) xy(,25) b(Group)
WeekLimitCheck = $Check xy(,26) v(UseWeekTimeSpace) enable(Enabled)
WeekLimit      = a(la) xy(20,16) sz(462,180) t(weekplan) at($WeekPlanAttr) f("Normal") v(WeekTimeSpace) enable(UseWeekTimeSpace&&Enabled)
DayLimitCheck  = $Check xy(,40) v(UseDayTimeLimit) enable(Enabled)
DayLimit       = a(as) xy(7,-5) t(timeedit) sz(80,22) at(seconds, 24h, notz) v(DayTimeLimit) enable(UseDayTimeLimit&&Enabled)

;---- ParCtlUserSettings_Navigator_WorkArea_WebContent ----

[ParCtlUserSettings_Navigator_WorkArea_WebContent]
@           = ns(WebControl) h(24097)
Header      = f("Header6KGreen")
Sep1        = a(sa) sz(p,1) xy(,7) b(Group)
Description = a(la) xy(,8)

Knopka = $knopka
Enable  = $knopka_text text($Enable2)
SafeSearch  = [ParCtlUserSettings_Navigator_WorkArea_WebContent_SafeSeach] xy(,23) 

;Enable      = $Check xy(,11) v(Enabled) f("Header0")
Sep2        = a(la) sz(p,1) xy(,25) b(Group)
Header2     = f("Header3Lite") a(la) xy(,12) enable(Enabled)
Ext         = [ParCtlUserSettings_Navigator_WorkArea_WebContent_Ext] enable(Enabled) xy(,11)

[ParCtlUserSettings_Navigator_WorkArea_WebContent_Ext]
@                = a(la) sz(p,p) v(BlockOther)
BlockSpecified   = $Radio a(la) v(0)
Tab              = [ParCtlUserSettings_Navigator_WorkArea_WebContent_Tab] xy(20,11) enable(!BlockOther)
BlockOther       = $Radio a(la) v(1) xy(0,20)
OtherDescription = a(la) xy(20,7) i("warning") enable(BlockOther)
Exclusions       = t(button) sz(a,$Button_CY) mg(15,0,15,0) a(la) xy(,19) onclick(dialog("[WebContent_Exclusions_Edit] alias(settings)"))

[ParCtlUserSettings_Navigator_WorkArea_WebContent_SafeSeach]
@           = a(la) sz(p,a) ns(SafeSearch)
Enable      = $Check v(Enabled) f("Header0") 

[ParCtlUserSettings_Navigator_WorkArea_WebContent_Tab]
@          = a(la) sz(p,a) rs(100,0)
Categories = [ParCtlUserSettings_Navigator_WorkArea_WebContent_Tab_Categories] enable(!BlockOther)

[ParCtlUserSettings_Navigator_WorkArea_WebContent_Tab_Categories]
@            = sz(p,a)
Categories   = $Check v(SelectAll) xy(,,,3) onchange(if(ctl.value == 1, DenyCategoriesMask = #eParCtlCategoryAll))
Group        = [ParCtlUserSettings_Navigator_WorkArea_WebContent_Tab_Categories_Group]

[ParCtlUserSettings_Navigator_WorkArea_WebContent_Tab_Categories_Group]
@ = a(la) enable(!SelectAll) mg(20,0,0,0) sz(p,a)
L = [ParCtlUserSettings_Navigator_WorkArea_WebContent_Tab_Categories_Group_L] sz(a,a)
M = [ParCtlUserSettings_Navigator_WorkArea_WebContent_Tab_Categories_Group_M] xy(15) a(at) sz(a,a)
R = [ParCtlUserSettings_Navigator_WorkArea_WebContent_Tab_Categories_Group_R] xy(15) a(at) sz(p,a)

[ParCtlUserSettings_Navigator_WorkArea_WebContent_Tab_Categories_Group_L]
$SettCheck              = $Check at(singleline) xy(0,7)
DenyCategoryPorno       = $SettCheck text(capitalize($ParCtlCategoryPorno))       v(bmask(DenyCategoriesMask, #eParCtlCategoryPorno))
DenyCategorySoftware    = $SettCheck text(capitalize($ParCtlCategorySoftware))    v(bmask(DenyCategoriesMask, #eParCtlCategorySoftware))
DenyCategoryDrugs       = $SettCheck text(capitalize($ParCtlCategoryDrugs))       v(bmask(DenyCategoriesMask, #eParCtlCategoryDrugs))
DenyCategoryViolence	= $SettCheck text(capitalize($ParCtlCategoryViolence))    v(bmask(DenyCategoriesMask, #eParCtlCategoryViolence))
DenyCategoryUncens      = $SettCheck text(capitalize($ParCtlCategoryUncens))      v(bmask(DenyCategoriesMask, #eParCtlCategoryUncens))

[ParCtlUserSettings_Navigator_WorkArea_WebContent_Tab_Categories_Group_M]
$SettCheck              = $Check at(singleline) xy(0,7)
DenyCategoryWeapons     = $SettCheck text(capitalize($ParCtlCategoryWeapons))     v(bmask(DenyCategoriesMask, #eParCtlCategoryWeapons))
DenyCategoryGambling 	= $SettCheck text(capitalize($ParCtlCategoryGambling))    v(bmask(DenyCategoriesMask, #eParCtlCategoryGambling))
DenyCategoryWebMail     = $SettCheck text(capitalize($ParCtlCategoryWebMail))     v(bmask(DenyCategoriesMask, #eParCtlCategoryWebMail))
DenyCategoryShops       = $SettCheck text(capitalize($ParCtlCategoryShops))       v(bmask(DenyCategoriesMask, #eParCtlCategoryShops))
DenyCategorySocialNets	= $SettCheck text(capitalize($ParCtlCategorySocialNets))  v(bmask(DenyCategoriesMask, #eParCtlCategorySocialNets))

[ParCtlUserSettings_Navigator_WorkArea_WebContent_Tab_Categories_Group_R]
$SettCheck              = $Check at(singleline) xy(0,7)
DenyCategoryProxy       = $SettCheck text(capitalize($ParCtlCategoryProxy))       v(bmask(DenyCategoriesMask, #eParCtlCategoryProxy))
DenyCategoryCreditCards = $SettCheck text(capitalize($ParCtlCategoryCreditCards)) v(bmask(DenyCategoriesMask, #eParCtlCategoryCreditCards))
DenyCategoryChat        = $SettCheck text(capitalize($ParCtlCategoryChat))        v(bmask(DenyCategoriesMask, #eParCtlCategoryChat))
DenyCategoryCasualGames = $SettCheck text(capitalize($ParCtlCategoryCasualGames)) v(bmask(DenyCategoriesMask, #eParCtlCategoryCasualGames))

;----------ParCtlUserSettings_Navigator_WorkArea_Download--------------------

[ParCtlUserSettings_Navigator_WorkArea_Download]
@             = ns(FileDownloadControl) h(24098)
Header        = f("Header6KGreen")
Sep1          = a(sa) sz(p,1) xy(,7) b(Group)
Description   = a(la) xy(,8)

Knopka = $knopka
Enable  = $knopka_text text($Enable2)

;Enable        = $Check xy(,23) v(Enabled) f("Header0")
Sep2          = a(la) sz(p,1) xy(,25) b(Group)
Header2       = f("Header3Lite") a(la) xy(,13) enable(Enabled)
FileTypesList = [FileDownloadControl_File]

[FileDownloadControl_File]
@ = a(sa) sz(p,p) xy(,11) rs(100,0) b(System) enable(Enabled)
List    = [FileDownloadControl_FileTypesList] a(sa)
Toolbar = [Grid.Toolbar.Template] a(lt) b() t(listtoolbar) subst( Add(use(0)) Edit(use(0)) Delete(use(0)) \
AllowDeny(use(1) $TB_Btn subst(Icon(i(!ctl.parent.parent.List.seldata().Enabled? s_Ico(#ICO_BLOCK_16) : s_Ico(#ICO_UNBLOCK_16)))) onclick( edit( ((Enabled = !Enabled),true)) ) ) \
)

[FileDownloadControl_FileTypesList]
@ = $ListToolbar sz(p,p) alias(vector) v(Items) bg("White") at(noborder,singlesel) onshow(ctl.focus()) enable(FileDownloadControl.Enabled)
ItemName = sz(250,a) xy(8) v(Enabled) text(capitalize(s_ParCtlEx_FileCategory(Name)))
ItemState = sz(300,a) text(s_DownloadCategoryState(!Enabled)) f(!Enabled? "Normal_Green":"Normal_Red")

;----------ParCtlUserSettings_Navigator_WorkArea_SafeSearch--------------------

[ParCtlUserSettings_Navigator_WorkArea_SafeSearch]
@              = ns(SafeSearch) h(17633)
Header         = f("Header6Lite")
Sep1          = a(sa) sz(p,1) xy(,7) b(Group)
Description    = a(la) xy(,11)
Enable         = $Check xy(,17) v(Enabled) f("Header0KGreen")


;---- ParCtlUserSettings_Navigator_WorkArea_IM_Usage ----

[ParCtlUserSettings_Navigator_WorkArea_IM_Usage]
@           = ns(IMControl) h(24099)
Header      = f("Header6KGreen")
Sep1        = a(sa) sz(p,1) xy(,7) b(Group)
Description = a(la) xy(,8)

Knopka = $knopka
Enable  = $knopka_text text($Enable2)

;Enable      = $Check xy(,23) v(Enabled) f("Header0")
Attention   = a(la) xy(22,15) i("warning") ia(lt) f("KtsDescriptionDGrey")
Sep2        = a(la) sz(p,1) xy(,18) b(Group)
Header2     = f("Header3Lite") a(la) xy(,12) enable(Enabled)
Contacts    = [ParCtlUserSettings_Navigator_WorkArea_IM_Usage_Contacts] xy(,11,,29) enable(Enabled)
Other       = $Check a(lb) v(BlockOther) enable(Enabled)

[ParCtlUserSettings_Navigator_WorkArea_IM_Usage_Contacts]
@       = a(sa) sz(p,p) rs(100,0) b(System)
List    = [ParCtlUserSettings_Navigator_WorkArea_IM_Usage_Contacts_List]
Toolbar = [Grid.Toolbar.Template] a(lt) b() t(listtoolbar) subst( \
Add( onclick(add(dialog("IMControl_Edit"))) ) \
Edit( onclick( edit(dialog("IMControl_Edit")) ) ) \
AllowDeny( use(1) $TB_Btn subst(Icon(i(ctl.parent.parent.List.seldata().Blocked? s_Ico(#ICO_UNBLOCK_16) : s_Ico(#ICO_BLOCK_16) ))) onclick(edit(((Blocked = !Blocked),true))) ) \
)

[ParCtlUserSettings_Navigator_WorkArea_IM_Usage_Contacts_List]
@           = $ListToolbar a(la) at(noborder) alias(vector) v(Contacts) unique(Id==tolower(newItem.Id),(balloon("ImContactReplaced", p_imContactId(Id));true)) onchange(ctl.parent.updatedata())
Name        = sz(180) text(Id) sort(,sortup)
Action      = sz(90) text(s_Blocked(Blocked)) f(Blocked? "Normal_Red":"Normal_Green")
Description = sz(150) text(Name)

;---- ParCtlUserSettings_Navigator_WorkArea_SN_Usage ----

[ParCtlUserSettings_Navigator_WorkArea_SN_Usage]
@           = ns(SNControl) h(24100)
Header      = f("Header6KGreen")
Sep1        = a(sa) sz(p,1) xy(,7) b(Group)
Description = a(la) xy(,8)

Knopka = $knopka
Enable  = $knopka_text text($Enable2)

;Enable      = $Check xy(,23) v(Enabled) f("Header0")
Sep2        = a(la) sz(p,1) xy(,25) b(Group)
Header2     = f("Header3Lite") a(la) xy(,13) enable(Enabled)
Descr2      = a(la) xy(22,10,,5) i("warning") ia(lt) f("KtsDescriptionDGrey") enable(Enabled) visible(!Contacts.size())
Contacts    = [ParCtlUserSettings_Navigator_WorkArea_SN_Usage_Contacts] xy(,11,,29) enable(Enabled)
Other       = $Check a(lb) v(BlockOther) enable(Enabled)

[ParCtlUserSettings_Navigator_WorkArea_SN_Usage_Contacts]
@           = a(la) sz(p,p) rs(100,0) b(System)
List        = [ParCtlUserSettings_Navigator_WorkArea_SN_Usage_Contacts_List]
Toolbar = [Grid.Toolbar.Template] a(lt) b() t(listtoolbar) subst( \
Add( use(0) onclick(add(dialog("SNControl_Edit"))) ) \
Edit( onclick(edit(dialog("SNControl_Edit"))) ) \
AllowDeny( use(1) $TB_Btn subst(Icon(i(ctl.parent.parent.List.seldata().Blocked? s_Ico(#ICO_UNBLOCK_16) : s_Ico(#ICO_BLOCK_16) ))) onclick( edit(((Blocked = !Blocked),true)) ) ) \
)

[ParCtlUserSettings_Navigator_WorkArea_SN_Usage_Contacts_List]
@           = $ListToolbar a(la) at(noborder) alias(vector) v(Contacts) unique(Id==tolower(newItem.Id),(balloon("ImContactReplaced", p_imContactId(Id));true)) onchange(ctl.parent.updatedata())
Id          = sz(220) text(Id) sort(,sortup)
Name        = sz(130) text(Name)
Action      = sz(90) text(s_Blocked(Blocked)) f(Blocked? "Normal_Red":"Normal_Green")

;--- ParCtlUserSettings_Navigator_WorkArea_PersonalInfo ---

[ParCtlUserSettings_Navigator_WorkArea_PersonalInfo]
@           = ns(PersonalInfo) h(24101)
Header      = f("Header6KGreen")
Sep1        = a(sa) sz(p,1) xy(,7) b(Group)
Description = a(la) xy(,8)

Knopka = $knopka
Enable  = $knopka_text text($Enable2)

;Enable      = $Check xy(,23) v(Enabled) f("Header0")
Sep2        = a(la) sz(p,1) xy(,25) b(Group)
Header2     = f("Header3Lite") a(la) xy(,13) enable(Enabled)
Data        = [ParCtlUserSettings_Navigator_WorkArea_PersonalInfo_Data] enable(Enabled)

[ParCtlUserSettings_Navigator_WorkArea_PersonalInfo_Data]
@       = a(sa) sz(p,p) xy(,11) bg("TableBigHeader") rs(100,0) b(System)
List    = [ParCtlUserSettings_Navigator_WorkArea_PersonalInfo_List]
Toolbar = [Grid.Toolbar.Template] a(lt) b() t(listtoolbar) subst( \
Add(onclick(add(dialog("PersonalInfo_Edit")))) \
Edit(onclick(edit(dialog("PersonalInfo_Edit")))) \
)

[ParCtlUserSettings_Navigator_WorkArea_PersonalInfo_ToolBar]
@       = a(la) sz(p,30) rs(100,0)
Add     = a(lc) sz(a,a) xy(16) at(btnlike) i("listctrls,0") onclick(ctl.parent.parent.List.add(dialog("[PersonalInfo_Edit] alias(settings)")) )
Delete  = a(ac) sz(a,a) xy(16) at(btnlike) i("listctrls,2") onclick(ctl.parent.parent.List.delete() ) enable(ctl.parent.parent.List.seldata())
Change  = a(ac) sz(a,a) xy(16) at(btnlike) i("listctrls,1") onclick(ctl.parent.parent.List.edit(dialog("[PersonalInfo_Edit] alias(settings)")) ) enable(ctl.parent.parent.List.seldata())

[ParCtlUserSettings_Navigator_WorkArea_PersonalInfo_List]
@          = $ListToolbar at(noborder) alias(vector) v(Items) onchange(ctl.parent.updatedata()) unique(Name==newItem.Name,(balloon("PersonalInfoReplaced", p_infoName(Name));true))
Data       = text(Word) sort(,sortup)
Descr      = text(Name)

;--- ParCtlUserSettings_Navigator_WorkArea_Keywords ---

[ParCtlUserSettings_Navigator_WorkArea_Keywords]
@           = ns(Keywords) h(24102)
Header      = f("Header6KGreen")
Sep1        = a(sa) sz(p,1) xy(,7) b(Group)
Description = a(la) xy(,8)

Knopka = $knopka
Enable  = $knopka_text text($Enable2)

;Enable      = $Check xy(,23) v(Enabled) f("Header0")
Sep2        = a(la) sz(p,1) xy(,25) b(Group)
Header2     = f("Header3Lite") a(la) xy(,13) enable(Enabled)
Data        = [ParCtlUserSettings_Navigator_WorkArea_Keywords_Data] enable(Enabled)

[ParCtlUserSettings_Navigator_WorkArea_Keywords_Data]
@       = a(sa) sz(p,p) xy(,11) rs(100,0) b(System)
List    = [ParCtlUserSettings_Navigator_WorkArea_Keywords_List]
Toolbar = [Grid.Toolbar.Template] a(lt) b() t(listtoolbar) subst( \
Add(onclick(add(dialog("Keyword_Edit")))) \
Edit(onclick(edit(dialog("Keyword_Edit")))) \
)

[ParCtlUserSettings_Navigator_WorkArea_Keywords_List]
@          = $ListToolbar a(la) sz(p,p) at(noborder,noheader) alias(vector) v(Items) unique(Name==newItem.Name,(balloon("KeywordReplaced", p_keyword(Name));true))
Name       = text(Name) sort(,sortup)

;--- ParCtlUserSettings_Navigator_WorkArea_ComputerUsage --

[ParCtlUserSettings_Navigator_WorkArea_ComputerUsage]
@              = ns(ComputerControl) h(24094)
Header         = f("Header6KGreen")
Sep1           = a(sa) sz(p,1) xy(,7) b(Group)
Description    = a(la) xy(,8)

Knopka = $knopka
Enable  = $knopka_text text($Enable2)

;Enable         = $Check xy(,23) v(Enabled) f("Header0")
Sep2           = a(la) sz(p,1) xy(,25) b(Group)
WeekLimitCheck = $Check xy(,26) v(ScheduleLimit.Enabled) enable(Enabled)
WeekLimit      = a(la) xy(20,16) sz(462,180) t(weekplan) at($WeekPlanAttr) f("Normal") v(ScheduleLimit.WeekTimeSpace) enable(ScheduleLimit.Enabled&&Enabled)
DayLimitCheck  = $Check xy(,40) v(DayLimit.Enabled) enable(Enabled)
DayLimit       = a(as) t(timeedit) xy(7,-5) sz(80,22) at(seconds, 24h, notz) v(DayLimit.Daylimit) enable(DayLimit.Enabled&&Enabled)

;---- ParCtlUserSettings_Navigator_WorkArea_AppUsage ----

[ParCtlUserSettings_Navigator_WorkArea_AppUsage]
@           = ns(AppControl) h(24095)
Header      = f("Header6KGreen")
Sep1        = a(sa) sz(p,1) xy(,7) b(Group)
Description = a(la) xy(,8)

Knopka = $knopka
Enable  = $knopka_text text($Enable2)

;Enable      = $Check xy(,23) v(Enabled) f("Header0")
Sep2        = a(la) sz(p,1) xy(,25) b(Group)
Header2     = f("Header3Lite") a(la) xy(,13) enable(Enabled)
Apps        = [ParCtlUserSettings_Navigator_WorkArea_AppUsage_Apps] xy(,11) enable(Enabled)

[ParCtlUserSettings_Navigator_WorkArea_AppUsage_Apps]
@         = a(sa) sz(p,p) rs(100,0) b(System)
List      = [ParCtlUserSettings_Navigator_WorkArea_AppUsage_Apps_List]
Toolbar   = [Grid.Toolbar.Template] a(lt) b() t(listtoolbar) subst( \
Add(onclick( add(dialog("AppUsage_Edit")) )) \
AllowDeny(use(1) $TB_Btn subst(Icon(i(ctl.parent.List.seldata().Blocked? s_Ico(#ICO_UNBLOCK_16) : s_Ico(#ICO_BLOCK_16)))) onclick( edit((Blocked = !Blocked, true) ) )) \
Edit( onclick(edit(dialog("AppUsage_Edit")) )) \
)

[ParCtlUserSettings_Navigator_WorkArea_AppUsage_Apps_List]
$GetAppUsageStatus = if(Blocked, 0, if( DayLimit.Enabled||ScheduleLimit.Enabled, 2,1) )
$GetAppUsageStatusFont = if(Blocked, "Normal_Red", if( DayLimit.Enabled||ScheduleLimit.Enabled, "Normal_Yellow","Normal_Green") )
@           = $ListToolbar alias(vector) v(Applications) unique(AppID == newItem.AppID,(balloon("ApplicationReplaced",p_appId(AppID));true)) onchange1(ctl.parent.updatedata())
AppName     = sz(220) text($AppName)
Action      = sz(160) text(s_AppUsageText($GetAppUsageStatus)) f($GetAppUsageStatusFont)

;---- ParCtlUserSettings_Navigator_WorkArea_AddView ----

[ParCtlUserSettings_Navigator_WorkArea_AddView]
@                = h(24104)
Header           = f("Header6KGreen")
Sep1             = a(sa) sz(p,1) xy(,7) b(Group)
Description      = a(la) xy(,8)
;Enable           = $Check xy(,23) v(Enabled) f("Header0")

; кнопка с текстом
Knopka = $knopka
Enable  = $knopka_text text($Enable2)

Sep2             = a(la) sz(p,1) xy(,25) b(Group)
UserAliasGroup   = f("Header3Lite") a(la) xy(,13)
AliasName        = t(edit) a(la) sz(250,a) xy(,7) v(strAlias) onok(if(strAlias && f_ParCtlEx_IsUserAliasDuplicate(p_User,strAlias),(balloon("UserAliasAlreadyInUse");false),true))
UserAvatarGroup  = f("Header3Lite") a(la) xy(,23)
UserAvatar       = [ParCtlUserSettings_Navigator_WorkArea_AddView_UserAvatar] a(la) xy(,12)
ImportExportDesc = f("Header3Lite") a(la) xy(,28)
Export           = $Button_Large a(la) xy(,14) onclick(if(browsefilesave(l_SaveFilePath, $BrowseForConfig, "pctl"), (f_IfErrThenMsg(cfgParCtrlSave(l_SaveFilePath, p_User, ser(p_User)), "SettingsOperationError");true)))
Import           = $Button_Large a(as) xy(10) onclick( if(dialog("ImportUserSettingsDialog", p_data(users.find("UserId=="+toExpr(p_User))) ),(ctl.top.updatedata(),true) ))

[ParCtlUserSettings_Navigator_WorkArea_AddView_UserAvatar]
@           = sz(a,a) at(enum) v(strAvatarId)
Father      = [ParCtlUserSettings_Navigator_WorkArea_AddView_UserAvatar_ItemT]
Mother      = [ParCtlUserSettings_Navigator_WorkArea_AddView_UserAvatar_ItemT]
SonMajor    = [ParCtlUserSettings_Navigator_WorkArea_AddView_UserAvatar_ItemT]
DotherMajor = [ParCtlUserSettings_Navigator_WorkArea_AddView_UserAvatar_ItemT]
SonMinor    = [ParCtlUserSettings_Navigator_WorkArea_AddView_UserAvatar_ItemT]
DotherMinor = [ParCtlUserSettings_Navigator_WorkArea_AddView_UserAvatar_ItemT]

[ParCtlUserSettings_Navigator_WorkArea_AddView_UserAvatar_ItemT]
@      = at(radiolike) sz(a,a) a(at) xy(,,7)
Icon   = sz(a,a) xy(2,2,2,2) i(s_ParCtlEx_UserAvatarId2Image(ctl.parent.id))
Sel    = b(Group) sz(p,p) visible(ctl.parent.selected || ctl.parent.hotlight)

;------------- ParCtl_BWUrl_Edit ------------------

[ParCtl_BWUrl_Edit]
@  = [StyledWindowT_Small] at(dragable,a_ok,a_cancel) subst( BodyEx( [ParCtl_BWUrl_Edit_Body] ) ) sz(350,a) btns(Ok(enable(ctl.Name.value))) h(24735)

[ParCtl_BWUrl_Edit_Body]
@       = sz(p,a)
Name    = t(edit) sz(p,a) v(Name) extprm(1)
Example = sz(a,a) a(la) xy(,7) f("Normal_Grey")
Blocked = t(check) sz(a,a) a(la) xy(,10) v(Blocked) extprm(1)

;------------------- WebContent_Exclusions_Edit -----------------------

[WebContent_Exclusions_Edit]
@  = [StyledWindowT] at(dragable,a_ok,a_cancel) subst( BodyEx( [WebContent_Exclusions_Edit_Body] ) ) sz(560,a) h(24734)

[WebContent_Exclusions_Edit_Body]
@           = sz(p,a) mg(7,7,7,7)
Header      = a(la) xy(,7) f("Header3Lite")
Sep1        = a(sa) sz(p,1) xy(,7) b(Group)
Description = a(la) xy(,11)
BWList      = [WebContent_Exclusions_Edit_Body_BWList] xy(,13)

[WebContent_Exclusions_Edit_Body_BWList]
@       = a(sa) sz(p,a) rs(100,0) b(System)
List    = [WebContent_Exclusions_Edit_Body_BWList_List]
Toolbar = [Grid.Toolbar.Template] a(lt) b() t(listtoolbar) subst( \
Add( onclick(add(dialog("ParCtl_BWUrl_Edit"))) ) \
Edit( onclick(edit(dialog("ParCtl_BWUrl_Edit"))) ) \
AllowDeny(use(1) $TB_Btn subst(Icon(i(ctl.parent.List.seldata().Blocked? s_Ico(#ICO_UNBLOCK_16) : s_Ico(#ICO_BLOCK_16)))) onclick( edit((Blocked = !Blocked, true) ) )) \
)

[WebContent_Exclusions_Edit_Body_BWList_List]
@         = $ListToolbar sz(p,300) at(noborder) alias(vector) v(BlackWhiteList) unique(Name==newItem.Name,(balloon("WebURLReplaced", p_url(Name));true)) onchange1(ctl.parent.updatedata())
URL       = sz(250) text(Name) sort(,sortup)
Status    = sz(100) text(s_Blocked(Blocked)) f(Blocked? "Normal_Red":"Normal_Green")

;------------------- AppUsage_Edit -----------------------

[AppUsage_Edit]
@  = [StyledWindowT] at(dragable,a_ok,a_cancel) subst( BodyEx( [AppUsage_Edit_Body] ) ) sz(560,a) oninit(AppAlias=$AppName) btns(Ok(enable(ctl.AppPath.value && AppAlias))) onapply(AppID = moduleAppId(ctl.AppPath.value); AppHash = filehash(ctl.AppPath.value); AddTime = utctime(); true) h(24725)

[AppUsage_Edit_Body]
$crossBrowseApp = ( $IsKAV ? browseapp(ctl.AppPath.value) : browseappex(ctl.AppPath.value) )
; ----
$parOnCl_Cond_0 = AppID = moduleAppId(ctl.AppPath.value)
$parOnCl_Cond_1 = if( isUncontrolledApp(AppID), ctl.AppPath.balloon("AppNotControlled") )
$parOnCl_Cond_2 = AppAlias = $AppName; updatedata()
$parOnCl        = if( $crossBrowseApp, ($parOnCl_Cond_0; $parOnCl_Cond_1; $parOnCl_Cond_1) )
; ----
@              = sz(p,a) mg(7,7,7,7)
AppLabel       = a(la) f("Header3Lite")
AppButton      = $Button_Medium a(ra) xy(,5) enable(!l_DisableAppIDEdit) onclick( $parOnCl )
AppPath        = t(edit) a(ps) xy(3,2) sz(p,a) oninit(ctl.value = f_AppInfo(AppID).sImagePath) at(readonly) onok(if(isUncontrolledApp(AppID),(balloon("AppNotControlled");false),true))
AllowDeny      = [AppUsage_Edit_Body_AllowDeny] xy(,13)
TimeTable      = [AppUsage_Edit_Body_TimeTable] xy(,16)

[AppUsage_Edit_Body_AllowDeny]
@     = a(la) sz(p,a) v(Blocked)
Deny  = $Radio v(1) 
Allow = $Radio v(0) xy(,11)

[AppUsage_Edit_Body_TimeTable]
@              = a(la) sz(p,a) mg(14,19,14,15) enable(!Blocked)
LogAppEvents   = $Check v(Logging) enable(!(ScheduleLimit.Enabled||DayLimit.Enabled))
WeekLimitCheck = $Check xy(,15) v(ScheduleLimit.Enabled) onchange(if(DayLimit.Enabled|ScheduleLimit.Enabled,Logging=1, ctl.LogAppEvents.enabled=1))
WeekLimit      = t(weekplan) a(la) xy(20,18) sz(462,180) at($WeekPlanAttr) f("Normal") v(ScheduleLimit.WeekTimeSpace) enable(ScheduleLimit.Enabled)
DayLimitCheck  = $Check xy(,33) v(DayLimit.Enabled) onchange(if(DayLimit.Enabled|ScheduleLimit.Enabled,Logging=1, ctl.LogAppEvents.enabled=1))
DayLimit       = a(as) xy(10,-5) t(timeedit) sz(80,22) at(seconds, 24h, notz) v(DayLimit.Daylimit) enable(DayLimit.Enabled)

;------------------- IMControl_Edit -----------------------

[IMControl_Edit]
@  = [StyledWindowT_Small] at(dragable,a_ok,a_cancel) subst( BodyEx( [IMControl_Edit_Body] ) ) sz(350,a) h(24721) btns(Ok(enable(!(Id==""))))

[IMControl_Edit_Body]
@            = sz(p,a)
Description  = a(la)
AddressLabel = a(la) xy(,7) f("Normal_Bold")
Address      = t(edit) a(la) xy(,7) sz(p,a) v(Id)
AllowDeny    = t(check) a(la) xy(,7) f("Normal_Bold") v(Blocked)
DescrLabel   = a(la) xy(,7) f("Normal_Bold")
Title        = t(edit) a(la) xy(,7) sz(p,a) v(Name) 

;------------------- SNControl_Edit -----------------------

[SNControl_Edit]
@  = [StyledWindowT_Small] at(dragable,a_ok,a_cancel) subst( BodyEx( [SNControl_Edit_Body] ) ) sz(350,a) h(24723) btns(Ok(enable(!(Id==""))))

[SNControl_Edit_Body]
@            = sz(p,a)
Description  = a(la)
IdLabel      = a(la) xy(,7) f("Normal_Bold")
Id           = t(edit) a(la) xy(,7) sz(p,a) v(Id)
AliasLabel   = a(la) xy(,7) f("Normal_Bold")
Alias        = t(edit) a(la) xy(,7) sz(p,a) v(Name)
AllowDeny    = t(check) a(la) xy(,7) f("Normal_Bold") v(Blocked)


;----------------- PersonalInfo_Edit ----------------------

[PersonalInfo_Edit]
@  = [StyledWindowT_Small] at(dragable,a_ok,a_cancel) subst( BodyEx( [PersonalInfo_Edit_Body] ) ) sz(350,a) h(24722) btns(Ok(enable((!(Word==""))&&(!(Name=="")))))

[PersonalInfo_Edit_Body]
@              = sz(p,a)
Description    = a(la)
AddressLabel   = a(la) xy(,7) f("Normal_Bold")
Address        = t(edit) a(la) xy(,7) sz(p,a) v(Word)
DescrLabel     = a(la) xy(,7) f("Normal_Bold")
Content        = t(edit) a(la) xy(,7) sz(p,a) v(Name)

;----------------- Keyword_Edit ----------------------

[Keyword_Edit]
@  = [StyledWindowT_Small] at(dragable,a_ok,a_cancel) subst( BodyEx( [Keyword_Edit_Body] ) ) sz(350,a) h(24733) btns(Ok(enable(!(Name==""))))

[Keyword_Edit_Body]
@           = sz(p,a)
Description = a(la)
NameLabel   = a(la) xy(,7) f("Normal_Bold")
Name        = t(edit) a(la) xy(,7) sz(p,a) v(Name)

;----------------- shared window footer for next two windows ----------------------

[ParCtlEx_TerminateTimeoutWindow_Footer]
@       = a(lb) sz(p,$DialogPanelSizeY)
panel   = [DialogPanel] subst(BtnsGroup(use(0)) Bckgnd(bg(f_IsTimeCriticalPeriod(TerminateTime) ? "DlgFooterYellow" : "DlgFooter")) )
Close   = [BtnGlass] a(rb) xy($Button_Shift,$Button_Shift) onclick(close())

[ParCtlEx_AppTerminateTimeoutWindow_Footer]
@       = a(lb) sz(p,$DialogPanelSizeY)
panel   = [DialogPanel] subst(BtnsGroup(use(0)) Bckgnd(bg("DlgFooterYellow")) )
Close   = [BtnGlass] a(rb) xy($Button_Shift,$Button_Shift) onclick(close())

[ParCtlEx_AppCloseTimeoutWindow_Footer]
@       = a(lb) sz(p,$DialogPanelSizeY)
panel   = [DialogPanel] subst(BtnsGroup(use(0)) Bckgnd(bg("DlgFooter")) )
Close   = [BtnGlass] a(rb) xy($Button_Shift,$Button_Shift) onclick(close())

;----------------- ParCtlEx_AppCloseTimeoutWindow ----------------------

[ParCtlEx_AppCloseTimeoutWindow]
$attr = dragable,a_close,alwaysontop,noautofocus,customfooter,nohelp
;---
@  = [StyledWindowT_Small] at($attr) subst( Footer( [ParCtlEx_AppCloseTimeoutWindow_Footer] ) BodyEx( [ParCtlEx_AppCloseTimeoutWindow_Body] ) ) sz(420,a) ns(p_data) h(20865) ontimer(100, updatedata() )

[ParCtlEx_AppCloseTimeoutWindow_Body]
@					= $DlgBodyAttr sz(p,a) a(lt) mg(20,10) ext(1)
AppInfo             = [ParCtlEx_AppInfoBlock] xy(5,0) extprm(1)
WarningText         = [ParCtlEx_AppWarnBlock] a(sa) xy(,7)
Bottom              = [ParCtlEx_App_Bottom] a(la) sz(p,a)

[ParCtlEx_App_Bottom]
Sep                 = sz(p,1) b(Group) a(la) xy(5,15)
WarningText         = [ParCtlEx_AppDescBlock] a(la) xy(50,7)

[ParCtlEx_AppInfoBlock]
@ = sz(p,a) mg(0,0,0,0) ext(1)
AppIcon				= sz(a,a) a(lt) xy(5,5) i(mergeIcon(getIcon(f_AppInfo(AppID).sImagePath,"unkobj",1),"IconLimit,2"))
AppNameDesc			= sz(a,a) a(lt) at(singleline) xy(50, 10)
AppName				= sz(p,a) a(as) at(singleline) text($AppName) xy(,-1) f("Header1") 
AppPublisherDesc	= sz(a,a) a(lt) at(singleline) xy(50, 25)
AppPublisher		= sz(p,a) a(as) at(singleline) text($AppVendor)

[ParCtlEx_AppWarnBlock]
@ = sz(p,a)
Descr				= f("Header1") a(la) xy(50,15)
TerminateTimeout	= f("Header3") text(var cur_time; cur_time = utctime(); timestamp(if(depend(CloseTime) > cur_time, depend(CloseTime) - cur_time, 0))) a(sa) xy(,7)

[ParCtlEx_AppDescBlock]
@ = sz(p,a)
NotifyText          = f("KtsDescriptionGrey") a(la) xy(,7)

;----------------- ParCtlEx_AppTerminateTimeoutWindow -----------------

[ParCtlEx_AppTerminateTimeoutWindow]
$attr = dragable,a_close,alwaysontop,noautofocus,customfooter,nohelp
@     = [StyledWindowT_Small] at($attr) subst( Footer([ParCtlEx_AppTerminateTimeoutWindow_Footer]) BodyEx( [ParCtlEx_AppTerminateTimeoutWindow_Body] ) ) sz(420,a) ns(p_data) h(20865) ontimer(30000,parctl_close_app(p_data))

[ParCtlEx_AppTerminateTimeoutWindow_Body]
@           = $DlgBodyAttr sz(p,a) mg(20,10) ext(1)
AppInfo     = [ParCtlEx_AppInfoBlock] a(lt) extprm(1)
ClosureText = a(la) xy(50,23) f("Normal9")
Bottom      = [ParCtlEx_App_Bottom] a(la) sz(p,a)

;----------------- ParCtlEx_QuitAppCloseGuiWarningWindow -----------------

[ParCtlEx_QuitAppCloseGuiWarningWindow]
$attr = dragable,a_close,alwaysontop,noautofocus,customfooter,nohelp
@     = [StyledWindowT_Small] at($attr) subst( Footer([ParCtlEx_AppTerminateTimeoutWindow_Footer]) BodyEx( [ParCtlEx_QuitAppCloseGuiWarningWindow_Body] ) ) sz(420,a) ns(p_data) h(20865) 

[ParCtlEx_QuitAppCloseGuiWarningWindow_Body]
@            = $DlgBodyAttr sz(p,a) mg(20,10) ext(1)
AppInfo      = [ParCtlEx_AppInfoBlock] a(lt) extprm(1)
ClosureText  = a(la) xy(50,23) f("Normal10")
ClosureText2 = a(sa) f("Normal10_Bold")
Bottom       = [ParCtlEx_QuitApp_Bottom] a(la) sz(p,a)

[ParCtlEx_QuitApp_Bottom]
Sep         = sz(p,1) b(Group) a(la) xy(5,15)
WarningText = [ParCtlEx_QuitAppDescBlock] a(la) xy(50,7)

[ParCtlEx_QuitAppDescBlock]
@           = sz(p,a)
NotifyText  = f("KtsDescriptionGrey") a(la) xy(,7)

;----------------- ParCtlEx_InternetTerminateTimeoutWindow ----------------------

[ParCtlEx_InternetTerminateTimeoutWindow]
$attr = dragable,a_close,alwaysontop,noautofocus,customfooter,nohelp
@     = [StyledWindowT_Small] at($attr) subst( Footer([ParCtlEx_TerminateTimeoutWindow_Footer])  BodyEx( [ParCtlEx_InternetTerminateTimeoutWindow_Body] ) ) sz(420,a) ns(p_data) h(21342) ontimer(100, updatedata(); if(TerminateTime <= utctime(), close()))

[ParCtlEx_InternetTerminateTimeoutWindow_Body]
@			  = $DlgBodyAttr sz(p,a) a(lt) mg(20,20,10,20) ext(1)
WarningText   = [ParCtlEx_InternetWarnBlock] a(sa)
Sep           = sz(p,1) b(Group) a(sa) xy(50,15)
WarningText   = [ParCtlEx_InternetDescBlock] a(sa)

[ParCtlEx_InternetWarnBlock]
@ = sz(p,a) mg(0,0,0,0) ext(1)
Icon				= sz(a,a) a(lt) xy(0,0) i("IconLimit,1")
Descr				= sz(a,a) a(lt) xy(50,0) f("Normal9")
TerminateTimeout	= sz(a,a) a(lt) xy(50,15) f("Header3") text(timestamp(depend(TerminateTime) - utctime())) a(sa) xy(,7)

[ParCtlEx_InternetDescBlock]
@ = sz(p,a)
NotifyText          = f("KtsDescriptionGrey") a(la) xy(,7)

;----------------- ParCtlEx_ComputerTerminateTimeoutWindow ----------------------

[ParCtlEx_ComputerTerminateTimeoutWindow]
$attr = dragable,a_close,alwaysontop,noautofocus,customfooter,nohelp
@     = [StyledWindowT_Small] at($attr) subst( Footer([ParCtlEx_TerminateTimeoutWindow_Footer]) BodyEx( [ParCtlEx_ComputerTerminateTimeoutWindow_Body] ) ) sz(420,a) ns(p_data) h(21344) ontimer(100, updatedata(); if(TerminateTime <= utctime(), close()))

[ParCtlEx_ComputerTerminateTimeoutWindow_Body]
@             = sz(p,200) a(lt) alias(taskview) ns(ParCtl) mg(20,20,10,20)
AppInfo       = [ParCtlEx_CpuInfoBlock] a(lt) xy(0,0) extprm(1)
;;;WarningText   = [ParCtlEx_CpuWarnBlock] a(sa) xy(,7)
Sep           = sz(300,1) b(Group) a(sa) xy(65,15)
WarningText   = [ParCtlEx_AppDescBlock] a(sa) xy(,7)
ParCtlStop   = t(hotlink) sz(300,30) mg(10,10,10,10) a(sa) xy(,15) f("Header0Lite") i("ParCtlOptionsIcon,2") bg(ctl.hotlight ? "HilightBtn" : "") onclick(if(checkPassword(#pwdc_OpenParctl,"ParCtl"),  (users.find("UserId=="+toExpr(p_User)).settings.Enabled = 0,ctl.close()) ))

[ParCtlEx_CpuInfoBlock]
@ = sz(p,a) mg(0,0,0,0) ext(1)
CpuIcon				= sz(a,a) a(lt) xy(10,10) i("IconLimit,0")
CpuUsageDesc		= sz(a,a) a(lt) f("Header1") xy(65,10)
TerminateTimeout	= f("Header3") text(timestamp(depend(TerminateTime) - utctime())) a(sa) xy(,7)

[ParCtlEx_CpuWarnBlock]
@ = sz(p,a) a(as) xy(,15)
Descr				= f("Description") a(ct) xy(15,5)
CpuUser				= sz(a,a) a(as) text(f_UserNameSystem(UserId)) f("Header1")

; ----------------------   ImportUserSettingsDialog   ------------------------------

[ImportUserSettingsDialog]
$ex1 = ( f_IfErrThenMsg(cfgParCtrlLoad(l_LoadFilePath,UserId,ser(UserId)),"SettingsLoadError") )
$ex2 = (  $cnd_if_1; $cnd_if_2 )
$cnd_if_1 = if(ctl.Buttons.RadioButtons.value==1,( if(l_SelectedSettings,(ser(UserId).settings=l_SelectedSettings;updatedata();true))))
$cnd_if_2 = if(ctl.Buttons.RadioButtons.value==2,( f_IfErrThenMsg(cfgParCtrlLoadTemplate(l_SelectedTemplate), "SettingsLoadError");updatedata();true))
$defOnOk = if(ctl.Buttons.RadioButtons.value==0, $ex1, $ex2)
; ---
@  = [StyledWindowT_Small] at(dragable,a_ok,a_cancel) subst( BodyEx( [ImportUserSettingsDialog_Body] ) ) sz(440,a) mg(0) ns(p_data) onok($defOnOk) h(24720)

[ImportUserSettingsDialog_Body]
Header  = [ImportUserSettingsDialogHeader]      
Buttons = [ImportUserSettingsDialogButtonsArea]

[ImportUserSettingsDialogHeader]
@ = a(lt) sz(p, a) xy(1,1) bg("White")
Icon     = sz(a,a) i() i(s_ParCtlEx_UserAvatarId2Image(f_ParCtlEx_GetUserAvatar(UserId)))
HdrDescr = [ImportUserSettingsDialogHeader_HdrDescr]

[ImportUserSettingsDialogHeader_HdrDescr]
@ = a(as) sz(p,p) xy(10)
ImportSettingsMsg = a(lt) sz(p,a) at(singleline) a(lt) f("Header2")
Description = a(sa) xy(,5) f("DescriptionGrey")

[ImportUserSettingsDialogButtonsArea]
@            = a(sa) sz(p,a) xy(,12) bg("White")
ImportSource =  a(lt) sz(a,a) f("Header0")
RadioButtons = [ImportUserSettingsDialogButtonsAreaRadioButtons]

[ImportUserSettingsDialogButtonsAreaRadioButtons]
@              = a(sa) sz(p,a) at(enum) oninit(l_CurrentId=UserId)
ImportFromFile = $Radio a(sa) xy(,13) v(0)
Button = [BtnGlass] a(ra) xy(0,7) enable(ctl.parent.value==0) onclick(if(browsefileopen(l_LoadFilePath, $BrowseForConfig, "pctl"),true))
Edit = t(edit) sz(p,a) a(ps) xy(10,2,20) enable(ctl.parent.value==0) v(l_LoadFilePath) at(readonly)
;
ImportFromUser     = $Radio a(la) xy(,17) v(1)
UserListCombo = t(combo) a(rs) xy(,-3,20,5) enable(ctl.parent.value==1) at(sorted) sz(200,a) items(vector(users) v(UserId) text(if( (UserId!=".DEFAULT"&&UserId!=".CHILD"&&UserId!=".TEENAGER")&&(UserId!=l_CurrentId), f_UserName(UserId)))) onchange(l_SelectedSettings=users.ser().findSettingsUserAccount(ctl.value).settings)
ImportFromTemplate = $Radio a(la) xy(,13) v(2)
TemplateListCombo = t(combo) a(rs) xy(,-3,20,0) enable(ctl.parent.value==2) sz(200,a) [ImportTemlates] v(l_SelectedTemplate)
; items(vector(users) v(UserId) text(if( (UserId!=".DEFAULT"&&UserId!=".CHILD"&&UserId!=".TEENAGER")&&(UserId!=l_CurrentId), f_UserName(UserId)))) onchange(l_SelectedSettings=users.ser().findSettingsUserAccount(ctl.value).settings)

[ImportTemlates]
0   = v(0)
1   = v(1)

; ----------------------   BrowseInstalledSoftwareDialog   ------------------------------

[BrowseInstalledSoftwareDialog]
@  = [StyledWindowT] at(dragable,resizable,a_ok,a_cancel) subst( BodyEx( [BrowseInstalledSoftwareDialog_Body] ) ) sz(550,300) mg(0) at(resizable) rs(100,100) btns(Ok(enable(Name))) h(24732)

[BrowseInstalledSoftwareDialog_Body]
@      = sz(p,p) a(lt) mg(10,10,10,10)
Desc   = [BrowseInstalledSoftwareDialog_Desc] a(sa)
Files  = [BrowseInstalledSoftwareDialog_Files] a(sa)

[BrowseInstalledSoftwareDialog_Desc]
@      = sz(p,a)
Desc   = sz(a,a) a(lt) f("Description")
Filter = sz(200) a(rt) t(edit) onchange(if(ctl.value,ctl.List.setfilter("wildcard(" + toExpr("*" + ctl.value + "*") + ", ctl.List.rowdatatext(), 3)", 100), ctl.List.setfilter("",100)))

[BrowseInstalledSoftwareDialog_Files]
@       = a(sa) sz(p,p) xy(,11) bg("TableBigHeader") rs(100,0) b(System)
Sep     = a(sa) sz(p,1) b(Group)
L       = [BrowseInstalledSoftwareDialog_List] a(sa)

[BrowseInstalledSoftwareDialog_List]
@ = at(enum) v(Name) sz(p,p)
List = [BrowseInstalledSoftwareDialog_ProgsListI] visible(true) id(Rating.ModuleInfo.sImagePath)

[BrowseInstalledSoftwareDialog_ProgsListI]
$displayName = (Id == #AppIdProduct ? $ProductName : f_AppNameEx(Rating.ModuleInfo))
@ = $List alias(vector.AllPrograms) at(sorted,rememberdata,singlesel,noborder) v(Applications) 
;Program = [Programs_Program] text($displayName) i(s_AppIcon(Id)) sort(tolower($displayName)) 
Program  = sz(200) text($displayName) i(s_AppIcon(Id)) sort(tolower($displayName))  group(AppProgramm, Rating.ModuleInfo.sVendor, default)
Vendor   = sz(200) text(s_filterEmptyText(Rating.ModuleInfo.sVendor))
FilePath = sz(200) text(s_filterEmptyText(Rating.ModuleInfo.sImagePath))
;Tmp      = sz(200) text("111")
;Parents = text(if(GroupInfo.Parents.size(),GroupInfo.Parents.format("objfile(f_AppInfo(e).sImagePath)", " > ") + " > " + objfile(Rating.ModuleInfo.sImagePath)))
;Status  = [Programs_AllList_Status] i(mergeIcon(s_AppStatusIcon(HipsTask.state), GroupInfo.ByUser ? "Proc_status_owner,0,cc" : "Proc_status_owner,1,cc")) f(s_IsStateRunning(depend(HipsTask.state)) ? "Hotlink_Normal" : "Normal") at(clickable) text(f_AppStatusName(GroupInfo)) tt(f_AppStatusDetails(GroupInfo)) onclick(if(s_IsStateRunning(HipsTask.state),menu("ApplicationStatusMenu"))) onrclick(menu("Programs_AllList_Menu"))
;LastRun = [Programs_LastRun] a(r) text(s_date(dategroup(ExecuteInfo.nLastExecuteTime)))
;row     = at(clickable) onrclick(menu("Programs_AllList_Menu"))
;views   = [Programs_AllList.Views]


[BrowseInstalledSoftwareDialog_Object]
@ = sz(p,a) mg(10,10,10,10)
Desc   = sz(a,a) a(lt) f("Header1")
Object = t(edit) at(readonly) v(Name) sz(p,a) a(sa) xy(,7)

; ----------------------  ParctlFirstStartDialog  ------------------------------

[ParctlFirstStartDialog]
@ = [StyledWindowT_Small]  at(dragable,a_close) subst( BodyEx( [ParctlFirstStartDialog_BodyEx] )) sz(450,a) h(25659)

[ParctlFirstStartDialog_BodyEx]
; BackupDialogHeader - блок не существует
;Header     = [BackupDialogHeader] subst(Title() Descr())
Body       = [ParctlFirstStartDialog.Body]

[ParctlFirstStartDialog.Body]
@          = a(la) sz(p,a) mg(15,15,15,15)
Descr      = a(la) f("KtsDescriptionDGrey")
Create     = [WizardButton] a(la) sz(p,a) xy(,10) subst(Name(f("KtsHeader1Green") xy(,1)) Descr(use(0))) onclick(if(dialog("[PasswordEdit] subst(Sett(subst(ParentalContlrol(oninit(AskForParCtl=1;AskWhenExitApp=1;AskWhenSaveSetting=1;ctl.enabled=0)))))", p_new(true)),close(#m_res_ok)))
DoNotShow  = a(la) t(check) xy(,30) f("KtsDescriptionDGrey") onchange(productData("DisableParctlNoPasswordDialog") = ctl.value ? "1" : "")

;--------------------------------------------------------
[ParCtlMainWindow.Label]
@     = ext(1) at(btnlike) sz(a,26)
Bg    = a(lc) sz(p,p) bg(ctl.parent.selected ? "KtsToolbarButtonBg,1"    : ctl.parent.hotlight ? "KtsToolbarButtonBg,0"    : "") xy(5,,5)
Left  = a(lc) sz(5,p) bg(ctl.parent.selected ? "KtsToolbarButtonLeft,1"  : ctl.parent.hotlight ? "KtsToolbarButtonLeft,0"  : "")
Icon  = a(ac) extprm(1)
Label = a(ac) f("KtsToolbarLink") extprm(1)
Right = a(ac) sz(5,p) bg(ctl.parent.selected ? "KtsToolbarButtonRight,1" : ctl.parent.hotlight ? "KtsToolbarButtonRight,0" : "")

;---------------------------------------------------------
;---------------------------------------------------------
;---------------------------------------------------------
[ParCtlRepSettMainWindow]
@ = [StyledWindowT]  at(a_ok,a_apply,a_cancel,resizable,minimizable) sz(790,556) alias(taskedit) onapply(f_IfErrThenMsg(savesettings(), "SettingsOperationError") ) subst( Body( a(lt) -xy() -bg() ) BodyEx( [ParCtlRepSettMainWindow_BodyEx] ) ) ns(ParCtl) oninit() h(17402)

[ParCtlRepSettMainWindow_BodyEx]
@            = sz(p,p) a(lt)
Bdy          = [ParCtlRepSettMainWindow_Body]
PersonalInfo = [ParCtlRepSettMainWindow_PersonalInfo]

[ParCtlRepSettMainWindow_PersonalInfo]
@            = a(lt) sz(a,a) xy(23,46)
Icon         = a(lt) sz(a,a) i(s_ParCtlEx_UserAvatarId2Image(f_ParCtlEx_GetUserAvatar(p_User))) enable(users.find("UserId=="+toExpr(p_User)).settings.Enabled)
Name         = a(ac	) sz(130,a) xy(10) f("Header6KGreen") text(f_UserName(p_User)) enable(users.find("UserId=="+toExpr(p_User)).settings.Enabled)

[ParCtlRepSettMainWindow_Body]
@           = $DlgBodyAttr a(lt) alias(navigator2) pages(WorkArea) suffix(MainWnd)
Navigator   = [ParCtlRepSettMainWindow_Body_Navigator] xy(,6)
WorkArea    = a(lt) sz(p,p) $dlg_body_xy  rs(100,100) bg("ColorWindow")

[BtmTabLeft]
@ = sz($Tab_ParCtl_Left_CX,$Tab_ParCtl_CY) ext(1) 
L = bg(ctl.parent.selected? "TabLeftWhite":"TabLeftGray") a(lt) sz(17,p) extprm(1)
R = bg(ctl.parent.selected? "TabRightWhite_A":"TabRightGray_A") a(rt) sz(10,p) extprm(1)
M = bg(ctl.parent.selected? "TabMidWhite":"TabMidGray") sz(p,p) xy(17,,10) extprm(1)
Cont = a(lc) ta(cc) sz(p,p) xy(17,,10) extprm(1)

[BtmTabRight]
@ = sz($Tab_ParCtl_Right_CX,$Tab_ParCtl_CY) ext(1) 
L = bg(ctl.parent.selected? "TabLeftWhite_A":"TabLeftGray_A") a(lt) sz(10,p) extprm(1)
R = bg(ctl.parent.selected? "TabRightWhite":"TabRightGray") a(rt) sz(17,p) extprm(1)
M = bg(ctl.parent.selected? "TabMidWhite":"TabMidGray") sz(p,p) xy(10,,17) extprm(1)
Cont = a(lc) ta(cc) sz(p,p) xy(10,,17) extprm(1) 

[ParCtlRepSettMainWindow_Body_Navigator]
@            = a(ct) sz(a,a) at(enum)
Settings     = [BtmTabLeft] a(lt) at(radiolike) subst(Cont())
Report       = [BtmTabRight] a(as) at(radiolike) subst(Cont())

[ParCtlRepSettMainWindow.MainWnd.Settings]
@ = [ParCtlRepSettMainWindow_Body_Settings] sz(p,p) ns(users.find("UserId=="+toExpr(p_User)).settings)

[ParCtlRepSettMainWindow.MainWnd.Report]
@ = [ParCtlRepSettMainWindow_Body_Report] sz(p,p) ns(users.find("UserId=="+toExpr(p_User)).settings)

[ParCtlRepSettMainWindow_Body_Settings]
@           = a(lt) sz(p,p) alias(navigator2) pages(WorkArea) suffix(Settings)
Navigator   = [ParCtlUserSettings_Navigator]
SepVert     = sz(1,p) a(at) b(Group) rs(0,0)
WorkArea    =  a(at) sz(p,470) rs(100,100) mg(12,7,12,22) xy(,15)
;WorkArea    =  [ParCtlUserSettings_Navigator_WorkArea] a(at) xy(,15)

[ParCtlRepSettMainWindow.Settings.InternetUsage]
@ = [ParCtlUserSettings_Navigator_WorkArea_InternetUsage] sz(p,p)

[ParCtlRepSettMainWindow.Settings.WebContent]
@ = [ParCtlUserSettings_Navigator_WorkArea_WebContent] sz(p,p)

[ParCtlRepSettMainWindow.Settings.Download]
@ = [ParCtlUserSettings_Navigator_WorkArea_Download] sz(p,p)

[ParCtlRepSettMainWindow.Settings.SafeSearch]
@ = [ParCtlUserSettings_Navigator_WorkArea_SafeSearch] sz(p,p)

[ParCtlRepSettMainWindow.Settings.IM_Usage]
@ = [ParCtlUserSettings_Navigator_WorkArea_IM_Usage] sz(p,p)

[ParCtlRepSettMainWindow.Settings.SN_Usage]
@ = [ParCtlUserSettings_Navigator_WorkArea_SN_Usage] sz(p,p)

[ParCtlRepSettMainWindow.Settings.PersonalInfo]
@ = [ParCtlUserSettings_Navigator_WorkArea_PersonalInfo] sz(p,p)

[ParCtlRepSettMainWindow.Settings.Keywords]
@ = [ParCtlUserSettings_Navigator_WorkArea_Keywords] sz(p,p)

[ParCtlRepSettMainWindow.Settings.ComputerUsage]
@ = [ParCtlUserSettings_Navigator_WorkArea_ComputerUsage] sz(p,p)

[ParCtlRepSettMainWindow.Settings.AppUsage]
@ = [ParCtlUserSettings_Navigator_WorkArea_AppUsage] sz(p,p)

[ParCtlRepSettMainWindow.Settings.AddView]
@ = [ParCtlUserSettings_Navigator_WorkArea_AddView] sz(p,p)

[ParCtlRepSettMainWindow_Body_Report]
@           = a(lt) sz(p,p) alias(navigator2) pages(WorkArea)
Navigator   = [ParCtlUserReport_Navigator]
SepVert     = sz(1,p) a(at) b(Group) rs(0,0)
WorkArea    = sz(p,p) rs(100,100) a(at) mg(12,7,12,12) xy(,15)

;--------------------------------------------------------------
[ParCtlRepSettMainWindow.Statistics_Column]
@      = sz(220,a) ext(1)
Cont   = a(lt) sz(p,a) extprm(1)

[ParCtlRepSettMainWindow.Statistics_ItemT]
@      = a(lt) sz(p,a) ext(1)
Icon   = extprm(1)
Hdr    = [ParCtlRepSettMainWindow.Statistics_HeaderT]
Body   = a(sa) extprm(1)

[ParCtlRepSettMainWindow.Statistics_HeaderT]
@      = a(at) sz(p,a) xy(8)
Header = a(lt) sz(a,a) f("Header3Lite") extprm(1)
Descr  = a(ac) sz(p,a) ta(lc) xy(4) at(singleline) f("Description") extprm(1)

[PCtrlValue]
@ = [Value] a(la) subst(Name(sz(160,a) at(singleline) f("Description")) Val(f("DescriptionBold") ) )

[ParCtlRepSettMainWindow.Statistics_Internet_Body]
@       = a(sa) sz(470,a) rs(0,100) xy(,7)
LeftCol = [ParCtlRepSettMainWindow.Statistics_Column] a(lt) subst(Cont([ParCtlRepSettMainWindow.Statistics_Internet_LeftCol]))
RightCol= [ParCtlRepSettMainWindow.Statistics_Column] a(rs) subst(Cont([ParCtlRepSettMainWindow.Statistics_Internet_RightCol]))

[ParCtlRepSettMainWindow.Statistics_Internet_LeftCol]
@       = a(lt) sz(p,a) ns(ctl.ser("WebSiteControlReportStatistics"))
Total   = [PCtrlValue] subst(Name() Val(text(Count) ) )
Sep     = a(la) sz(p,1) bg("GridGroup") xy(,6,,6)
Top1    = [PCtrlValue] subst(Name( text("1. " + Domains[0].Domain)) Val( text(Domains[0].Count)) ) visible(Domains.size() >= 1)
Top2    = [PCtrlValue] subst(Name( text("2. " + Domains[1].Domain)) Val( text(Domains[1].Count)) ) visible(Domains.size() >= 2)
Top3    = [PCtrlValue] subst(Name( text("3. " + Domains[2].Domain)) Val( text(Domains[2].Count)) ) visible(Domains.size() >= 3)
Sep     = a(la) sz(p,1) bg("GridGroup") xy(,6,,6) visible(Domains.size() >= 1)
Blocked = [PCtrlValue] subst(Name() Val( text(CriticalCount)) )

[ParCtlRepSettMainWindow.Statistics_Internet_RightCol]
@       = ns(ctl.ser("FileDownloadControlReportStatistics"))
Total   = [PCtrlValue] subst(Name() Val( text(Count)) )
Sep     = a(la) sz(p,1) bg("GridGroup") xy(,6,,6)
Top1    = [PCtrlValue] subst(Name( text("1. " + Domains[0].Domain)) Val( text(Domains[0].Count)) ) visible(Domains.size() >= 1)
Top2    = [PCtrlValue] subst(Name( text("2. " + Domains[1].Domain)) Val( text(Domains[1].Count)) ) visible(Domains.size() >= 2)
Top3    = [PCtrlValue] subst(Name( text("3. " + Domains[2].Domain)) Val( text(Domains[2].Count)) ) visible(Domains.size() >= 3)
Sep     = a(la) sz(p,1) bg("GridGroup") xy(,6,,6) visible(Domains.size() >= 1)
Blocked = [PCtrlValue] a(la) subst(Name() Val( text(CriticalCount)) )

[ParCtlRepSettMainWindow.Statistics_Meeting_Body]
@       = a(sa) sz(470,a) rs(0,100) xy(,7)
LeftCol = [ParCtlRepSettMainWindow.Statistics_Column] a(lt) subst(Cont([ParCtlRepSettMainWindow.Statistics_Meeting_LeftCol]))
RightCol= [ParCtlRepSettMainWindow.Statistics_Column] a(rs) subst(Cont([ParCtlRepSettMainWindow.Statistics_Meeting_RightCol]))

[ParCtlRepSettMainWindow.Statistics_Meeting_LeftCol]
@       = a(lt) sz(p,a) 
Total   = [PCtrlValue] subst(Name() Val( text(ctl.ser("InstantMessangerControlReportStatistics").Count + ctl.ser("SocialNetworkControlReportStatistics").Count )) )
Sep     = a(la) sz(p,1) bg("GridGroup") xy(,6,,6)
TopN    = [ParCtlRepSettMainWindow.Statistics_Meeting_LeftCol_TopN]
Blocked = [PCtrlValue] subst(Name() Val(text(ctl.ser("InstantMessangerControlReportStatistics").Critical+ctl.ser("SocialNetworkControlReportStatistics").Critical)) )

[ParCtlRepSettMainWindow.Statistics_Meeting_LeftCol_TopN]
@       = a(la) sz(p,a) ns(ctl.ser("InstantMessangerControlReportStatistics"))
Top1    = [PCtrlValue] subst(Name(text("1. " + f_ParCtlEx_GetIMContactName(UserName, Contacts[0].ContactId))) Val(text(Contacts[0].MsgCount)) ) visible(Contacts.size() >= 1)
Top2    = [PCtrlValue] subst(Name(text("2. " + f_ParCtlEx_GetIMContactName(UserName, Contacts[1].ContactId))) Val(text(Contacts[1].MsgCount)) ) visible(Contacts.size() >= 2)
Top3    = [PCtrlValue] subst(Name(text("3. " + f_ParCtlEx_GetIMContactName(UserName, Contacts[2].ContactId))) Val(text(Contacts[2].MsgCount)) ) visible(Contacts.size() >= 3)
Sep     = a(la) sz(p,1) bg("GridGroup") xy(,6,,6) visible(Contacts.size() >= 1)

[ParCtlRepSettMainWindow.Statistics_Meeting_RightCol]
@       = a(lt) sz(p,a)
PersInfo= [PCtrlValue] subst(Name(sz(175,a)) Val(text(ctl.ser("InstantMessangerControlReportStatistics").PersonalInfo+ctl.ser("SocialNetworkControlReportStatistics").PersonalInfo)))
Keywords= [PCtrlValue] subst(Name() Val(text(ctl.ser("InstantMessangerControlReportStatistics").Keywords+ctl.ser("SocialNetworkControlReportStatistics").Keywords))) xy(,3)

[ParCtlRepSettMainWindow.Statistics_Computer_Body]
@       = a(sa) sz(470,a) rs(0,100) xy(,7)
LeftCol = [ParCtlRepSettMainWindow.Statistics_Column] a(lt) subst(Cont([ParCtlRepSettMainWindow.Statistics_Computer_LeftCol]))
RightCol= [ParCtlRepSettMainWindow.Statistics_Column] a(rs) subst(Cont([ParCtlRepSettMainWindow.Statistics_Computer_RightCol]))

[ParCtlRepSettMainWindow.Statistics_Computer_LeftCol]
@          = a(lt) sz(p,a) 
AppBlocked = [PCtrlValue] subst(Name() Val(text(ctl.ser("AppControlReportStatistics").CriticalCount))) )

[ParCtlRepSettMainWindow.Statistics_Computer_RightCol]
@          = a(lt) sz(p,a) 
Duration   = [PCtrlValue] subst(Name() Val(text(timestamp(ctl.ser("ComputerControlReportStatistics").TotalTime))) ))

[ParCtlRepSettMainWindow.Statistics_Internet]
@ = [ParCtlRepSettMainWindow.Statistics_ItemT] subst( Icon(i("ParCtlExAll16,0")) Header() Body([ParCtlRepSettMainWindow.Statistics_Internet_Body]) Descr(visible(!ctl.ser("InternetUsageControlReportStatistics").TotalTime && !ctl.ser("WebSiteControlReportStatistics").Domains.size() && !ctl.ser("FileDownloadControlReportStatistics").Domains.size())) )

[ParCtlRepSettMainWindow.Statistics_Meeting]
@ = [ParCtlRepSettMainWindow.Statistics_ItemT] subst( Icon(i("ParCtlExAll16,1")) Header() Body([ParCtlRepSettMainWindow.Statistics_Meeting_Body]) Descr(visible(!ctl.ser("InstantMessangerControlReportStatistics").Count && !ctl.ser("SocialNetworkControlReportStatistics").Count)) )

[ParCtlRepSettMainWindow.Statistics_Computer]
@ = [ParCtlRepSettMainWindow.Statistics_ItemT] subst( Icon(i("ParCtlExAll16,2")) Header() Body([ParCtlRepSettMainWindow.Statistics_Computer_Body]) Descr(visible(!ctl.ser("ComputerControlReportStatistics").TotalTime&&!ctl.ser("AppControlReportStatistics").CriticalCount)) )

;--------------------------------------------
[ParCtlRepSettMainWindow.Statistics_StatArea]
@    = a(lt) sz(p,p)
Stat = [ParCtlRepSettMainWindow.Statistics_StatArea_Stat]

[ParCtlRepSettMainWindow.Statistics_StatArea_Stat]
@        = a(lt) sz(p,p) at(enum, rememberdata) alias(statex) prm("ParCtl:" + serid("SocialNetworkControlReportStatistics"), serid("InternetUsageControlReportStatistics"), serid("WebSiteControlReportStatistics"), serid("FileDownloadControlReportStatistics"), serid("InstantMessangerControlReportStatistics"), serid("ComputerControlReportStatistics"), serid("AppControlReportStatistics" )) 
Sep      = a(lt) sz(p,1) b(Group) xy(,1,,20)
Internet = [ParCtlRepSettMainWindow.Statistics_Internet] a(la)
Sep1     = a(sa) sz(p,20)
Meeting  = [ParCtlRepSettMainWindow.Statistics_Meeting] a(sa)
Sep2     = a(sa) sz(p,20)
Computer = [ParCtlRepSettMainWindow.Statistics_Computer] a(sa)
Sep3     = a(sa) sz(p,p)
;--------------------------------------------

[ParCtlRepSettMainWindow.AddView]
@ = ext(1) [ParCtlUserReport_Navigator_WorkArea_PageT] subst( Title() PeriodSwitch(subst(IsChange($ParCtlUserReport_TimeRange_PeriodSwitch_NoArea_OnChange) )) ListArea(use(0)) StatArea([ParCtlRepSettMainWindow.Statistics_StatArea]) subst(Header(use(0)) )) h(26452)

[ParCtlRepSettMainWindow.ComputerUsage]
@ = ext(1) [ParCtlUserReport_Navigator_WorkArea_PageT] subst( Title() PeriodSwitch(subst(IsChange($ParCtlUserReport_TimeRange_PeriodSwitch_OnChange) )) List([ParCtlUserReport_Navigator_WorkArea_ComputerUsage_List]) Stat([ParCtlUserReport_Navigator_WorkArea_TimeUsage_Stat] prm("ParCtl:" + serid("ComputerControlReportStatistics")) subst(SubHeader() Header(use(0)) )) ) h(24803)

[ParCtlRepSettMainWindow.AppUsage]
@ = ext(1) [ParCtlUserReport_Navigator_WorkArea_PageT] subst( Title() PeriodSwitch(subst(IsChange($ParCtlUserReport_TimeSingle_PeriodSwitch_OnChange) )) List([ParCtlUserReport_Navigator_WorkArea_ApplicationUsage_List]) Stat([ParCtlUserReport_Navigator_WorkArea_ApplicationUsage_Stat]) Toolbar(subst(ListActions([ParCtlUserReport_ApplicationUsage_List_Actions]))) ) h(24804)

[ParCtlRepSettMainWindow.InternetUsage]
@ = ext(1) [ParCtlUserReport_Navigator_WorkArea_PageT] subst( Title() PeriodSwitch(subst(IsChange($ParCtlUserReport_TimeRange_PeriodSwitch_OnChange) )) List([ParCtlUserReport_Navigator_WorkArea_InternetUsage_List]) Stat([ParCtlUserReport_Navigator_WorkArea_TimeUsage_Stat] prm("ParCtl:" + serid("InternetUsageControlReportStatistics") ) subst(SubHeader() Header(use(0)) ) )) h(24805)

[ParCtlRepSettMainWindow.WebContent]
@ = ext(1) [ParCtlUserReport_Navigator_WorkArea_PageT] subst( Title() PeriodSwitch(subst(IsChange($ParCtlUserReport_TimeSingle_PeriodSwitch_OnChange) )) List([ParCtlUserReport_Navigator_WorkArea_InternetWebContent_List]) Stat([ParCtlUserReport_Navigator_WorkArea_InternetWebContent_Stat]) Toolbar(subst(ListActions([ParCtlUserReport_InternetWebContent_List_Actions]))) ) h(24806)

[ParCtlRepSettMainWindow.Download]
@ = ext(1) [ParCtlUserReport_Navigator_WorkArea_PageT] subst( Title() PeriodSwitch(subst(IsChange($ParCtlUserReport_TimeSingle_PeriodSwitch_OnChange) )) List([ParCtlUserReport_Navigator_WorkArea_InternetDownload_List]) Stat([ParCtlUserReport_Navigator_WorkArea_InternetDownload_Stat]) Toolbar(subst(ListActions([ParCtlUserReport_InternetDownload_List_Actions]))) ) h(24807)

[ParCtlRepSettMainWindow.IM_Usage]
@ = ext(1) [ParCtlUserReport_Navigator_WorkArea_PageT] subst(Title() PeriodSwitch(subst(IsChange($ParCtlUserReport_TimeSingle_PeriodSwitch_OnChange) )) List([ParCtlUserReport_Navigator_WorkArea_MessagingIM_List]) Stat([ParCtlUserReport_Navigator_WorkArea_MessagingIM_Stat]) Toolbar(subst(ListActions([ParCtlUserReport_MessagingIM_List_Actions]))) ) h(25596)

[ParCtlRepSettMainWindow.SN_Usage]
@ = ext(1) [ParCtlUserReport_Navigator_WorkArea_PageT] subst( Title() PeriodSwitch(subst(IsChange($ParCtlUserReport_TimeSingle_PeriodSwitch_OnChange) )) List([ParCtlUserReport_Navigator_WorkArea_SNControl_List]) Stat([ParCtlUserReport_Navigator_WorkArea_SNControl_Stat]) Toolbar(subst(ListActions([ParCtlUserReport_SNControl_List_Actions])))  ) h(24810)

[ParCtlRepSettMainWindow.PersonalInfo]
@ = ext(1) [ParCtlUserReport_Navigator_WorkArea_PageT] subst( Title() PeriodSwitch(subst(IsChange($ParCtlUserReport_NoStat_PeriodSwitch_OnChange) )) List([ParCtlUserReport_Navigator_WorkArea_MessagingPersonalData_List]) StatArea(xy(0,0)) Stat([ParCtlUserReport_Navigator_WorkArea_MessagingPersonalData_Stat] use(0) ) ) h(24811)  

[ParCtlRepSettMainWindow.Keywords]
@ = ext(1) [ParCtlUserReport_Navigator_WorkArea_PageT] subst( Title() PeriodSwitch(subst(IsChange($ParCtlUserReport_NoStat_PeriodSwitch_OnChange) )) List([ParCtlUserReport_Navigator_WorkArea_MessagingKeywords_List]) StatArea(xy(0,0)) Stat([ParCtlUserReport_Navigator_WorkArea_MessagingKeywords_Stat] use(0)) ) h(24812)

[ParCtlUserReport_Navigator_WorkArea_SNControl_List]
@              = $ListToolbar alias(events.ParCtlEx.SNControl) refresh(100) sz(p,p) ext(1)
Severity       = $ColSeverity
Direction      = sz(80) i("ParCtlExAll16," + (Direction == #eParCtlEx_DirectionInbound ? 10 : 11)) text("")
Contact        = sz(150) group(ParCtlEx_SN_ContactId, ContactId, default) text(f_ParCtlEx_GetSNContactName(ContactId,ContactAlias))
Time           = sz(120) text(datetime(DateTime)) sort(index,sortup)

[Grid.Groups]
ParCtlEx_SN_ContactId = [ParCtlEx_SN_ContactId_Group]

[ParCtlEx_SN_ContactId_Group]
@            = sz(p,30) mg(,,,2) rs(100,0) onaggrow(agg.ContactId = ContactId; agg.ContactAlias = ContactAlias; if(!agg.Severity, agg.Severity = #eParCtlEx_SeverityInfo); if(agg.Severity > Severity, agg.Severity = Severity); if(AccessStatus == #eParCtlEx_AccessBlocked, agg.Blocked = agg.Blocked + 1))
Severity     = a(ac) xy(20) i(s_ParCtlEx_SeverityIcon(agg.Severity))
Contact      = a(ac) sz(a,a) text(f_ParCtlEx_GetSNContactName(agg.ContactId, agg.ContactAlias)) f(ctl.parent.selected && ctl.List.focused ? "GridGroupSel" : "GridGroup")
Info         = a(ac) sz(a,a) xy(,,10)

[ParCtlUserReport_SNControl_List_Actions]
$GetListSelData = (ctl.List.isNode ? (ctl.List.agg.ContactId ? ctl.List.finddata("ContactId == " + toExpr(ctl.List.agg.ContactId) ) : NULL) : ctl.List.seldata())
$GetListSelContactId = (ctl.List.isNode ? ctl.List.agg.ContactId : ctl.List.seldata().ContactId)
$GetListSelContactAlias = (ctl.List.isNode ? ctl.List.agg.ContactAlias : ctl.List.seldata().ContactAlias)
$GetListData = SNControl.Contacts.find("Id==" + toExpr($GetListSelContactId))
@               = ext(1) sz(a,a) enable($GetListSelData)
AllowDeny       = [TB_Button] xy(0) subst(Icon(i(if($GetListData.Blocked,s_Ico(#ICO_UNBLOCK_16), s_Ico(#ICO_BLOCK_16) )))) onclick(var l_contactId; var l_contactAlias; var p; l_contactId = $GetListSelContactId; l_contactAlias = $GetListSelContactAlias; p = SNControl.Contacts.find("Id==" + toExpr(l_contactId), #vAdd, "Id="+toExpr(l_contactId) +";Name="+toExpr(l_contactAlias)); p.Blocked = !p.Blocked )
Open            = [TB_Button] subst(Icon(i("listctrls,10"))) onclick(dialog("[ParCtlReportSNControlDetails] ns(SNControl)", p_data($GetListSelData), p_period(f_ParCtlEx_Events_PeriodFilter(ctl.PeriodBegin.value, ctl.PeriodEnd.value))))

[ParCtlUserReport_Navigator_WorkArea_SNControl_Stat]
@         = alias(statex) prm("ParCtl:" + serid("SocialNetworkControlReportStatistics")) ext(1) sz(p,a) mg(0,12,0,0)
Header    = a(lt) f("Header1") visible(Contacts.size())
SubHeader = a(la) f("Description") xy(,7,,5) visible(Contacts.size())
Data      = [ParCtlUserReport_Navigator_WorkArea_SNControl_Stat_Data] a(la) sz(p,110) rs(100,0) visible(Contacts.size())

[ParCtlUserReport_Navigator_WorkArea_SNControl_Stat_Data]
Top3      = [ParCtlUserReport_Navigator_WorkArea_SNControl_Stat_Top3] xy(,6)
Chart     = [ParCtlUserReport_Navigator_WorkArea_SNControl_Stat_Chart]

[ParCtlUserReport_Navigator_WorkArea_SNControl_Stat_Top3]
@       = sz(a,a) rs(0,0) a(la) xy(,,10)
Top_1   = [ParCtlExReport_StatTopElem] visible(Contacts.size() >= 1) subst(Legend(bg("Chart2")) Number(text("1. ")) Text(text(f_ParCtlEx_GetSNContactName(Contacts.at(0).ContactId))) Descr() )
Top_2   = [ParCtlExReport_StatTopElem] visible(Contacts.size() >= 2) subst(Legend(bg("Chart3")) Number(text("2. ")) Text(text(f_ParCtlEx_GetSNContactName(Contacts.at(1).ContactId))) Descr() )
Top_3   = [ParCtlExReport_StatTopElem] visible(Contacts.size() >= 3) subst(Legend(bg("Chart4")) Number(text("3. ")) Text(text(f_ParCtlEx_GetSNContactName(Contacts.at(2).ContactId))) Descr() )

[ParCtlUserReport_Navigator_WorkArea_SNControl_Stat_Chart]
@       = $ChartStat mg(20,20) a(as) sz(p,p) at(disable_auto_tt)
Plot    = t(chartplotarea)
AxisY   = $ChartStatAxisY -b()
AxisX   = $ChartStatAxisX xy(-5)
Top_1   = t(chartseries) visible(Contacts.size() >= 1) mg(10) bg("Chart2") v(Contacts.at(0).MsgCount) tt(s_TTMessagingIM_Chart(Contacts[0]))
Top_2   = t(chartseries) visible(Contacts.size() >= 2) mg(10) bg("Chart3") v(Contacts.at(1).MsgCount)    tt(s_TTMessagingIM_Chart(Contacts[1]))
Top_3   = t(chartseries) visible(Contacts.size() >= 3) mg(10) bg("Chart4") v(Contacts.at(2).MsgCount)    tt(s_TTMessagingIM_Chart(Contacts[2]))
