; --------------------------------------------
; --------------- BackupWizard ---------------
[BackupCreateWizard]
@ = [StyledWindowT] at(wizard,customfooter,minimizable) sz(660,550) subst(Footer(subst(Separator(use(1)) Help(use(!$IsInitMode)) Next(use(1)) )) BodyEx([BackupCreateWizardBody])) alias(backup_task_wizard) onshow(ctl.dirty() = #true) onapply(if(RunBackupTaskNow, (setstate(#TASK_REQUEST_RUN, name);#true) ))

[BackupCreateWizardBody]
@         = sz(p,p)
Navigator = [BackupCreateWizard_Navigator]
Pages     = [BackupCreateWizardPages] a(la) at(sheetpages) order(0)

[BackupWizardPage_Header]
@    = a(la) sz(p,65) ext(1) rs(0,0) bg("SecondaryWindowHeader_C,0")
Left = a(lt) bg("SecondaryWindowHeader_L")
Text = [LabelShadow2] subst(B(xy(0,1))) a(lc) xy(20) f("SecondWndHeader2Shadow") extprm(1)
Right = a(rt) bg("SecondaryWindowHeader_R")

[BackupCreateWizard_Navigator]
@         = btns(Btns) a(lt) sz(p,a) at(enum) alias(navigator) v(curPage) ext(1)
Header    = [BackupWizardPage_Header] subst(Text(text( s_BackupCreateWizardTitle(depend(curPage)))))
Btns      = [BackupCreateWizard_Navigator_Btns] a(la) extprm(1)

[BackupCreateWizard.HeaderTemplate]
@         = sz(p,53) mg(15,0) ext(1)
Name      = a(lc) sz(a,a) f("WndHeaderSingle") extprm(1)

[BackupCreateWizard_Navigator_Btns]
@             = sz(p,28) bg("WizardToolbar") onshow(ctl.ContentPage.enabled = !p_new; ctl.StoragePage.enabled = !p_new; ctl.AutoRunPage.enabled = !p_new; ctl.SummaryPage.enabled = !p_new)
QuickTaskPage = [Wizard_Navigator_Button] a(at) xy(,2) subst(Text() Left(bg("")) Sep(use(1) sz(33) visible(!ctl.ContentPage.visible))) enable(1) extprm(1) v("QuickTaskPage")
ContentPage   = [Wizard_Navigator_Button] a(at) xy(,2) subst(Text()) enable(0) extprm(1) v("ContentPage")
StoragePage   = [Wizard_Navigator_Button] a(at) xy(,2) subst(Text()) enable(0) extprm(1) v("StoragePage")
AutoRunPage   = [Wizard_Navigator_Button] a(at) xy(,2) subst(Text()) enable(0) extprm(1) v("AutoRunPage")
SummaryPage   = [Wizard_Navigator_Button] a(at) xy(,2) subst(Text()) enable(0) extprm(1) v("SummaryPage")
bugfix29866   = a(as) sz(p,p)

[BackupCreateWizardPages]
@ = sz(p,p) ext(1)
QuickTaskPage = [BackupWizardPage] use(1) subst(Header(subst(Text() Step(v(1)))) Body([BackupCreateWizard.QuickTaskPage])) extprm(1) h(57298)
ContentPage   = [BackupWizardPage] use(1) subst(Header(subst(Text() Step(v(2)))) Body([BackupCreateWizard.ContentPage])) extprm(1) onshow(ctl.parent.parent.Navigator.Btns.ContentPage.enabled=1) h(17020)
StoragePage   = [BackupWizardPage] use(1) subst(Header(subst(Text() Step(v(3)))) Body([BackupCreateWizard.StoragePage])) extprm(1) onshow(ctl.parent.parent.Navigator.Btns.StoragePage.enabled=1) h(17021)
AutoRunPage   = [BackupWizardPage] use(1) subst(Header(subst(Text() Step(v(4)))) Body([BackupCreateWizard.AutoRunPage])) extprm(1) onshow(ctl.parent.parent.Navigator.Btns.StoragePage.enabled=1;ctl.parent.parent.Navigator.Btns.AutoRunPage.enabled=1) h(17023)
SummaryPage   = [BackupWizardPage] use(1) subst(Header(subst(Text() Step(v(5)))) Body([BackupCreateWizard.SummaryPage])) extprm(1) onshow(ctl.parent.parent.Navigator.Btns.StoragePage.enabled=1;ctl.parent.parent.Navigator.Btns.AutoRunPage.enabled=1;ctl.parent.parent.Navigator.Btns.SummaryPage.enabled=1) h(17026)

; -------------------------------------------------------------------
; ------------- BackupCreateWizardPages.QuickTaskPage ---------------

[BackupCreateWizard.QuickTaskPage]
$OnChange = if(#QuickTaskCustom == ctl.value, (wizMask = wizMask | wizPagesMask("ContentPage"); ctl.Btns.ContentPage.visible = 1), (wizMask = wizMask & ~wizPagesMask("ContentPage"); ctl.Btns.ContentPage.visible = 0))
@         = sz(p,p) mg(20,20,20,0) at(enum) v(QuickTask) onok(setupQuickTask(ctl.value)) onshow(setupQuickTask(#QuickTaskAllFiles); $OnChange) onchange($OnChange)
Documents = [BackupCreateWizard.QuickTaskPage.Task] subst(Icon(i("backup_quick_task,0")) Title() Descr() Count(onclick(setupQuickTask(#QuickTaskMyDocuments); dialog("BackupFilesDialog", p_type("location"), p_BackupFolders(BackupFolders), p_SelectedItem(quickTaskId(#QuickTaskMyDocuments)), p_readonly(1)); setupQuickTask(#QuickTaskAllFiles))) Size(text(f_ObjSize(MyDocumentsSize)))) v(#QuickTaskMyDocuments)
Video     = [BackupCreateWizard.QuickTaskPage.Task] subst(Icon(i("backup_quick_task,1")) Title() Descr() Count() Size(text(f_ObjSize(MyVideoSize)))) xy(,10) v(#QuickTaskMyVideo)
Photo     = [BackupCreateWizard.QuickTaskPage.Task] subst(Icon(i("backup_quick_task,2")) Title() Descr() Count() Size(text(f_ObjSize(MyPicturesSize)))) xy(,10) v(#QuickTaskMyPictures)
Music     = [BackupCreateWizard.QuickTaskPage.Task] subst(Icon(i("backup_quick_task,3")) Title() Descr() Count() Size(text(f_ObjSize(MyMusicSize)))) xy(,10) v(#QuickTaskMyMusic)
Custom    = [BackupCreateWizard.QuickTaskPage.Task] subst(Icon(i("backup_quick_task,4")) Title() Descr()) xy(,10) v(#QuickTaskCustom)

[BackupCreateWizard.QuickTaskPage.Task]
@     = sz(p,60) at(radiolike) a(la) ext(1)
Radio = a(lc) i(ctl.parent.selected ? "Radio,0" : "Radio,1") sz(16,16)
Icon  = a(ac) xy(2) extprm(1)
Title = a(at) xy(5,12) f("SecondWndHeader5") extprm(1)
Descr = a(sa) f("SecondWndDescriptionSmall") extprm(1) xy(,4)
Count = a(as) t(hotlink) f("SecondWndDescriptionSmallHref") tt($TipText_Category_Count) onclick(setupQuickTask(ctl.parent.value); dialog("BackupFilesDialog",p_type("category"),p_Category(quickTaskId(ctl.parent.value)),p_readonly(1)); setupQuickTask(#QuickTaskAllFiles)) extprm(1)
Size = a(as) mg(0,0,5,0) f("SecondWndDescriptionSmall") extprm(1)

; -------------------------------------------------------------------
; -------------- BackupCreateWizardPages.ContentPage ----------------

[BackupCreateWizard.ContentPage]
@                = sz(p,p) mg(0)
FolderSelector   = [BackupFolderSelectorArea] a(lt) sz(200,p) xy(,,,30)
CategorySelector = [BackupCategorySelectorArea] a(as) sz(p,p) xy(,,,30)
Comment          = f("SecondWndDescriptionSmall") a(lb) xy(15,8)
HiddenSystem     = a(rb) t(hotlink) xy(15,9) f("SecondWndDescriptionHref") onclick(menu("AdvancedSettingsMenu"))
Edit             = a(pb) t(hotlink) xy(12,8) f("SecondWndDescriptionHref") onclick( if(dialog("BackupCategoriesEditor",#KtsFileCategory_Audio),refreshStatistics())) )

[BackupCategorySelectorArea]
@                = b(KtsBorderRB)
SectionName      = a(lt) f("SecondWndHeader3") xy(15,8)
TolalSize        = a(rt) [ReportArea_Inner] xy(15,7)
Sep              = a(lt) xy(,30) sz(p,1) b(KtsBorder)
CategorySelector = a(la) [CategorySelectorArea]

[CategorySelectorArea]
@    = sz(p,p)
List = [CategorySelectorList] a(la)

[CategorySelectorList]
@        = t(list) sz(p,p) at(noheader,noborder,singlesel,striped,noautosize) alias(vector) v(Categories.List) onok(if(!Categories.List.size("Selected"), balloon("BackupCategoryNotSelected")) ) onshow(ctl.setIndented("Category");if(!ctl.selcount(),ctl.focus())) onchange(onSelectCategory())
Category = at(checked) mg(6) sz(230) i(s_BackupFileCategoryIconBig(CategoryType)) v(Selected) sort(CategoryId) indent(1) f("SecondWndHeader4")
Count    = at(clickable,fixedsize) sz(100) ta(r) f("SecondWndDescriptionHref") text(Selected ? CountFiles + " " + s_files(f_numdeclension(CountFiles)) : "") tt($TipText_Category_Count) onclick(if(Selected,dialog("BackupFilesDialog",p_type("category"),p_Category(seldata().CategoryId))))
Excludes = sz(20) text(Selected && HasExcludes ? "*" : " ") f("SecondWndHeader4")
Size     = text(Selected ? f_ObjSize(SummarySize) : "") sz(80) f("SecondWndHeader4")
row      = bg("GridSeparator") sz(,45)

[BackupFolderSelectorArea]
@           = b(KtsBorderRB)
SectionName = sz(p,a) a(lt) f("SecondWndHeader3") xy(15,8)
Sep         = a(lt) xy(,30) sz(p,1) b(KtsBorder)
List        = a(la) [FolderSelectorList] xy(,10)

[BackupBrowseForFolder]
@ = [BrowseForFolder] h(17133)

[FolderSelectorList]
@   = t(scrollarea) alias(backup_folders) sz(p,p) onok(if(!BackupFolders.size("Selected"), balloon("BackupSourceNotSelected")))
row = [FolderSelectorList.Row]
Add  = [SmallGreyButton] xy(15,10,15) a(la) subst(Icon(i("EncryptionIcons16,2")) Label(text())) onclick( browseobject(newFolder(), "BackupBrowseForFolder", #SHELL_OBJTYPE_DRIVE|#SHELL_OBJTYPE_FOLDER|#SHELL_OBJTYPE_LOCAL) ))

[FolderSelectorList.Row]
@         = a(la) sz(p,a) xy(15,4,15,4) at(hidden)
Delete    = a(rc) t(hotlink) i(ctl.hotlight ? "delete_16,1" : "delete_16,0") onclick(deleteFolder( ser(Selected) ))
Exception = a(pc) xy(5) f("KtsDescriptionDGrey") text("*") visible(HasExcludes) f("SecondWndDescription")
NameBlock = a(ps) [FolderSelectorList_Row_Name]

[FolderSelectorList_Row_Name]
@         = sz(p,a)
Icon      = a(lc) i(s_KtsPredefinedPlaceIcon(PredefinedType))
Name      = a(ac) t(hotlink) f("SecondWndDescriptionHref") text(s_KtsPredefinedPlaces(PredefinedType) ? s_KtsPredefinedPlaces(PredefinedType) : Path + (Path!=RealPath?(" (" + RealPath + ")"):(""))) tt($TipText_Folder_Name) onclick(dialog("BackupFilesDialog", p_type("location"), p_BackupFolders(BackupFolders), p_SelectedItem(GUID)))

[ReportArea_Inner]
@ = sz(a,15)
ContentSizeMsg       = sz(a,a) a(lt) f("Header2Lite") xy(,,3)
ContentSizeAnimation = sz(a,a) a(at) bg(IsScanning ? "BackupAnimation" : "") bp(ctl.animate(IsScanning ? -1 : 0, 2, #true); productData("BackupWizardScanning") = IsScanning ? "1" : "0")
ContentSize          = sz(a,a) a(at) xy(3,1) text(f_ObjSize(RequiredSpaceForBackup)) f("Header1Grey")

[AdvancedSettingsMenu]
@                   = t(menu)
HiddenFiles         = at(chklike) v(BackupHiddenFiles) onchange(refreshStatistics())
SystemFiles         = at(chklike) v(BackupSystemFiles) onchange(refreshStatistics())
;;AlternativeStreams  = at(chklike) v(BackupAlternativeStreams)
;;SecurityDescriptors = at(chklike) v(BackupSecurityDescriptors)

; -------------------------------------------------------------------
; --------------- BackupCreateWizardPages.StoragePage ---------------
[BackupCreateWizard.StoragePage]
@       = sz(p,p) onshow(ctl.updatedata()) mg(20,20,20,10)
Legend  = [BackupCreateWizard.Legend]
Toolbar = [BackupCreateWizard.StoragePage.Toolbar] a(la) xy(,10)
Dummy   = a(la) sz(0,0)
ListArea = [BackupCreateWizard.StoragePage.ListArea]

[BackupCreateWizard.StoragePage.Toolbar]
@      = a(la) sz(p,a)
Left   = a(lt) sz(a,a) bg("ToolbarLeft")
Right  = a(rt) sz(a,a) bg("ToolbarRight")
Middle = a(lt) sz(p,a) xy(5,,5) bg("ToolbarMiddle")
First  = a(lt) xy(6,3) sz(0,0)
Create = [BackupMainWindow.Label] subst(Icon(i("EncryptionIcons16,2")) Label(text())) a(as) onclick(dialog("StorageWizard")) extprm(1)
Attach = [BackupMainWindow.Label] xy(2) subst(Icon(i("EncryptionIcons16,1")) Label(text())) a(as) onclick(dialog("AddStorageDialog")) extprm(1)
Edit   = [BackupMainWindow.Label] xy(2) subst(Icon(i("BackupIcons,5")) Label(text())) a(as) visible(CurrentStorageGuid) onclick(if(CurrentStorageGuid, if(checkStorage(backupGetStorage(CurrentStorageGuid),dialog("CheckStorageDialog")),if(f_IsStorageUnlocked(CurrentStorageGuid),dialog("EditStorageWizard",p_storage(backupGetStorage(CurrentStorageGuid))))))) extprm(1)
Clear  = [BackupMainWindow.Label] xy(2) subst(Icon(i("BackupIcons,7")) Label(text())) a(as) visible(CurrentStorageGuid) onclick(f_clearStorage(backupGetStorage(CurrentStorageGuid))) extprm(1)
Delete = [BackupMainWindow.Label] xy(2) subst(Icon(i("EncryptionIcons16,3")) Label(text())) a(as) visible(CurrentStorageGuid) onclick(if(CurrentStorageGuid, if(f_IsStorageUnlocked(CurrentStorageGuid),dialog("BackupRemoveStorageWizard", p_storage(CurrentStorageGuid))))) extprm(1)

[BackupCreateWizard.StoragePage.ListArea]
@      = a(la) sz(p,p) b(KtsBorder)
List   = [AvailableStoragesList] a(la)

[BackupCreateWizard.Legend]
@             = a(la) sz(p,a)
SpaceRequired = sz(a,a) a(rt) text(f_ObjSize(RequiredSpaceForBackup)) f("SecondWndHeader3")
RequiredText  = a(pc) f("SecondWndDescriptionSmall") xy(5)
RequiredBox   = sz(12,12) a(pc) xy(6) i("ProgressBarLegend,2")
UsedText      = a(pc) f("SecondWndDescriptionSmall") xy(10)
UsedBox       = sz(12,12) a(pc) xy(6) i("ProgressBarLegend,1")
StoragesText  = sz(a,a) a(lc) f("SecondWndHeader3")

[AvailableStoragesList]
@         = t(scrollarea) at(vert) sz(p,p) at(enum) v(CurrentStorageGuid) alias(storages_scrolllist) \
		onshow(CurrentStorage=storage(CurrentStorageGuid).Name; CurrentStorageType=storage(CurrentStorageGuid).StorageType) \
		onchange(CurrentStorage=storage(CurrentStorageGuid).Name; CurrentStorageType=storage(CurrentStorageGuid).StorageType) \
		onok(if(!CurrentStorageGuid,balloon("BackupStorageNotSelected"),if(p_new && #backup_ftp != CurrentStorageType && RequiredSpaceForBackup > storage(CurrentStorageGuid).FreeSpace, balloon("BackupNotEnoughSpace"), 1)))
Removable = [AvailableStoragesList_Removable]
;Helper    = [BackupMainWindow.Storages.Helper] a(la) sz(p,p) visible(ctl.empty())
row       = [AvailableStoragesList_Row]

[AvailableStoragesList_Removable]
@      = a(la) sz(p,a) at(radiolike) v("") mg(10,19,20,14) visible(!removableStorageConnected()) bg(ctl.selected ? "SelectedListItem" : "White")
Icon   = a(lt) i("Flash48")
Title  = a(at) f("SecondWndHeader4") xy(5,5)
Descr  = a(sa) f("SecondWndDescription") xy(,5,100)
Create = [BtnGreen37] a(rt) xy(,5) onclick(dialog("StorageWizard"))

[AvailableStoragesList_Row]
@         = a(la) sz(p,a) at(hidden,radiolike) mg(,10,10,20) bg(ctl.selected ? "SelectedListItem" : "White") v(GUID) enable1(FreeSpace>RequiredSpaceForBackup||StorageType==#backup_ftp||!p_new) onrclick(menu("[BackupMainWindow.Storages.List.Row.menu]"))
Icon      = a(lt) mg(10,,5) i(s_bigBackupDiskIcon(StorageType))
Name      = a(at) f("SecondWndHeader4") xy(,5) text(Name) sz(220) at(singleline)
DiskSizeText = a(sa) xy(1,6) f("SecondWndDescriptionSmall") visible(DiskTotalSpace)
DataSizeText = a(sa) xy(1,6) f("SecondWndDescriptionSmall") visible(!DiskTotalSpace)
Error     = a(as) f("SecondWndDescriptionSmallRed") xy(4) visible(!Active)
TotalSize = a(as) f("SecondWndDescriptionSmall") visible(!ctl.Error.visible) xy(4) text(if(!DiskTotalSpace, f_ObjSize(DataSize), f_ObjSize(DiskTotalSpace) ))

ProgressL = a(lt) visible(p_new) xy(300,6) sz(a,a) bg("ProgressBarBlueL") 
ProgressM = a(as) visible(p_new) sz(p,a) xy(,,14) bg("ProgressBarGreyM") 
ProgressR = a(as) visible(p_new) sz(a,a) xy(-14) bg(if(FreeSpace>RequiredSpaceForBackup,"ProgressBarGreyR","ProgressBarRedR")) 

Required  = a(ls) visible(p_new) xy(304,,14) sz(p,a) bg(if(FreeSpace>RequiredSpaceForBackup,"ProgressBarGreenM","ProgressBarRedM")) bp(ctl.rsx = f_ProgressValue(100*(DiskTotalSpace-FreeSpace+RequiredSpaceForBackup)/DiskTotalSpace))
Used      = a(ls) visible(p_new) xy(304,,14) sz(p,a) bg("ProgressBarBlueM") bp(ctl.rsx = f_ProgressValue(100*(DiskTotalSpace-FreeSpace)/DiskTotalSpace))
Separator = a(as) visible(p_new) xy(-15) sz(1,a) bg("ProgressBarGreyM")

Free      = a(la) xy(302,6) f("SecondWndDescriptionSmall") visible(!ctl.Error.visible)
SizeLeft  = a(as) f("SecondWndDescriptionSmall") visible(!ctl.Error.visible) text(StorageType==#backup_ftp ? $Unknown : f_ObjSize(FreeSpace))
NotEnough = a(as) f("SecondWndDescriptionSmall") visible(!ctl.Error.visible && StorageType!=#backup_ftp && RequiredSpaceForBackup > FreeSpace)
SizeNeed  = a(as) f("SecondWndDescriptionSmall") text(StorageType==#backup_ftp ? $Unknown : f_ObjSize(RequiredSpaceForBackup-FreeSpace)) visible(!ctl.Error.visible && StorageType!=#backup_ftp && RequiredSpaceForBackup > FreeSpace)

; -------------------------------------------------------------------
; --------------- BackupCreateWizardPages.AutoRunPage ---------------
[BackupCreateWizard.AutoRunPage]
@                       = sz(p,a) onshow(ctl.updatedata()) ext(1) mg(20,20,20,20)
OnStorageConnect        = t(check) sz(a,a) a(sa) xy(,10) v(BackupOnStorageConnect) visible(if(CurrentStorageType==#backup_usb,(#true),(#false))) f("SecondWndDescription")
ScheduleOn              = t(check) sz(a,a) a(sa) xy(,10) ns(schedule) v(Mode) f("SecondWndDescription")
Sep1                    = a(la) sz(p,1) b(KtsBorder) xy(18,25,,15)
Schedule                = [SchedulerViewModified] ns(schedule) a(la) xy(18,15) enable(schedule.Mode == #schmEnabled)

[SchedulerViewModified]
$SchedulePage   = a(lt) sz(p,a) mg(,0) xy(,36) at(hide)
$LabelSize      = 120
@               = sz(p,a) ext(1)
Period          = a(la) sz($LabelSize,a)
Type            = [SchedulerView_Type] a(ls) xy($LabelSize,-4) sz(200) extprm(1)
Once            = [SchedulerView_Once]
AtStartup       = [SchedulerView_AtStartup]
AfterUpdate     = [SchedulerView_AfterUpdate]
Minutely        = [SchedulerView_Minutely]
Hourly          = [SchedulerView_Hourly]
Daily           = [SchedulerView_Daily]
Weekly          = [SchedulerView_Weekly] subst(WeekDays(sz($LabelSize,a)))
Monthly         = [SchedulerView_Monthly]
Time            = a(lt) xy(,65) sz($LabelSize,a) visible(switch(Type, "Scheduler_Time_Show"))
TimeEdit        = t(timeedit) at(notz) a(ls) xy($LabelSize,-4) sz($TimeEditCX) v(Time) visible(switch(Type, "Scheduler_Time_Show"))
RunIfSkipped    = $Check a(lt) xy(,115) v(RaiseIfSkipped) f("SecondWndHeader3") visible(switch(Type, "Scheduler_RunIfSkipped_Show")) extprm(1)
Descr           = a(la) xy(18,2) f("SecondWndDescription") visible(switch(Type, "Scheduler_RunIfSkipped_Show"))

; -------------------------------------------------------------------
; ---------------- BackupCreateWizardPages.SummaryPage --------------
[BackupCreateWizard.SummaryPage]
@                       = sz(p,p) onshow(if(!BackupTaskName||p_new,BackupTaskName=checkAndIndexBackupTaskName(generateTaskName()) );ctl.updatedata()) ext(1) mg(20,20,20,20)
TaskNameText            = sz(a,a) a(la) xy(,10) f("SecondWndHeader3")
TaskName                = t(edit) sz(300,a) xy(5,-2) a(as) v(BackupTaskName) onok(if(!ctl.value,(balloon("BackupTaskShouldBeNamed");ctl.value=checkAndIndexBackupTaskName(generateTaskName());false),(if(p_new,if(isBackupTaskNameExist(ctl.value),(balloon("BackupTaskExists");false))) )  )) nl(32) f("SecondWndDescription")
Sep1                    = a(la) sz(p,1) b(KtsBorder) xy(,25,,25)
Content                 = sz(a,a) a(la) f("SecondWndDescription")
SpaceRequiredAnimation  = sz(a,a) a(as) xy(5) bg(ProcessingCount ? "BackupAnimation" : "") bp(ctl.animate(ProcessingCount ? -1 : 0, 2, #true))
ContentInfo             = sz(a,a) xy(5) a(as) text(f_ObjSize(RequiredSpaceForBackup)) f("SecondWndDescription")
CountFiles              = sz(a,a) a(as) text(" (" + FilesToBackup + " " + s_files(f_numdeclension(FilesToBackup)) + ")") f("SecondWndDescription")
Storage                 = sz(a,a) xy(,15) a(la) f("SecondWndDescription")
StorageInfo             = sz(a,a) xy(10) a(as) text(CurrentStorage) onshow(ctl.text=CurrentStorage) f("SecondWndDescription")
Schedule                = sz(a,a) xy(,15) a(la) f("SecondWndDescription")
ScheduleInfo            = [Value] $TaskVal ns(schedule) a(as) xy(10) sz(a,a) subst(Name() Val(f("SecondWndDescription") a(at) text(switch(schedule.Mode, "SchedulerDescription")) ))
;ScheduleInfoRunSkipped  = sz(a,a) a(as) visible(schedule.RaiseIfSkipped)
OnConnectText           = sz(a,a) xy(,15) a(la) visible(BackupOnStorageConnect && (CurrentStorageType==#backup_usb)) f("SecondWndDescription")
ScheduleInfoOnConnect   = sz(a,a) a(as) xy(10) visible(BackupOnStorageConnect && (CurrentStorageType==#backup_usb)) f("SecondWndDescription")
Sep2                    = a(la) sz(p,1) b(KtsBorder) xy(,25,,25)
RunAfter                = t(check) sz(a,a) a(la) bg("Chart7") extprm(1) v(RunBackupTaskNow) f("SecondWndHeader3")

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

[BackupFilesDialog]
@ = [StyledWindowT] at(dragable,customfooter,a_ok,a_cancel) subst(Body(a(lt) -xy() -bg()) BodyEx([BackupFilesDialog.Body])) sz(640,500) i("Main") h(p_type == "location" ? 17378 : 17131) at(enum) v(p_type) alias(backup_files_dialog)

[TabLeft_Dark]
@ = sz(a,$Tab_ParCtl_CY) ext(1) 
L = bg(ctl.parent.selected? "TabLeftWhite_Dark":"TabLeftGray_Dark") a(lt) sz(24,p) extprm(1)
R = bg(ctl.parent.selected? "TabRightWhite_A_Dark":"TabRightGray_A_Dark") a(rt) sz(20,p) extprm(1)
M = bg(ctl.parent.selected? "TabMidWhite_Dark":"TabMidGray_Dark") sz(p,p) xy(24,,17) extprm(1)
Cont = a(lc) ta(cc) sz(a,p) xy(17,,10) extprm(1)

[TabRight_Dark]
@ = sz(a,$Tab_ParCtl_CY) ext(1) 
L = bg(ctl.parent.selected? "TabLeftWhite_A_Dark":"TabLeftGray_A_Dark") a(lt) sz(24,p) extprm(1)
R = bg(ctl.parent.selected? "TabRightWhite_Dark":"TabRightGray_Dark") a(rt) sz(24,p) extprm(1)
M = bg(ctl.parent.selected? "TabMidWhite_Dark":"TabMidGray_Dark") sz(p,p) xy(17,,24) extprm(1)
Cont = a(lc) ta(cc) sz(a,p) xy(10,,17) extprm(1)

[BackupFilesDialog.Body]
@         = sz(p,p) a(lt)
Body1     = [BackupCategoryDialog_Body] a(lt) xy(10,30,10,$DialogPanelSizeY_bottom) visible(p_type == "category")
Body2     = [BackupLocationDialog_Body] a(lt) xy(10,30,10,$DialogPanelSizeY_bottom) visible(p_type == "location")
Location  = [TabLeft_Dark]  a(lt) xy(230,6) at(radiolike) v("location") subst(Cont())
Category  = [TabRight_Dark] a(as) at(radiolike) v("category") subst(Cont())

[BackupCategoryDialog_Body]
@       = sz(p,p) bg("White")
Header  = [BackupWizardPage_Header] subst(Text()) a(lt)
Content = [FilesSortedByCategoryDialog_Inner]

[FilesSortedByCategoryDialog_Inner]
@            = sz(p,p) a(la)
Groups       = [FilesSortedByCategoryDialog_Groups] a(lt)
Sep          = a(at) sz(1,p) b(KtsBorder)
FilesInGroup = [FilesSortedByCategoryDialog_Files] a(at)

[FilesSortedByCategoryDialog_Groups]
@     = sz(200,p)
Label = f("SecondWndHeader3") mg(20,14,20,14)
List  = [FilesSortedByCategoryDialog_GroupsList] a(la) sz(p,p) xy(,,,50) onfocus(ctl.FilesList.setCategory(ctl.seldata()))
Note  = a(lb) xy(10,10) f("SecondWndDescriptionSmall")

[FilesSortedByCategoryDialog_GroupsList]
@    = t(list) at(noheader,noborder,singlesel,noautosize) alias(vector) v(Categories.List) onshow(ctl.focus("CategoryId==p_Category")) ontimer(500, ctl.updatedata()) filter(Selected) f("SecondWndDescription")
row  = [FilesSortedByCategoryDialog_GroupsList_Row]

[FilesSortedByCategoryDialog_GroupsList_Row]
@          = at(custom) mg(,2,,2)
Icon       = a(la) xy(20) i(s_BackupFileCategoryIcon(CategoryType))
BackupItem = a(as) xy(5,2) text( (CategoryType ? s_KtsFileCategoryName(CategoryType) : CategoryName) + " (" + CountFiles + ")" ) f("SecondWndDescriptionSmall")
Exclusion  = a(as) f("SecondWndDescriptionSmall") text(HasExcludes ? "*" : " ")

[FilesSortedByCategoryDialog_Files]
@         = sz(p,p)
FilesList = [FilesSortedByCategoryDialog_FilesList] a(la) oninit(ctl.setFilter(BackupHiddenFiles,BackupSystemFiles))

[FilesSortedByCategoryDialog_FilesList]
@         = $List sz(p,p) at(singlesel,noborder,striped,checkall) alias(categoryFilesList)
Name      = sz(a) at(checked) i(getIconAsync(Name,"unkobj")) text(Name) v(Selected) use(!p_readonly) f("SecondWndDescription")
ReadOnly  = sz(a) i(getIconAsync(Name,"unkobj")) text(Name) use(p_readonly) f("SecondWndDescription")
Location  = sz(a) text(skipPathPrefix(PathToFile)) f("SecondWndDescription")
Size      = sz(a) text(f_ObjSize(Size)) f("SecondWndDescription")
row       = bg("GridSeparator")

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

[BackupLocationDialog_Body]
@            = a(la) sz(p,p) bg("White")
Path         = [BackupTaskFoldersDialog_Path]
FilesInGroup = [BackupTaskFoldersDialog_Content]

[BackupTaskFoldersDialog_Path]
@            = a(la) sz(p,a)
L            = bg("SecondaryWindowHeader_L") a(lt)
C            = bg("SecondaryWindowHeader_C,0") a(at) sz(p)
R            = bg("SecondaryWindowHeader_R") a(rt)
Text         = a(lt) mg(20,20,20,20) f("SecondWndHeader2") extprm(1) 
Up           = at(clickable) a(ra) sz(16,16) xy(5,10,5,10) i(if(ctl.hotlight,"Navigation16,3","Navigation16,2")) onclick(ctl.PathComboBox.up())
Back         = at(clickable) a(ps) sz(16,16) xy(5,0,5,0) i(if(ctl.hotlight,"Navigation16,1","Navigation16,0")) onclick(ctl.PathComboBox.back())
Block        = a(ps) xy(0,-2,0,0) [BackupTaskFoldersDialog_Path_Block]
Label        = a(lt) sz(0,0)
Space        = a(la) sz(p,10)

[BackupTaskFoldersDialog_Path_Block]
@            =   sz(p,a)
Label1       = f("SecondWndDescription") sz(a,a) a(lc) xy(20,0,0,0) bp(ctl.text = ctl.parent.parent.Label.text)
PathComboBox = t(combo) a(ac) xy(5,0,5,0) sz(p,a) alias(backup_path_selector) itemtext(s_KtsPredefinedPlaces(PredefinedType) ? s_KtsPredefinedPlaces(PredefinedType) : Path) onshow(ctl.setBackupFolders(BackupFolders)) onchange(ctl.FileBrowserList.value = ctl.value)

[BackupTaskFoldersDialog_Content]
@       = sz(p,p) a(la) b(KtsBorderRB)
Folders = [BackupTaskFoldersDialog_Folders] a(lt)
Sep     = a(at) sz(1,p) b(KtsBorder)
Files   = [BackupTaskFoldersDialog_Files] a(at)
Sep     = a(lt) sz(p,1) b(KtsBorder)

[BackupTaskFoldersDialog_Folders]
@     = sz(200,p)
Label = f("SecondWndHeader2") mg(20,14,20,14)
List  = [BackupTaskFoldersDialog_FoldersList] a(la) sz(p,p) xy(,,,50) onfocus(if(!l_IgnoreFocusEvent,ctl.FileBrowserList.value = ctl.seldata().RealPath))
Note  = a(lb) xy(10,10) f("SecondWndDescriptionSmall")

[BackupTaskFoldersDialog_FoldersList]
@    = t(list) at(noheader,noborder,singlesel,noautosize) alias(vector) v(BackupFolders) filter(Selected) onshow(ctl.focus("p_SelectedItem==GUID")) ontimer(500,(l_IgnoreFocusEvent=1;ctl.refresh();l_IgnoreFocusEvent=0))
row  = [BackupTaskFoldersDialog_FoldersList_Row]

[BackupTaskFoldersDialog_FoldersList_Row]
@          = at(custom) mg(,2,,2)
Icon       = a(la) xy(20) i(s_KtsPredefinedPlaceIcon(PredefinedType))
BackupItem = a(as) xy(5,2) text((s_KtsPredefinedPlaces(PredefinedType) ? s_KtsPredefinedPlaces(PredefinedType) : Path + (Path!=RealPath?(" (" + RealPath + ")"):("")))) f("SecondWndDescriptionSmall")
Exclusion  = a(as) f("KtsDescriptionDGrey") text((Selected && HasExcludes) ? "*" : "") f("SecondWndDescriptionSmall")

[BackupTaskFoldersDialog_Files]
@               = sz(p,p)
FileBrowserList = [BackupTaskFoldersDialog_FilesList] a(lt) onshow(ctl.setFilter(Categories,BackupHiddenFiles,BackupSystemFiles,BackupFolders))

[BackupTaskFoldersDialog_FilesList]
@         = $List sz(p,p) at(singlesel,noborder,striped,checkall) alias(backup_directory_browser) onfolder(ctl.PathComboBox.value = ctl.value) f("SecondWndDescription")
Name      = sz(a) at(checked) i(IsFolder ? "appgroup" : getIconAsync(ShortName,"unkobj")) text(ShortName) v(Selected) use(!p_readonly) f("SecondWndDescription")
ReadOnly  = sz(a) i(IsFolder ? "appgroup" : getIconAsync(ShortName,"unkobj")) text(ShortName) use(p_readonly) f("SecondWndDescription")
Count     = sz(a) text(if(IsFolder && Selected,(FilesCount + if(HasExclusions," *")))) f("SecondWndDescription")
Size      = sz(a) text(if(Selected,f_ObjSize(Size))) f("SecondWndDescription")
row       = at(clickable) onrclick(if(IsFolder,ctl.parent.value = FullName)) bg("GridSeparator")