//AB/ Project SystemInfo Dialog //AB/ Object prj is a Dialog_Project //AB/ Set ProjectName to "SystemInfo Dialog" //AB/ Set ProjectFileName to "SysInfoDialog.Dg" // Project Object Structure // oSystemInformationDialog is a ModalPanel // oBox is a Container3d // oSystemInfoImageList is a cImageList // oSystemInfoTreeView is a TreeView // oPhysicalKeys is a Array // oXMLExportButton is a Button // oOkButton is a Button // Register all objects Register_Object oBox Register_Object oOkButton Register_Object oPhysicalKeys Register_Object oSystemInfoImageList Register_Object oSystemInformationDialog Register_Object oSystemInfoTreeView Register_Object oXMLExportButton //AB-StoreTopStart // 2003-06-19 ------------------------------------ Start Nils G. Svedmyr Use DFAllEnt.pkg // 2003-06-19 ------------------------------------ Stop Nils G. Svedmyr // // The function of this dialog is to show as much system information available // Use LanguageText.Pkg // Translation strings #IFSAME Language$Current Language$English Use SysInfo_Language_English.Inc #ENDIF #IFSAME Language$Current Language$Nederlands Use SysInfo_Language_Nederlands.inc #ENDIF #IFSAME Language$Current Language$Svenska Use SysInfo_Language_Svenska.inc #ENDIF #IFSAME Language$Current Language$Deutsch Use SysInfo_Language_Deutsch.inc #ENDIF #IFSAME Language$Current Language$Dansk Use SysInfo_Language_Dansk.inc #ENDIF #IFSAME Language$Current Language$Portugues Use SysInfo_Language_Portugues.inc #ENDIF #IFSAME Language$Current Language$Francais Use SysInfo_Language_Francais.inc #ENDIF #IFSAME Language$Current Language$Italiano Use SysInfo_Language_Italiano.inc #ENDIF Use cVersionInfo.Pkg // Version Information functions Use GetUserName.Pkg // GetUserName WinAPI function definition Use PathFindExtension.Pkg // PathFindExtension WinAPI function definition Use PathIsDirectory.Pkg // PathIsDirectory WinAPI function definition Use Seq_Chnl.Pkg // Sequential channel functions Use FleXML.Pkg // Interface to XML Use GlobalMemoryStatus.Pkg // GlobalMemoryStatus WinAPI function definition Use GetKeyboardType.Pkg // GetKeyboardType WinAPI function definition Use GetKeyboardLayoutName.Pkg // GetKeyboardLayoutName WinAPI function definition Use GetUserDefaultLangID.Pkg // GetUserDefaultLangID WinAPI function definition Use WindowsLocale.Pkg // Functions to get various Windows locale information Use GetSystemDirectory.Pkg // GetSystemDirectory WinAPI function definition Use GetTempPath.Pkg // GetTempPath WinAPI function definition Use GetProfilesDirectory.Pkg // GetProfilesDirectory WinAPI function definition Use GetAllUsersProfileDirectory.Pkg // GetAllUsersProfileDirectory WinAPI function definition Use GetDefaultUserProfileDirectory.Pkg // GetDefaultUserProfileDirectory WinAPI function definition Use GetShortPathName.Pkg // GetShortPathName WinAPI function definition Use GetLongPathName.Pkg // GetLongPathName WinAPI function definition Use GetComputerName.Pkg // GetComputerName WinAPI function definition Use GetDoubleClickTime.Pkg // GetDoubleClickTime WinAPI function definition Use GetLogicalDriveStrings.Pkg // GetLogicalDriveStrings WinAPI function definition Use GetDriveType.Pkg // GetDriveType WinAPI function definition Use GetCalendarInfo.Pkg // GetCalendarInfo WinAPI function definition Use EnumProcessModules.Pkg // Functions to enumerate the process modules Use WinShell.Pkg // Path Functions; PathRemoveFileSpec, PathRemoveExtension, PathIsRelative, PathFileExists // 2003-04-14 ------------------------------------ Start Nils G. Svedmyr Use GetComputerName.pkg // 2003-04-14 ------------------------------------ Stop Nils G. Svedmyr //AB-StoreTopEnd //AB-IgnoreStart Use DfTreeVw.pkg //AB-IgnoreEnd Object oSystemInformationDialog is a ModalPanel Set Border_Style to Border_Thick Set Label to "System Information" Set Size to 191 343 Set Location to 7 45 //AB-DDOStart //AB-DDOEnd Object oBox is a Container3d Set Size to 150 330 Set Location to 5 5 Set peAnchors to anAll Set Border_Style to Border_StaticEdge Object oSystemInfoImageList is a cImageList Set Location to 26 147 Set piMaxImages to 3 //AB-StoreStart // Define three values to point to the loaded bitmaps Enum_List Define tvSysInfoBookOpenBmp Define tvSysInfoBookClosedBmp Define tvSysInfoItemBmp End_Enum_List // When the imagelist is being created we need to load the bitmaps used Procedure OnCreate Integer iIndex Get AddTransparentImage "SysInfo.Bmp" clFuchsia To iIndex If (iIndex = -1) Begin Error DFERR_OPERATOR (SFormat (C_$CanNotLoadBitmap, "SysInfo.Bmp")) End End_Procedure // OnCreate //AB-StoreEnd End_Object // oSystemInfoImageList Object oSystemInfoTreeView is a TreeView Set peAnchors to anAll Set Size to 140 320 Set Location to 5 5 //AB-StoreStart // Connect the imagelist object to this treeview Set ImageListObject To oSystemInfoImageList // Keep a property that holds the current root underwhich new treeview items are created Property Handle phCurrentRoot // Create a list of information branch and item specific identifiers Enum_List Define tiSysInfoUserBranch Define tiSysInfoUserBranchItem Define tiSysWindowsLocaleBranch Define tiSysWindowsLocaleBranchItem Define tiSysInfoDataBaseDriversBranch Define tiSysInfoDataBaseDriversBranchItem Define tiSysInfoVersionBranch Define tiSysInfoVersionBranchItem Define tiSysInfoVersionsOfBinDirBranch Define tiSysInfoVersionsEnumeratedModulesDirBranch Define tiSysInfoWorkSpaceBranch Define tiSysInfoWorkSpaceBranchItem Define tiSysInfoMemoryBranch Define tiSysInfoMemoryBranchItem Define tiSysInfoFilesDirBranch Define tiSysInfoFilesDirBranchItem Define tiSysInfoKeyboardBranch Define tiSysInfoKeyboardBranchItem Define tiSysInfoAccKeysBranch Define tiSysInfoAccKeysBranchItem Define tiSysInfoRegistrationBranch Define tiSysInfoRegistrationBranchItem Define tiSysInfoDataBaseServersBranch Define tiSysInfoDataBaseServersBranchItem Define tiSysInfoGlobalAttributesBranch Define tiSysInfoGlobalAttributesBranchItem Define tiSysInfoGlobalVariablesBranch Define tiSysInfoGlobalVariablesBranchItem Define tiSysInfoSystemMetricsBranch Define tiSysInfoSystemMetricsBranchItem Define tiSysInfoSysConfBranch Define tiSysInfoSysConfBranchItem Define tiSysInfoDataFilesBranch Define tiSysInfoDataFilesFilesBranch Define tiSysInfoDataFilesAttributesBranch Define tiSysInfoDataFilesFieldsBranch Define tiSysInfoDataFilesIndexesBranch Define tiSysInfoDataFilesBranchItem Define tiSysInfoApplicationBranch Define tiSysInfoApplicationBranchItem End_Enum_List // When a root item is created we will fake the treeview by telling there are childitems. This // way the tree can be build stepwise and not all on opening this dialog (making sysinfo quite slow) Procedure DoAddTreeRootItem String sText Integer iItemData Integer iImage Integer iSelectedImage Handle hItem Get AddTreeItem sText 0 iItemData iImage iSelectedImage To hItem Set ItemChildCount hItem To 1 End_Procedure // DoAddTreeRootItem // When the treeview is created add a number of root items to explore Procedure OnCreateTree Forward Send OnCreateTree Send DoAddTreeRootItem C_$WorkSpace tiSysInfoWorkSpaceBranch tvSysInfoBookClosedBmp tvSysInfoBookClosedBmp Send DoAddTreeRootItem C_$Application tiSysInfoApplicationBranch tvSysInfoBookClosedBmp tvSysInfoBookClosedBmp Send DoAddTreeRootItem C_$DatabaseDrivers tiSysInfoDataBaseDriversBranch tvSysInfoBookClosedBmp tvSysInfoBookClosedBmp Send DoAddTreeRootItem C_$Versions tiSysInfoVersionBranch tvSysInfoBookClosedBmp tvSysInfoBookClosedBmp Send DoAddTreeRootItem C_$Memory tiSysInfoMemoryBranch tvSysInfoBookClosedBmp tvSysInfoBookClosedBmp Send DoAddTreeRootItem C_$Paths tiSysInfoFilesDirBranch tvSysInfoBookClosedBmp tvSysInfoBookClosedBmp Send DoAddTreeRootItem C_$KeyBoard tiSysInfoKeyboardBranch tvSysInfoBookClosedBmp tvSysInfoBookClosedBmp Send DoAddTreeRootItem C_$AcceleratorKeys tiSysInfoAccKeysBranch tvSysInfoBookClosedBmp tvSysInfoBookClosedBmp Send DoAddTreeRootItem C_$Registration tiSysInfoRegistrationBranch tvSysInfoBookClosedBmp tvSysInfoBookClosedBmp Send DoAddTreeRootItem C_$User tiSysInfoUserBranch tvSysInfoBookClosedBmp tvSysInfoBookClosedBmp Send DoAddTreeRootItem C_$WindowsLocale tiSysWindowsLocaleBranch tvSysInfoBookClosedBmp tvSysInfoBookClosedBmp Send DoAddTreeRootItem C_$GlobalAttributes tiSysInfoGlobalAttributesBranch tvSysInfoBookClosedBmp tvSysInfoBookClosedBmp Send DoAddTreeRootItem C_$GlobalVariables tiSysInfoGlobalVariablesBranch tvSysInfoBookClosedBmp tvSysInfoBookClosedBmp Send DoAddTreeRootItem C_$SystemMetrics tiSysInfoSystemMetricsBranch tvSysInfoBookClosedBmp tvSysInfoBookClosedBmp Send DoAddTreeRootItem C_$SystemConfiguration tiSysInfoSysConfBranch tvSysInfoBookClosedBmp tvSysInfoBookClosedBmp // 2003-04-19 ------------------------------------ Start Nils G. Svedmyr // DON'T USE WITH CrossMerge: *** //Send DoAddTreeRootItem C_$DataFiles tiSysInfoDataFilesBranch tvSysInfoBookClosedBmp tvSysInfoBookClosedBmp // 2003-04-19 ------------------------------------ Stop Nils G. Svedmyr End_Procedure // OnCreateTree // This method will be called when the workspace object information is being enumerated. When // empty data is returned we skip the creation of treeview items Procedure DoAddWorkSpaceItems String sText Handle hItem If (sText <> "") Begin Get phCurrentRoot To hItem Get AddTreeItem sText hItem tiSysInfoWorkSpaceBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hItem End End_Procedure // DoAddWorkSpaceItems // Add information about the number of drivers loaded and (if applicable) to which servers the drivers // are used. Procedure DoAddDriversInfo String sDriverName sServerName Handle hItem hVoid hDriversRoot Integer iNumberOfDrivers iDriverNum iNumberOfServers iServerNum // 2003-04-19 ------------------------------------ Start Nils G. Svedmyr Integer iPos // 2003-04-19 ------------------------------------ Stop Nils G. Svedmyr Get phCurrentRoot To hItem Get_Attribute DF_NUMBER_DRIVERS To iNumberOfDrivers For iDriverNum From 1 To iNumberOfDrivers Get_Attribute DF_DRIVER_NAME Of iDriverNum To sDriverName If (sDriverName <> "") Begin Get AddTreeItem sDriverName hItem tiSysInfoDataBaseDriversBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid If (sDriverName <> "DATAFLEX") Begin Get_Attribute DF_DRIVER_NUMBER_SERVERS Of iDriverNum To iNumberOfServers If (iNumberOfServers > 0) Begin Get AddTreeItem C_$Servers hItem tiSysInfoDataBaseServersBranch tvSysInfoBookClosedBmp tvSysInfoBookClosedBmp To hDriversRoot If (hDriversRoot <> 0) Begin For iServerNum From 1 To iNumberOfServers Get_Attribute DF_DRIVER_SERVER_NAME Of iDriverNum iServerNum To sServerName // 2003-04-19 ------------------------------------ Start Nils G. Svedmyr Move (Pos("DATABASE=", sServerName)) To iPos If iPos Move (Right(sServerName, (Length(sServerName) - iPos + 1))) To sServerName Else Move (Pos(";", sServerName)) To iPos If iPos Move (Left(sServerName, (iPos - 1))) To sServerName // 2003-04-19 ------------------------------------ Stop Nils G. Svedmyr Get AddTreeItem sServerName hDriversRoot tiSysInfoDataBaseServersBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Loop End End End End Loop End_Procedure // DoAddDriversInfo // Add version information stored in the runtime, registry and files from the bindirectory Procedure DoAddVersionInfo Handle hRoot hVoid Integer iVersionMajor iVersionMinor iVersionRelease String sVdfServicePackVersion Version_Information iVersionMajor iVersionMinor iVersionRelease Get_Profile_String "" "CurrentVersionDescription" To sVdfServicePackVersion Get phCurrentRoot To hRoot Get AddTreeItem (SFormat (C_$RuntimeVersion, String (iVersionMajor) - "." - String (iVersionMinor) - "." - String (iVersionRelease))) hRoot tiSysInfoVersionBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Get AddTreeItem (SFormat (C_$PackageVersion, String (PKG_VERSION) - "." - String (PKG_REVISION) - "." - String (PKG_BUILD))) hRoot tiSysInfoVersionBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Get AddTreeItem (SFormat (C_$FMACVersion, String (FMAC_VERSION) - "." - String (FMAC_REVISION) - "." - String (FMAC_BUILD))) hRoot tiSysInfoVersionBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Get AddTreeItem (SFormat (C_$ServicePack, sVdfServicePackVersion)) hRoot tiSysInfoVersionBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid // 2003-04-14 ------------------------------------ Start Nils G. Svedmyr // Send DoAddBinFiles hRoot Send DoAddProgramsFiles hRoot // 2003-04-14 ------------------------------------ Stop Nils G. Svedmyr Send DoAddModuleNamesRoot hRoot End_Procedure // DoAddVersionInfo Procedure DoAddModuleNamesRoot Handle hRootItem Handle hTvRoot Get AddTreeItem C_$ModuleNames hRootItem tiSysInfoVersionsEnumeratedModulesDirBranch tvSysInfoBookClosedBmp tvSysInfoBookClosedBmp To hTvRoot Set ItemChildCount hTvRoot To 1 End_Procedure // DoAddModuleNamesRoot Procedure DoAddModuleNames Handle hRootItem Integer hoProcessModulesArray iModules iModule hoVersionInfo Boolean bOk String sModuleName sDirectoryName // 2003-04-14 ------------------------------------ Start Nils G. Svedmyr String sWindowsDir Get_Windows_Directory To sWindowsDir //*** Change NGS 2003-05-04. // 2003-04-14 ------------------------------------ Stop Nils G. Svedmyr Get Create U_cProcessModulesArray To hoProcessModulesArray If (hoProcessModulesArray <> 0) Begin Send DoEnumProcessModules Of hoProcessModulesArray Move (Item_Count (hoProcessModulesArray) - 1) To iModules If (iModules >= 0) Begin Get Create U_cVersionInfo To hoVersionInfo If (hoVersionInfo <> 0) Begin Move (Item_Count (hoProcessModulesArray) - 1) To iModules For iModule From 0 To iModules Get String_Value Of hoProcessModulesArray Item iModule To sModuleName If (sModuleName <> "") Begin Move sModuleName To sDirectoryName Move (ExtractFileName (sModuleName)) To sModuleName Move (PathRemoveFileSpec (AddressOf (sDirectoryName))) To bOk Move (CString (sModuleName)) To sModuleName Move (CString (sDirectoryName)) To sDirectoryName // 2003-04-14 ------------------------------------ Start Nils G. Svedmyr // Do not display Protection Plus hidden DLL's: If Not (sDirectoryName Contains (sWindowsDir + "\TEMP")) ; Send DoAddFile hoVersionInfo sDirectoryName sModuleName hRootItem True // 2003-04-14 ------------------------------------ Stop Nils G. Svedmyr End Loop Send Destroy Of hoVersionInfo End End Send Destroy Of hoProcessModulesArray End End_Procedure // DoAddModuleNames // This method is called for each file found in a specific directory // The file and path are separated specified because we don't want to duplicate the path on each // entry in the treeview (too much information) Procedure DoAddFile Integer hoVersionInfo String sDirName String sFileName Handle hTvRoot Boolean bShowDirectory String sFullFileName sFileDate sFileHour sFileMinute sFileSecond sVersion sFileDateTime DateTime dtFileDateTime Integer iVersionMajor iVersionMinor iVersionRelease iVersionBuild Boolean bIncluded Handle hVoid Move (Trim (sDirName)) To sDirName Move (Trim (sFileName)) To sFileName If (Right (sDirName, 1) <> SysConf (Sysconf_Dir_Separator)) Begin Move (sDirName - SysConf (Sysconf_Dir_Separator)) To sDirName End Move (sDirName - sFileName) To sFullFileName Get_File_Mod_Time sFullFileName To sFileDate sFileHour sFileMinute sFileSecond Move sFileDate To dtFileDateTime Move (DateSetHour (dtFileDateTime, sFileHour)) To dtFileDateTime Move (DateSetMinute (dtFileDateTime, sFileMinute)) To dtFileDateTime Move (DateSetSecond (dtFileDateTime, sFileSecond)) To dtFileDateTime Move dtFileDateTime To sFileDateTime Send DoCreate Of hoVersionInfo sFullFileName Get pbIncluded Of hoVersionInfo To bIncluded If (bIncluded) Begin Get piVersionMajor Of hoVersionInfo To iVersionMajor Get piVersionMinor Of hoVersionInfo To iVersionMinor Get piVersionRelease Of hoVersionInfo To iVersionRelease Get piVersionBuild Of hoVersionInfo To iVersionBuild Move (SFormat ("%1.%2.%3.%4", iVersionMajor, iVersionMinor, iVersionRelease, iVersionBuild)) To sVersion If (bShowDirectory) Begin Get AddTreeItem (sFullFileName - ":" * sVersion * "(" - sFileDateTime - ")") hTvRoot tiSysInfoVersionBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid End Else Begin Get AddTreeItem (sFileName - ":" * sVersion * "(" - sFileDateTime - ")") hTvRoot tiSysInfoVersionBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid End End Else Begin If (bShowDirectory) Begin Get AddTreeItem (sFullFileName - ": 0.0.0.0 (" - sFileDateTime - ")") hTvRoot tiSysInfoVersionBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid End Else Begin Get AddTreeItem (sFileName - ":" * sVersion * "(" - sFileDateTime - ")") hTvRoot tiSysInfoVersionBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid End End End_Procedure // DoAddFile // Add an entry to the treeview to make it possible for the user to explore the // files from the DataFlex bin directory (specified by VDFROOTDIR). Procedure DoAddBinFiles Handle hTvRoot String sVdfRootDir Get_Profile_String "Defaults" "VdfRootDir" To sVdfRootDir Move (Trim (sVdfRootDir)) To sVdfRootDir If (Right (sVdfRootDir, 1) <> SysConf (Sysconf_Dir_Separator)) Begin Move (sVdfRootDir - SysConf (Sysconf_Dir_Separator)) To sVdfRootDir End Move (sVdfRootDir - "Bin") To sVdfRootDir If (PathIsDirectory (Self, sVdfRootDir)) Begin Get AddTreeItem (SFormat (C_$FilesFrom, sVdfRootDir)) hTvRoot tiSysInfoVersionsOfBinDirBranch tvSysInfoBookClosedBmp tvSysInfoBookClosedBmp To hTvRoot Set ItemChildCount hTvRoot To 1 End End_Procedure // DoAddBinFiles // This method will be called when the user clicks on the entry "files from..." Procedure DoAddBinFilesInfo Handle hRoot Integer iChannel hoVersionInfo String sVdfRootDir sDirEntry sExtension sInputDirMask Get phCurrentRoot To hRoot Get Seq_New_Channel To iChannel If (iChannel >= DF_SEQ_CHANNEL_MIN And iChannel <= DF_SEQ_CHANNEL_MAX) Begin Send Cursor_Wait Of Cursor_Control Get Create U_cVersionInfo To hoVersionInfo Get ItemLabel hRoot To sVdfRootDir Move (Trim (Right (sVdfRootDir, Length (sVdfRootDir) - Pos (":", sVdfRootDir)))) To sVdfRootDir Move ("DIR:" - sVdfRootDir - "\*.*") To sInputDirMask Direct_Input Channel iChannel sInputDirMask While (Not (Seqeof)) Readln Channel iChannel sDirEntry If (Not (Seqeof) And Left (sDirEntry, 1) <> "[") Begin Get PathFindExtension sDirEntry To sExtension If (".DLL.EXE.DRV" Contains Uppercase (sExtension)) Begin Send DoAddFile hoVersionInfo sVdfRootDir sDirEntry hRoot False End End End Close_Input Channel iChannel Send Destroy Of hoVersionInfo Send Seq_Release_Channel iChannel Send Cursor_Ready Of Cursor_Control End End_Procedure // DoAddBinFilesInfo // This method will be called when the user clicks on the entry "files from..." // *** Added 2003-04-14 by NGS. Reads from .\Programs folder instead of .\Bin Procedure DoAddProgramsFilesInfo Handle hRoot Integer iChannel hoVersionInfo String sVdfRootDir sDirEntry sExtension sInputDirMask sProgramsDir Get phCurrentRoot To hRoot Get Seq_New_Channel To iChannel If (iChannel >= DF_SEQ_CHANNEL_MIN And iChannel <= DF_SEQ_CHANNEL_MAX) Begin Send Cursor_Wait Of Cursor_Control Get Create U_cVersionInfo To hoVersionInfo // Get ItemLabel hRoot To sVdfRootDir // Move (Trim (Right (sVdfRootDir, Length (sVdfRootDir) - Pos (":", sVdfRootDir)))) To sVdfRootDir // Move ("DIR:" - sVdfRootDir - "\*.*") To sInputDirMask Get GetApplicationPath Of oApplication To sProgramsDir Move ("DIR:" - sProgramsDir - "\*.*") To sInputDirMask Direct_Input Channel iChannel sInputDirMask While (Not (Seqeof)) Readln Channel iChannel sDirEntry If (Not (Seqeof) And Left (sDirEntry, 1) <> "[") Begin Get PathFindExtension sDirEntry To sExtension If (".DLL.EXE.DRV" Contains Uppercase (sExtension)) Begin Send DoAddFile hoVersionInfo sVdfRootDir sDirEntry hRoot False End End End Close_Input Channel iChannel Send Destroy Of hoVersionInfo Send Seq_Release_Channel iChannel Send Cursor_Ready Of Cursor_Control End End_Procedure // DoAddProgramsFilesInfo // Add an entry to the treeview to make it possible for the user to explore the // files from the DataFlex bin directory (specified by VDFROOTDIR). // *** Added 2003-04-14 by NGS. Reads from .\Programs folder instead of .\Bin Procedure DoAddProgramsFiles Handle hTvRoot String sVdfRootDir // Get_Profile_String "Defaults" "VdfRootDir" To sVdfRootDir Get GetApplicationPath Of oApplication To sVdfRootDir Move (Trim (sVdfRootDir)) To sVdfRootDir If (Right (sVdfRootDir, 1) <> SysConf (Sysconf_Dir_Separator)) Begin Move (sVdfRootDir - SysConf (Sysconf_Dir_Separator)) To sVdfRootDir End // Move (sVdfRootDir - "Bin") To sVdfRootDir If (PathIsDirectory (Self, sVdfRootDir)) Begin Get AddTreeItem (SFormat (C_$FilesFrom, sVdfRootDir)) hTvRoot tiSysInfoVersionsOfBinDirBranch tvSysInfoBookClosedBmp tvSysInfoBookClosedBmp To hTvRoot Set ItemChildCount hTvRoot To 1 End End_Procedure // DoAddProgramsFiles // Add information about the amount of available memory and the usage according to windows Procedure DoAddMemoryInfo String sMemoryStatus Integer iVoid iMemAvail Dword dwMemoryLoad dwTotalPhys dwAvailPhys dwTotalPageFile dwAvailPageFile dwTotalVirtual dwAvailVirtual Handle hItem hVoid Get phCurrentRoot To hItem ZeroType MEMORYSTATUS To sMemoryStatus Put MEMORYSTATUS_Size To sMemoryStatus At MEMORYSTATUS.dwLength // 2003-04-14 ------------------------------------ Start Nils G. Svedmyr #IFDEF GET_GlobalMemoryStatus Move (GlobalMemoryStatus (AddressOf (sMemoryStatus))) To iVoid #ELSE Move (WinAPI_GlobalMemoryStatus (AddressOf (sMemoryStatus))) To iVoid #ENDIF // 2003-04-14 ------------------------------------ Stop Nils G. Svedmyr GetBuff From sMemoryStatus At MEMORYSTATUS.dwMemoryLoad To dwMemoryLoad GetBuff From sMemoryStatus At MEMORYSTATUS.dwTotalPhys To dwTotalPhys GetBuff From sMemoryStatus At MEMORYSTATUS.dwAvailPhys To dwAvailPhys GetBuff From sMemoryStatus At MEMORYSTATUS.dwTotalPageFile To dwTotalPageFile GetBuff From sMemoryStatus At MEMORYSTATUS.dwAvailPageFile To dwAvailPageFile GetBuff From sMemoryStatus At MEMORYSTATUS.dwTotalVirtual To dwTotalVirtual GetBuff From sMemoryStatus At MEMORYSTATUS.dwAvailVirtual To dwAvailVirtual // 2003-04-14 ------------------------------------ Start Nils G. Svedmyr Get AddTreeItem ((SFormat (C_$MemoryUtilization, dwMemoryLoad)) * "%") hItem tiSysInfoMemoryBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Get AddTreeItem ((SFormat (C_$AvailablePhysicalMemory, Round(dwAvailPhys / dwTotalPhys * 100.0))) * "%") hItem tiSysInfoMemoryBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Get AddTreeItem ((SFormat (C_$AvailablePagefileSpace, Round(dwAvailPageFile / dwTotalPageFile * 100.0))) * "%") hItem tiSysInfoMemoryBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Get AddTreeItem ((SFormat (C_$AvailableVirtualMemory, Round(dwAvailVirtual / dwTotalVirtual * 100.0))) * "%") hItem tiSysInfoMemoryBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Memory iMemAvail Get AddTreeItem ((SFormat (C_$AvailableMemoryBytes, (iMemAvail/1024))) * "Kb") hItem tiSysInfoMemoryBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid // 2003-04-14 ------------------------------------ Stop Nils G. Svedmyr End_Procedure // DoAddMemoryInfo // This method fills the treeview with information about the current directory, the windows directory // and the current filelist. Especially usefull when there is no use of workspaces Procedure DoAddFilesAndDirInfo String sDirectory sFilename sLogicalDrivesString sDriveId Integer iLogicalDrivesStringLength iDriveNum iDriveType Handle hItem hVoid hChildItem Get phCurrentRoot To hItem Get_Current_Directory To sDirectory Get AddTreeItem C_$WindowsCurrentDirectory hItem tiSysInfoFilesDirBranchItem tvSysInfoBookClosedBmp tvSysInfoBookClosedBmp To hChildItem Get AddTreeItem sDirectory hChildItem tiSysInfoFilesDirBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Get AddTreeItem (SFormat (C_$DirNameShort, GetShortPathName (Self, sDirectory))) hChildItem tiSysInfoFilesDirBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Get AddTreeItem (SFormat (C_$DirNameLong, GetLongPathName (Self, sDirectory))) hChildItem tiSysInfoFilesDirBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Get_Windows_Directory To sDirectory Get AddTreeItem C_$WindowsBaseDirectory hItem tiSysInfoFilesDirBranchItem tvSysInfoBookClosedBmp tvSysInfoBookClosedBmp To hChildItem Get AddTreeItem sDirectory hChildItem tiSysInfoFilesDirBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Get AddTreeItem (SFormat (C_$DirNameShort, GetShortPathName (Self, sDirectory))) hChildItem tiSysInfoFilesDirBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Get AddTreeItem (SFormat (C_$DirNameLong, GetLongPathName (Self, sDirectory))) hChildItem tiSysInfoFilesDirBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Get GetSystemDirectory To sDirectory Get AddTreeItem C_$SystemDirectory hItem tiSysInfoFilesDirBranchItem tvSysInfoBookClosedBmp tvSysInfoBookClosedBmp To hChildItem Get AddTreeItem sDirectory hChildItem tiSysInfoFilesDirBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Get AddTreeItem (SFormat (C_$DirNameShort, GetShortPathName (Self, sDirectory))) hChildItem tiSysInfoFilesDirBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Get AddTreeItem (SFormat (C_$DirNameLong, GetLongPathName (Self, sDirectory))) hChildItem tiSysInfoFilesDirBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Get GetTempPath To sDirectory Get AddTreeItem C_$TempPath hItem tiSysInfoFilesDirBranchItem tvSysInfoBookClosedBmp tvSysInfoBookClosedBmp To hChildItem If (PathIsDirectory (Self, sDirectory)) Begin Get AddTreeItem sDirectory hChildItem tiSysInfoFilesDirBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Get AddTreeItem (SFormat (C_$DirNameShort, GetShortPathName (Self, sDirectory))) hChildItem tiSysInfoFilesDirBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Get AddTreeItem (SFormat (C_$DirNameLong, GetLongPathName (Self, sDirectory))) hChildItem tiSysInfoFilesDirBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid End Else Begin Get AddTreeItem (SFormat (C_$NotValidDirectory, sDirectory)) hChildItem tiSysInfoFilesDirBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid End If (SysConf (SYSCONF_OS_MAJOR_REV) >= 5) Begin Get AddTreeItem C_$ProfilesDirectory hItem tiSysInfoFilesDirBranchItem tvSysInfoBookClosedBmp tvSysInfoBookClosedBmp To hChildItem Get GetProfilesDirectory To sDirectory Get AddTreeItem sDirectory hChildItem tiSysInfoFilesDirBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Get AddTreeItem (SFormat (C_$DirNameShort, GetShortPathName (Self, sDirectory))) hChildItem tiSysInfoFilesDirBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Get AddTreeItem (SFormat (C_$DirNameLong, GetLongPathName (Self, sDirectory))) hChildItem tiSysInfoFilesDirBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Get AddTreeItem C_$AllUsersProfileDirectory hItem tiSysInfoFilesDirBranchItem tvSysInfoBookClosedBmp tvSysInfoBookClosedBmp To hChildItem Get GetAllUsersProfileDirectory To sDirectory Get AddTreeItem sDirectory hChildItem tiSysInfoFilesDirBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Get AddTreeItem (SFormat (C_$DirNameShort, GetShortPathName (Self, sDirectory))) hChildItem tiSysInfoFilesDirBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Get AddTreeItem (SFormat (C_$DirNameLong, GetLongPathName (Self, sDirectory))) hChildItem tiSysInfoFilesDirBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Get AddTreeItem C_$DefaultUserProfileDirectory hItem tiSysInfoFilesDirBranchItem tvSysInfoBookClosedBmp tvSysInfoBookClosedBmp To hChildItem Get GetDefaultUserProfileDirectory To sDirectory Get AddTreeItem sDirectory hChildItem tiSysInfoFilesDirBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Get AddTreeItem (SFormat (C_$DirNameShort, GetShortPathName (Self, sDirectory))) hChildItem tiSysInfoFilesDirBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Get AddTreeItem (SFormat (C_$DirNameLong, GetLongPathName (Self, sDirectory))) hChildItem tiSysInfoFilesDirBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid End Get AddTreeItem C_$CurrentFilelistCFG hItem tiSysInfoFilesDirBranchItem tvSysInfoBookClosedBmp tvSysInfoBookClosedBmp To hChildItem Get_Attribute Df_Filelist_Name To sFilename Get AddTreeItem sFilename hChildItem tiSysInfoFilesDirBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Get AddTreeItem (SFormat (C_$DirNameShort, GetShortPathName (Self, sFilename))) hChildItem tiSysInfoFilesDirBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Get AddTreeItem (SFormat (C_$DirNameLong, GetLongPathName (Self, sFilename))) hChildItem tiSysInfoFilesDirBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Get AddTreeItem C_$LogicalDrives hItem tiSysInfoFilesDirBranchItem tvSysInfoBookClosedBmp tvSysInfoBookClosedBmp To hChildItem Get GetLogicalDriveStrings To sLogicalDrivesString Move (Length (sLogicalDrivesString)) To iLogicalDrivesStringLength For iDriveNum From 1 To iLogicalDrivesStringLength Move (Mid (sLogicalDrivesString, 3, iDriveNum)) To sDriveId Get GetDriveType sDriveId To iDriveType Get AddTreeItem (sDriveId * "(" - DriveType2Descr (Self, iDriveType) - ")") hChildItem tiSysInfoFilesDirBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Move (iDriveNum + 3) To iDriveNum Loop End_Procedure // DoAddFilesAndDirInfo // This method finds out what kind of keyboard is attached, how many functionkeys are available // and what the name of keyboard layout is. Procedure DoAddKeyboardInfo Integer iKeyboardType String sKeyBoardType Handle hRoot hVoid Get phCurrentRoot To hRoot Move (GetKeyboardType (Self, Keyboard_Type)) To iKeyboardType Case Begin Case (iKeyboardType = IBM_PC_XT_Or_Compatible_Keyboard) Move C_$IBMPCXTCompatibleKeyboard To sKeyBoardType Case Break Case (iKeyboardType = Olivetti_ICO_Keyboard) Move C_$OlivettiICOKeyboard To sKeyBoardType Case Break Case (iKeyboardType = IBM_PC_AT_Or_Similar_Keyboard) Move C_$IBMPCATOrSimilarKeyboard To sKeyBoardType Case Break Case (iKeyboardType = IBM_Enhanced_Keyboard) Move C_$IBMEnhancedKeyboard To sKeyBoardType Case Break Case (iKeyboardType = Nokia_1050_And_Similar_Keyboards) Move C_$Nokia1050AndSimilarKeyboards To sKeyBoardType Case Break Case (iKeyboardType = Nokia_9140_And_Similar_Keyboards) Move C_$Nokia9140AndSimilarKeyboards To sKeyBoardType Case Break Case (iKeyboardType = Japanese_Keyboard) Move C_$JapaneseKeyboards To sKeyBoardType Case Break Case Else Move (SFormat (C_$KeyboadUndefined, iKeyboardType)) To sKeyBoardType Case Break Case End Get AddTreeItem (SFormat (C_$KeyBoardType, sKeyBoardType)) hRoot tiSysInfoKeyboardBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Get AddTreeItem (SFormat (C_$KeyboardFunctionKeys, GetKeyboardType (Self, Keyboard_Function_Key_Count))) hRoot tiSysInfoKeyboardBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Get AddTreeItem (SFormat (C_$KeyboardLayoutName, GetKeyboardLayoutName (Self))) hRoot tiSysInfoKeyboardBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid End_Procedure // DoAddKeyboardInfo // The following definitions make is possible for us to find out if the defined physical key connected // to a DataFlex accelerator key is a function key, whether the shift, alt or ctrl is active. Define Alt_Key For |CI$0200 Define Shift_Key For |CI$0400 Define Ctrl_Key For |CI$0800 Define Function_Key For |CI$1000 // This object contains the names of the physical keys. // It is an internal object used by the function AccKeyName Object oPhysicalKeys Is An Array Set Array_Value Item 1 To C_$EnterKey Set Array_Value Item 2 To C_$TabKey Set Array_Value Item 3 To C_$BackspaceKey Set Array_Value Item 4 To C_$EscKey Set Array_Value Item 5 To C_$UpArrowKey Set Array_Value Item 6 To C_$DownArrowKey Set Array_Value Item 7 To C_$LeftArrowKey Set Array_Value Item 8 To C_$RightArrowKey Set Array_Value Item 9 To C_$HomeKey Set Array_Value Item 10 To C_$EndKey Set Array_Value Item 11 To C_$PgUpKey Set Array_Value Item 12 To C_$PgDnKey Set Array_Value Item 13 To C_$InsKey Set Array_Value Item 14 To C_$DelKey Set Array_Value Item 16 To C_$F1Key Set Array_Value Item 17 To C_$F2Key Set Array_Value Item 18 To C_$F3Key Set Array_Value Item 19 To C_$F4Key Set Array_Value Item 20 To C_$F5Key Set Array_Value Item 21 To C_$F6Key Set Array_Value Item 22 To C_$F7Key Set Array_Value Item 23 To C_$F8Key Set Array_Value Item 24 To C_$F9Key Set Array_Value Item 25 To C_$F10Key Set Array_Value Item 26 To C_$F11Key Set Array_Value Item 27 To C_$F12Key End_Object // oPhysicalKeys // This function translates a given keyvalue (kPrint_Screen for example) into a physical key // and from there to a keyname. // It is an internal function called from DoAddAccKey Function AccKeyName Integer iKeyVal Returns String Integer iBaseKey String sKey sKeycap If (iKeyVal = 0) Begin Function_Return C_$AccKeyUndefined End Move (Key_Physical (iKeyVal)) To iKeyVal Move (iKeyVal Iand $FF) To iBaseKey Case Begin Case ((iKeyVal Iand Ctrl_Key) = Ctrl_Key) Move C_$KeyCtrlAnd To sKey Case Break Case ((iKeyVal Iand Shift_Key) = Shift_Key) Move C_$KeyShiftAnd To sKey Case Break Case ((iKeyVal Iand Alt_Key) = Alt_Key) Move C_$KeyAltAnd To sKey Case Break Case End If ((iKeyVal Iand Function_Key) = Function_Key) Begin Get String_Value Of oPhysicalKeys iBasekey To sKeyCap End Else Begin If ((iBasekey < $20) = True) Begin Move (iBasekey Ior $40) To iBasekey End Move (Character (iBasekey)) To sKeycap Case Begin Case (sKeycap = " ") Move C_$KeySpace To sKeycap Case Break Case (sKeycap = "+") Move C_$KeyAdd To sKeycap Case Break Case (sKeycap = "-") Move C_$KeySubtract To sKeycap Case Break Case Else Move (Uppercase (sKeycap)) To sKeycap Case Break Case End End Function_Return (sKey - sKeyCap) End_Function // AccKeyName // This method will add an accelerator key as description, keyname and functionkey name to the treeview // It is an internal function called from DoAddAccKeyInfo Procedure DoAddAccKey Handle hRoot String sFunctionName String sKeyName Integer iAccKeyNumber Handle hItem hVoid Get AddTreeItem sFunctionName hRoot tiSysInfoAccKeysBranchItem tvSysInfoBookClosedBmp tvSysInfoBookClosedBmp To hItem Get AddTreeItem (SFormat (C_$KeyName, sKeyName)) hItem tiSysInfoAccKeysBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Get AddTreeItem (SFormat (C_$FunctionKey, AccKeyName (Self, iAccKeyNumber))) hItem tiSysInfoAccKeysBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid End_Procedure // DoAddAccKey // This method will be called when the user explore the accelerator keynames treeview branch // and will add keyname and identifier code to the treeview for all DataFlex accelerator keys Procedure DoAddAccKeyInfo Handle hRoot Get phCurrentRoot To hRoot Send DoAddAccKey hRoot C_$PrintScreen C_$kPrintScreen kPrint_Screen Send DoAddAccKey hRoot C_$Escape C_$kCancel kCancel Send DoAddAccKey hRoot C_$LeftArrow C_$kLeftArrow kLeftArrow Send DoAddAccKey hRoot C_$RightArrow C_$kRightArrow kRightArrow Send DoAddAccKey hRoot C_$PreviousItem C_$kPreviousItem kPrevious_Item Send DoAddAccKey hRoot C_$Find C_$kFind kFind // Send DoAddAccKey hRoot C_$SuperFind C_$kSuperFind kSuper_Find Send DoAddAccKey hRoot C_$Saverecord C_$kSaveRecord kSave_Record Send DoAddAccKey hRoot C_$DeleteRecord C_$kDeleteRecord kDelete_Record // Send DoAddAccKey hRoot C_$Calculate C_$kCalculate kCalculate // Send DoAddAccKey hRoot C_$UserDefined1 C_$kUser kUser Send DoAddAccKey hRoot C_$ClearPanel C_$kClear kClear Send DoAddAccKey hRoot C_$FindPrevious C_$kFindPrevious kFind_Previous Send DoAddAccKey hRoot C_$FindNext C_$kFindNext kFind_Next Send DoAddAccKey hRoot C_$UpArrow C_$kUpArrow kUpArrow Send DoAddAccKey hRoot C_$DownArrow C_$kDownArrow kDownArrow Send DoAddAccKey hRoot C_$Help C_$kHelp kHelp // Send DoAddAccKey hRoot C_$UserDefined2 C_$kUser2 kUser2 Send DoAddAccKey hRoot C_$Insert C_$kInsert kInsert Send DoAddAccKey hRoot C_$DeleteCharacter C_$kDeleteCharacter kDelete_Character Send DoAddAccKey hRoot C_$Backspace C_$kBack_Space kBack_Space // Send DoAddAccKey hRoot C_$ClearAndReturn C_$kClearAndReturn kClear_And_Return // Send DoAddAccKey hRoot C_$ClearAndBackspace C_$kClEOW kClEOW // Send DoAddAccKey hRoot C_$ExitFunction C_$kExitFunction kExit_Function Send DoAddAccKey hRoot C_$ExitApplication C_$kExitApplication kExit_Application Send DoAddAccKey hRoot C_$Prompt C_$kPrompt kPrompt // Send DoAddAccKey hRoot C_$RefreshScreen C_$kRefreshScreen kRefresh_Screen Send DoAddAccKey hRoot C_$SwitchToNextPanel C_$kSwitch kSwitch Send DoAddAccKey hRoot C_$SwitchToPreviousPanel C_$kSwitchBack kSwitch_Back // Send DoAddAccKey hRoot C_$SuperfindPrevious C_$kSuperFindPrevious kSuper_Find_Previous // Send DoAddAccKey hRoot C_$SuperfindNext C_$kSuperFind_Next kSuper_Find_Next Send DoAddAccKey hRoot C_$SwitchToActionBar C_$kActionBar kAction_Bar Send DoAddAccKey hRoot C_$ScrollPageUp C_$kScrollBack kScroll_Back Send DoAddAccKey hRoot C_$ScrollPageDown C_$kScrollForward kScroll_Forward Send DoAddAccKey hRoot C_$ScrollPageLeft C_$kScrollLeft kScroll_Left Send DoAddAccKey hRoot C_$ScrollPageRight C_$kScrollRight kScroll_Right Send DoAddAccKey hRoot C_$BeginOfLine C_$kBeginOfLine kBegin_Of_Line Send DoAddAccKey hRoot C_$EndOfLine C_$kEndOfLine kEnd_Of_Line Send DoAddAccKey hRoot C_$NextItem C_$kNextItem kNext_Item Send DoAddAccKey hRoot C_$EraseToEndOfLine C_$kEraseEndOfLine kErase_End_Of_Line Send DoAddAccKey hRoot C_$BeginOfPanel C_$kBeginOfPanel kBegin_Of_Panel Send DoAddAccKey hRoot C_$EndOfPanel C_$kEndOfPanel kEnd_Of_Panel Send DoAddAccKey hRoot C_$BeginOfData C_$kBeginOfData kBegin_Of_Data Send DoAddAccKey hRoot C_$EndOfData C_$kEndOfData kEnd_Of_Data Send DoAddAccKey hRoot C_$SkipWordLeft C_$kWordLeft kWord_Left Send DoAddAccKey hRoot C_$SkipWordRight C_$kWordRight kWord_Right // Send DoAddAccKey hRoot C_$AddMode C_$kAddMode kAdd_Mode Send DoAddAccKey hRoot C_$Paste C_$kPaste kPaste Send DoAddAccKey hRoot C_$Copy C_$kCopy kCopy Send DoAddAccKey hRoot C_$Cut C_$kCut kCut Send DoAddAccKey hRoot C_$ClearAllPanels C_$kClearAll kClear_All Send DoAddAccKey hRoot C_$Mark C_$kMark kMark // Send DoAddAccKey hRoot C_$Zoom C_$kZoom kZoom Send DoAddAccKey hRoot C_$ClosePanel C_$kClosePanel kClose_Panel End_Procedure // DoAddAccKeyInfo // Report the DataFlex serialnumber and registration name Procedure DoAddRegistrationInfo String sRegName sSerialNr Handle hItem hVoid Get phCurrentRoot To hItem //Registration sRegName iSerialNr Get psName Of oApplication To sRegName Get psSerial Of oApplication To sSerialNr Get AddTreeItem (SFormat (C_$Serial, sSerialNr)) hItem tiSysInfoRegistrationBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Get AddTreeItem (SFormat (C_$RegName, sRegName)) hItem tiSysInfoRegistrationBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid End_Procedure // DoAddRegistrationInfo // Add information belonging to the currently logged in user Procedure DoAddUserInfo Handle hRoot hVoid Integer iUserDefaultLangID Get phCurrentRoot To hRoot Get AddTreeItem (SFormat (C_$UserName, GetUserName (Self))) hRoot tiSysInfoUserBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Get AddTreeItem (SFormat (C_$ComputerName, GetComputerName (Self))) hRoot tiSysInfoUserBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Get AddTreeItem (SFormat (C_$DoubleClickTime, GetDoubleClickTime (Self), C_$Milliseconds)) hRoot tiSysInfoUserBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Get GetUserDefaultLangID To iUserDefaultLangID Get AddTreeItem (SFormat (C_$LanguageIDAndName, iUserDefaultLangID, LanguageId2Name (Self, iUserDefaultLangID))) hRoot tiSysInfoUserBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid End_Procedure // DoAddUserInfo // Report all windows locale information. The function do simply return what is stored and make no // decisions on this. So when the function says 1 and this has an explanation the Windows doc should // be read Procedure DoAddWindowsLocaleInfo Handle hRoot hVoid hChildRoot hNamesRoot hChildChildRoot hCalendarRoot Integer iCalendarType Boolean bPreviousOemTranslate Get phCurrentRoot To hRoot Get Oem_Translate_State To bPreviousOemTranslate Set Oem_Translate_State To False Get AddTreeItem (SFormat (ToAnsi (C_$ListSeparator), WindowsLocaleValue (Self, LOCALE_SLIST, 4))) hRoot tiSysInfoUserBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Get AddTreeItem (SFormat (ToAnsi (C_$MeasureId), WindowsLocaleValue (Self, LOCALE_IMEASURE, 2))) hRoot tiSysInfoUserBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Get AddTreeItem (SFormat (ToAnsi (C_$PaperSize), WindowsLocaleValue (Self, LOCALE_IPAPERSIZE, 10))) hRoot tiSysInfoUserBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Get AddTreeItem (ToAnsi (C_$Numbers)) hRoot tiSysInfoUserBranchItem tvSysInfoBookClosedBmp tvSysInfoBookClosedBmp To hChildRoot Get AddTreeItem (SFormat (ToAnsi (C_$DecimalSeparator), WindowsLocaleValue (Self, LOCALE_SDECIMAL, 5))) hChildRoot tiSysInfoUserBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Get AddTreeItem (SFormat (ToAnsi (C_$WindowsLocaleThousandsSeparator), WindowsLocaleValue (Self, LOCALE_STHOUSAND, 5))) hChildRoot tiSysInfoUserBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Get AddTreeItem (SFormat (ToAnsi (C_$DecimalGrouping), WindowsLocaleValue (Self, LOCALE_SGROUPING, 10))) hChildRoot tiSysInfoUserBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Get AddTreeItem (SFormat (ToAnsi (C_$Digits), WindowsLocaleValue (Self, LOCALE_IDIGITS, 3))) hChildRoot tiSysInfoUserBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Get AddTreeItem (SFormat (ToAnsi (C_$LeadingZeroes), WindowsLocaleValue (Self, LOCALE_ILZERO, 2))) hChildRoot tiSysInfoUserBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Get AddTreeItem (SFormat (ToAnsi (C_$NegativeNumberMode), WindowsLocaleValue (Self, LOCALE_INEGNUMBER, 2))) hChildRoot tiSysInfoUserBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Get AddTreeItem (SFormat (ToAnsi (C_$NativeDigits), WindowsLocaleValue (Self, LOCALE_SNATIVEDIGITS, 2))) hChildRoot tiSysInfoUserBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Get AddTreeItem (ToAnsi (C_$Language)) hRoot tiSysInfoUserBranchItem tvSysInfoBookClosedBmp tvSysInfoBookClosedBmp To hChildRoot Get AddTreeItem (SFormat (ToAnsi (C_$LanguageId), WindowsLocaleValue (Self, LOCALE_ILANGUAGE, 5))) hChildRoot tiSysInfoUserBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Get AddTreeItem (SFormat (ToAnsi (C_$LanguageName), WindowsLocaleValue (Self, LOCALE_SLANGUAGE, 100))) hChildRoot tiSysInfoUserBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Get AddTreeItem (SFormat (ToAnsi (C_$LanguageISOName), WindowsLocaleValue (Self, LOCALE_SENGLANGUAGE, 100))) hChildRoot tiSysInfoUserBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Get AddTreeItem (SFormat (ToAnsi (C_$LanguageAbbreviatedName), WindowsLocaleValue (Self, LOCALE_SABBREVLANGNAME, 3))) hChildRoot tiSysInfoUserBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Get AddTreeItem (SFormat (ToAnsi (C_$LanguageNativeName), WindowsLocaleValue (Self, LOCALE_SNATIVELANGNAME, 100))) hChildRoot tiSysInfoUserBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Get AddTreeItem (ToAnsi (C_$Currency)) hRoot tiSysInfoUserBranchItem tvSysInfoBookClosedBmp tvSysInfoBookClosedBmp To hChildRoot Get AddTreeItem (SFormat (ToAnsi (C_$CurrencyLocalSymbol), WindowsLocaleValue (Self, LOCALE_SCURRENCY, 6))) hChildRoot tiSysInfoUserBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Get AddTreeItem (SFormat (ToAnsi (C_$IntlSymbol), WindowsLocaleValue (Self, LOCALE_SINTLSYMBOL, 4))) hChildRoot tiSysInfoUserBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Get AddTreeItem (SFormat (ToAnsi (C_$MonetaryDecimalSeparator), WindowsLocaleValue (Self, LOCALE_SMONDECIMALSEP, 4))) hChildRoot tiSysInfoUserBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Get AddTreeItem (SFormat (ToAnsi (C_$MonetaryThousandsSeparator), WindowsLocaleValue (Self, LOCALE_SMONTHOUSANDSEP, 4))) hChildRoot tiSysInfoUserBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Get AddTreeItem (SFormat (ToAnsi (C_$MonetaryGrouping), WindowsLocaleValue (Self, LOCALE_SMONGROUPING, 4))) hChildRoot tiSysInfoUserBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Get AddTreeItem (SFormat (ToAnsi (C_$LocalDigits), WindowsLocaleValue (Self, LOCALE_ICURRDIGITS, 3))) hChildRoot tiSysInfoUserBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Get AddTreeItem (SFormat (ToAnsi (C_$IntlDigits), WindowsLocaleValue (Self, LOCALE_IINTLCURRDIGITS, 3))) hChildRoot tiSysInfoUserBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Get AddTreeItem (SFormat (ToAnsi (C_$PositiveMode), WindowsLocaleValue (Self, LOCALE_ICURRENCY, 2))) hChildRoot tiSysInfoUserBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Get AddTreeItem (SFormat (ToAnsi (C_$NegativeMode), WindowsLocaleValue (Self, LOCALE_INEGCURR, 3))) hChildRoot tiSysInfoUserBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Get AddTreeItem (SFormat (ToAnsi (C_$PositiveSign), WindowsLocaleValue (Self, LOCALE_SPOSITIVESIGN, 2))) hChildRoot tiSysInfoUserBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Get AddTreeItem (SFormat (ToAnsi (C_$NegativeSign), WindowsLocaleValue (Self, LOCALE_SNEGATIVESIGN, 2))) hChildRoot tiSysInfoUserBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Get AddTreeItem (SFormat (ToAnsi (C_$FormattingIndexForPositiveValues), WindowsLocaleValue (Self, LOCALE_IPOSSIGNPOSN, 2))) hChildRoot tiSysInfoUserBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Get AddTreeItem (SFormat (ToAnsi (C_$FormattingIndexForNegativeValues), WindowsLocaleValue (Self, LOCALE_INEGSIGNPOSN, 2))) hChildRoot tiSysInfoUserBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Get AddTreeItem (SFormat (ToAnsi (C_$MonetarySymbolPositionInAPositiveValue), WindowsLocaleValue (Self, LOCALE_IPOSSYMPRECEDES, 2))) hChildRoot tiSysInfoUserBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Get AddTreeItem (SFormat (ToAnsi (C_$MonetarySymbolSeparationInAPositiveValue), WindowsLocaleValue (Self, LOCALE_IPOSSEPBYSPACE, 2))) hChildRoot tiSysInfoUserBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Get AddTreeItem (SFormat (ToAnsi (C_$MonetarySymbolPositionInANegativeValue), WindowsLocaleValue (Self, LOCALE_INEGSYMPRECEDES, 2))) hChildRoot tiSysInfoUserBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Get AddTreeItem (SFormat (ToAnsi (C_$MonetarySymbolSeparationInANegativeValue), WindowsLocaleValue (Self, LOCALE_INEGSEPBYSPACE, 2))) hChildRoot tiSysInfoUserBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Get AddTreeItem (ToAnsi (C_$Time)) hRoot tiSysInfoUserBranchItem tvSysInfoBookClosedBmp tvSysInfoBookClosedBmp To hChildRoot Get AddTreeItem (SFormat (ToAnsi (C_$Separator), WindowsLocaleValue (Self, LOCALE_STIME, 2))) hChildRoot tiSysInfoUserBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Get AddTreeItem (SFormat (ToAnsi (C_$Format), WindowsLocaleValue (Self, LOCALE_STIMEFORMAT, 100))) hChildRoot tiSysInfoUserBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Get AddTreeItem (SFormat (ToAnsi (C_$PeriodeFormat), WindowsLocaleValue (Self, LOCALE_ITIME, 2))) hChildRoot tiSysInfoUserBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Get AddTreeItem (SFormat (ToAnsi (C_$MarkerPosition), WindowsLocaleValue (Self, LOCALE_ITIMEMARKPOSN, 2))) hChildRoot tiSysInfoUserBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Get AddTreeItem (SFormat (ToAnsi (C_$UseLeadingZeroes), WindowsLocaleValue (Self, LOCALE_ITLZERO, 2))) hChildRoot tiSysInfoUserBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Get AddTreeItem (SFormat (ToAnsi (C_$AMDesignator), WindowsLocaleValue (Self, LOCALE_S1159, 10))) hChildRoot tiSysInfoUserBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Get AddTreeItem (SFormat (ToAnsi (C_$PMDesignator), WindowsLocaleValue (Self, LOCALE_S2359, 10))) hChildRoot tiSysInfoUserBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Get AddTreeItem (ToAnsi (C_$Date)) hRoot tiSysInfoUserBranchItem tvSysInfoBookClosedBmp tvSysInfoBookClosedBmp To hChildRoot Move (WindowsLocaleValue (Self, LOCALE_ICALENDARTYPE, 2)) To iCalendarType Get AddTreeItem (SFormat (ToAnsi (C_$Calendartype), iCalendarType)) hChildRoot tiSysInfoUserBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hCalendarRoot If (SysConf (SYSCONF_OS_MAJOR_REV) >= 5) Begin Set ItemImage hCalendarRoot To tvSysInfoBookClosedBmp Set ItemSelectedImage hCalendarRoot To tvSysInfoBookClosedBmp Get AddTreeItem (SFormat (ToAnsi (C_$WindowsEpoch), GetCalendarInfo (Self, LOCALE_USER_DEFAULT, iCalendarType, CAL_ITWODIGITYEARMAX))) hCalendarRoot tiSysInfoUserBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid End Move (WindowsLocaleValue (Self, LOCALE_IOPTIONALCALENDAR, 2)) To iCalendarType Get AddTreeItem (SFormat (ToAnsi (C_$AdditionalCalendartype), iCalendarType)) hChildRoot tiSysInfoUserBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hCalendarRoot If (SysConf (SYSCONF_OS_MAJOR_REV) >= 5) Begin Set ItemImage hCalendarRoot To tvSysInfoBookClosedBmp Set ItemSelectedImage hCalendarRoot To tvSysInfoBookClosedBmp Get AddTreeItem (SFormat (ToAnsi (C_$WindowsEpoch), GetCalendarInfo (Self, LOCALE_USER_DEFAULT, iCalendarType, CAL_ITWODIGITYEARMAX))) hCalendarRoot tiSysInfoUserBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid End Get AddTreeItem (SFormat (ToAnsi (C_$Separator), WindowsLocaleValue (Self, LOCALE_SDATE, 2))) hChildRoot tiSysInfoUserBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Get AddTreeItem (SFormat (ToAnsi (C_$YearMonthFormat), WindowsLocaleValue (Self, LOCALE_SYEARMONTH, 10))) hChildRoot tiSysInfoUserBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Get AddTreeItem (SFormat (ToAnsi (C_$ShortFormat), WindowsLocaleValue (Self, LOCALE_SSHORTDATE, 25))) hChildRoot tiSysInfoUserBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Get AddTreeItem (SFormat (ToAnsi (C_$LongFormat), WindowsLocaleValue (Self, LOCALE_SLONGDATE, 50))) hChildRoot tiSysInfoUserBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Get AddTreeItem (SFormat (ToAnsi (C_$ShortDateFormatOrdering), WindowsLocaleValue (Self, LOCALE_IDATE, 2))) hChildRoot tiSysInfoUserBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Get AddTreeItem (SFormat (ToAnsi (C_$LongDateFormatOrdering), WindowsLocaleValue (Self, LOCALE_ILDATE, 2))) hChildRoot tiSysInfoUserBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Get AddTreeItem (SFormat (ToAnsi (C_$Full4DigitCentury), WindowsLocaleValue (Self, LOCALE_ICENTURY, 2))) hChildRoot tiSysInfoUserBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Get AddTreeItem (SFormat (ToAnsi (C_$UseLeadingZeroesInDayFields), WindowsLocaleValue (Self, LOCALE_IDAYLZERO, 2))) hChildRoot tiSysInfoUserBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Get AddTreeItem (SFormat (ToAnsi (C_$UseLeadingZeroesInMonthFields), WindowsLocaleValue (Self, LOCALE_IMONLZERO, 2))) hChildRoot tiSysInfoUserBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Get AddTreeItem (SFormat (ToAnsi (C_$FirstDayOfWeek), WindowsLocaleValue (Self, LOCALE_IFIRSTDAYOFWEEK, 2))) hChildRoot tiSysInfoUserBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Get AddTreeItem (SFormat (ToAnsi (C_$FirstWeekOfYear), WindowsLocaleValue (Self, LOCALE_IFIRSTWEEKOFYEAR, 2))) hChildRoot tiSysInfoUserBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Get AddTreeItem (ToAnsi (C_$DayNames)) hChildRoot tiSysInfoUserBranchItem tvSysInfoBookClosedBmp tvSysInfoBookClosedBmp To hNamesRoot Get AddTreeItem (ToAnsi (C_$Long)) hNamesRoot tiSysInfoUserBranchItem tvSysInfoBookClosedBmp tvSysInfoBookClosedBmp To hChildChildRoot Get AddTreeItem (ToOem (SFormat (C_$Day, 1, WindowsLocaleValue (Self, LOCALE_SDAYNAME1, 25)))) hChildChildRoot tiSysInfoUserBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Get AddTreeItem (ToOem (SFormat (C_$Day, 2, WindowsLocaleValue (Self, LOCALE_SDAYNAME2, 25)))) hChildChildRoot tiSysInfoUserBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Get AddTreeItem (ToOem (SFormat (C_$Day, 3, WindowsLocaleValue (Self, LOCALE_SDAYNAME3, 25)))) hChildChildRoot tiSysInfoUserBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Get AddTreeItem (ToOem (SFormat (C_$Day, 4, WindowsLocaleValue (Self, LOCALE_SDAYNAME4, 25)))) hChildChildRoot tiSysInfoUserBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Get AddTreeItem (ToOem (SFormat (C_$Day, 5, WindowsLocaleValue (Self, LOCALE_SDAYNAME5, 25)))) hChildChildRoot tiSysInfoUserBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Get AddTreeItem (ToOem (SFormat (C_$Day, 6, WindowsLocaleValue (Self, LOCALE_SDAYNAME6, 25)))) hChildChildRoot tiSysInfoUserBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Get AddTreeItem (ToOem (SFormat (C_$Day, 7, WindowsLocaleValue (Self, LOCALE_SDAYNAME7, 25)))) hChildChildRoot tiSysInfoUserBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Get AddTreeItem (ToAnsi (C_$Short)) hNamesRoot tiSysInfoUserBranchItem tvSysInfoBookClosedBmp tvSysInfoBookClosedBmp To hChildChildRoot Get AddTreeItem (ToOem (SFormat (C_$Day, 1, WindowsLocaleValue (Self, LOCALE_SABBREVDAYNAME1, 25)))) hChildChildRoot tiSysInfoUserBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Get AddTreeItem (ToOem (SFormat (C_$Day, 2, WindowsLocaleValue (Self, LOCALE_SABBREVDAYNAME2, 25)))) hChildChildRoot tiSysInfoUserBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Get AddTreeItem (ToOem (SFormat (C_$Day, 3, WindowsLocaleValue (Self, LOCALE_SABBREVDAYNAME3, 25)))) hChildChildRoot tiSysInfoUserBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Get AddTreeItem (ToOem (SFormat (C_$Day, 4, WindowsLocaleValue (Self, LOCALE_SABBREVDAYNAME4, 25)))) hChildChildRoot tiSysInfoUserBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Get AddTreeItem (ToOem (SFormat (C_$Day, 5, WindowsLocaleValue (Self, LOCALE_SABBREVDAYNAME5, 25)))) hChildChildRoot tiSysInfoUserBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Get AddTreeItem (ToOem (SFormat (C_$Day, 6, WindowsLocaleValue (Self, LOCALE_SABBREVDAYNAME6, 25)))) hChildChildRoot tiSysInfoUserBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Get AddTreeItem (ToOem (SFormat (C_$Day, 7, WindowsLocaleValue (Self, LOCALE_SABBREVDAYNAME7, 25)))) hChildChildRoot tiSysInfoUserBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Get AddTreeItem (ToAnsi (C_$Monthnames)) hChildRoot tiSysInfoUserBranchItem tvSysInfoBookClosedBmp tvSysInfoBookClosedBmp To hNamesRoot Get AddTreeItem (ToAnsi (C_$Long)) hNamesRoot tiSysInfoUserBranchItem tvSysInfoBookClosedBmp tvSysInfoBookClosedBmp To hChildChildRoot Get AddTreeItem (SFormat (ToAnsi (C_$Month), 1, WindowsLocaleValue (Self, LOCALE_SMONTHNAME1, 25))) hChildChildRoot tiSysInfoUserBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Get AddTreeItem (SFormat (ToAnsi (C_$Month), 2, WindowsLocaleValue (Self, LOCALE_SMONTHNAME2, 25))) hChildChildRoot tiSysInfoUserBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Get AddTreeItem (SFormat (ToAnsi (C_$Month), 3, WindowsLocaleValue (Self, LOCALE_SMONTHNAME3, 25))) hChildChildRoot tiSysInfoUserBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Get AddTreeItem (SFormat (ToAnsi (C_$Month), 4, WindowsLocaleValue (Self, LOCALE_SMONTHNAME4, 25))) hChildChildRoot tiSysInfoUserBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Get AddTreeItem (SFormat (ToAnsi (C_$Month), 5, WindowsLocaleValue (Self, LOCALE_SMONTHNAME5, 25))) hChildChildRoot tiSysInfoUserBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Get AddTreeItem (SFormat (ToAnsi (C_$Month), 6, WindowsLocaleValue (Self, LOCALE_SMONTHNAME6, 25))) hChildChildRoot tiSysInfoUserBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Get AddTreeItem (SFormat (ToAnsi (C_$Month), 7, WindowsLocaleValue (Self, LOCALE_SMONTHNAME7, 25))) hChildChildRoot tiSysInfoUserBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Get AddTreeItem (SFormat (ToAnsi (C_$Month), 8, WindowsLocaleValue (Self, LOCALE_SMONTHNAME8, 25))) hChildChildRoot tiSysInfoUserBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Get AddTreeItem (SFormat (ToAnsi (C_$Month), 9, WindowsLocaleValue (Self, LOCALE_SMONTHNAME9, 25))) hChildChildRoot tiSysInfoUserBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Get AddTreeItem (SFormat (ToAnsi (C_$Month), 10, WindowsLocaleValue (Self, LOCALE_SMONTHNAME10, 25))) hChildChildRoot tiSysInfoUserBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Get AddTreeItem (SFormat (ToAnsi (C_$Month), 11, WindowsLocaleValue (Self, LOCALE_SMONTHNAME11, 25))) hChildChildRoot tiSysInfoUserBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Get AddTreeItem (SFormat (ToAnsi (C_$Month), 12, WindowsLocaleValue (Self, LOCALE_SMONTHNAME12, 25))) hChildChildRoot tiSysInfoUserBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid // Get AddTreeItem (SFormat (ToAnsi (C_$Month), 13, WindowsLocaleValue (Self, LOCALE_SMONTHNAME13, 25))) hChildChildRoot tiSysInfoUserBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Get AddTreeItem (ToAnsi (C_$Short)) hNamesRoot tiSysInfoUserBranchItem tvSysInfoBookClosedBmp tvSysInfoBookClosedBmp To hChildChildRoot Get AddTreeItem (SFormat (ToAnsi (C_$Month), 1, WindowsLocaleValue (Self, LOCALE_SABBREVMONTHNAME1, 25))) hChildChildRoot tiSysInfoUserBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Get AddTreeItem (SFormat (ToAnsi (C_$Month), 2, WindowsLocaleValue (Self, LOCALE_SABBREVMONTHNAME2, 25))) hChildChildRoot tiSysInfoUserBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Get AddTreeItem (SFormat (ToAnsi (C_$Month), 3, WindowsLocaleValue (Self, LOCALE_SABBREVMONTHNAME3, 25))) hChildChildRoot tiSysInfoUserBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Get AddTreeItem (SFormat (ToAnsi (C_$Month), 4, WindowsLocaleValue (Self, LOCALE_SABBREVMONTHNAME4, 25))) hChildChildRoot tiSysInfoUserBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Get AddTreeItem (SFormat (ToAnsi (C_$Month), 5, WindowsLocaleValue (Self, LOCALE_SABBREVMONTHNAME5, 25))) hChildChildRoot tiSysInfoUserBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Get AddTreeItem (SFormat (ToAnsi (C_$Month), 6, WindowsLocaleValue (Self, LOCALE_SABBREVMONTHNAME6, 25))) hChildChildRoot tiSysInfoUserBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Get AddTreeItem (SFormat (ToAnsi (C_$Month), 7, WindowsLocaleValue (Self, LOCALE_SABBREVMONTHNAME7, 25))) hChildChildRoot tiSysInfoUserBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Get AddTreeItem (SFormat (ToAnsi (C_$Month), 8, WindowsLocaleValue (Self, LOCALE_SABBREVMONTHNAME8, 25))) hChildChildRoot tiSysInfoUserBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Get AddTreeItem (SFormat (ToAnsi (C_$Month), 9, WindowsLocaleValue (Self, LOCALE_SABBREVMONTHNAME9, 25))) hChildChildRoot tiSysInfoUserBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Get AddTreeItem (SFormat (ToAnsi (C_$Month), 10, WindowsLocaleValue (Self, LOCALE_SABBREVMONTHNAME10, 25))) hChildChildRoot tiSysInfoUserBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Get AddTreeItem (SFormat (ToAnsi (C_$Month), 11, WindowsLocaleValue (Self, LOCALE_SABBREVMONTHNAME11, 25))) hChildChildRoot tiSysInfoUserBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Get AddTreeItem (SFormat (ToAnsi (C_$Month), 12, WindowsLocaleValue (Self, LOCALE_SABBREVMONTHNAME12, 25))) hChildChildRoot tiSysInfoUserBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid // Get AddTreeItem (SFormat (ToAnsi (C_$Month), 13, WindowsLocaleValue (Self, LOCALE_SABBREVMONTHNAME13, 25))) hChildChildRoot tiSysInfoUserBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Get AddTreeItem (ToAnsi (C_$Country)) hRoot tiSysInfoUserBranchItem tvSysInfoBookClosedBmp tvSysInfoBookClosedBmp To hChildRoot Get AddTreeItem (SFormat (ToAnsi (C_$CountryId), WindowsLocaleValue (Self, LOCALE_ICOUNTRY, 6))) hChildRoot tiSysInfoUserBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Get AddTreeItem (SFormat (ToAnsi (C_$CountryName), WindowsLocaleValue (Self, LOCALE_SCOUNTRY, 100))) hChildRoot tiSysInfoUserBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Get AddTreeItem (SFormat (ToAnsi (C_$EnglishName), WindowsLocaleValue (Self, LOCALE_SENGCOUNTRY, 100))) hChildRoot tiSysInfoUserBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Get AddTreeItem (SFormat (ToAnsi (C_$AbbreviatedName), WindowsLocaleValue (Self, LOCALE_SABBREVCTRYNAME, 100))) hChildRoot tiSysInfoUserBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Get AddTreeItem (SFormat (ToAnsi (C_$NativeName), WindowsLocaleValue (Self, LOCALE_SNATIVECTRYNAME, 100))) hChildRoot tiSysInfoUserBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Get AddTreeItem (ToAnsi (C_$Defaults)) hRoot tiSysInfoUserBranchItem tvSysInfoBookClosedBmp tvSysInfoBookClosedBmp To hChildRoot Get AddTreeItem (SFormat (ToAnsi (C_$DefaultsCountryId), WindowsLocaleValue (Self, LOCALE_IDEFAULTCOUNTRY, 6))) hChildRoot tiSysInfoUserBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Get AddTreeItem (SFormat (ToAnsi (C_$DefaultsLanguageId), WindowsLocaleValue (Self, LOCALE_IDEFAULTLANGUAGE, 5))) hChildRoot tiSysInfoUserBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Get AddTreeItem (SFormat (ToAnsi (C_$ANSICodepage), WindowsLocaleValue (Self, LOCALE_IDEFAULTANSICODEPAGE, 6))) hChildRoot tiSysInfoUserBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Get AddTreeItem (SFormat (ToAnsi (C_$Codepage), WindowsLocaleValue (Self, LOCALE_IDEFAULTCODEPAGE, 6))) hChildRoot tiSysInfoUserBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Set Oem_Translate_State To bPreviousOemTranslate End_Procedure // DoAddWindowsLocaleInfo // This method will add the current information from the DataFlex runtime attributes Procedure DoAddGlobalAttributesInfo Integer iThousandsSeparator iDecimalSeparator iDateSeparator iDateFormat iStrictAttrib Integer iRuntimeProgressFrequency iReportUnsupportedAttributes Integer iLockTimeOut iLockDelay iHighDataIntegrity iEpochValue Boolean bSysdate4State bDate4State String sDateFormat sOpenPath Handle hItem hVoid Get phCurrentRoot To hItem Get_Attribute DF_THOUSANDS_SEPARATOR To iThousandsSeparator Get_Attribute DF_DECIMAL_SEPARATOR To iDecimalSeparator Get_Attribute DF_DATE_SEPARATOR To iDateSeparator Get_Attribute DF_DATE_FORMAT To iDateFormat Get_Attribute DF_STRICT_ATTRIBUTES To iStrictAttrib Get_Attribute DF_RUNTIME_PROGRESS_FREQUENCY To iRuntimeProgressFrequency Get_Attribute DF_REPORT_UNSUPPORTED_ATTRIBUTES To iReportUnsupportedAttributes Get_Attribute DF_LOCK_TIMEOUT To iLockTimeOut Get_Attribute DF_LOCK_DELAY To iLockDelay Get_Attribute DF_HIGH_DATA_INTEGRITY To iHighDataIntegrity Get_Attribute DF_OPEN_PATH To sOpenPath Get_Date_Attribute SYSDATE4_STATE To bSysdate4State Get_Date_Attribute DATE4_STATE To bDate4State Get_Date_Attribute EPOCH_VALUE To iEpochValue Case Begin Case (iDateFormat = DF_DATE_USA) Move C_$USA To sDateFormat Case Break Case (iDateFormat = DF_DATE_EUROPEAN) Move C_$European To sDateFormat Case Break Case (iDateFormat = DF_DATE_MILITARY) Move C_$Military To sDateFormat Case Break Case End Get AddTreeItem (SFormat (C_$ThousandsSeparator, Character (iThousandsSeparator), iThousandsSeparator)) hItem tiSysInfoGlobalAttributesBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Get AddTreeItem (SFormat (C_$DecimalSeparatorChar, Character (iDecimalSeparator), iDecimalSeparator)) hItem tiSysInfoGlobalAttributesBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Get AddTreeItem (SFormat (C_$DateSeparator, Character (iDateSeparator), iDateSeparator)) hItem tiSysInfoGlobalAttributesBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Get AddTreeItem (SFormat (C_$DateFormat, sDateFormat)) hItem tiSysInfoGlobalAttributesBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Get AddTreeItem (SFormat (C_$StrictAttributes, If (iStrictAttrib, C_$Yes, C_$No))) hItem tiSysInfoGlobalAttributesBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Get AddTreeItem (SFormat (C_$ReportUnsupportedAttributes, If (iReportUnsupportedAttributes, C_$Yes, C_$No))) hItem tiSysInfoGlobalAttributesBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Get AddTreeItem (SFormat (C_$RuntimeProgressFrequencyInterval, iRuntimeProgressFrequency, C_$Milliseconds)) hItem tiSysInfoGlobalAttributesBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Get AddTreeItem (SFormat (C_$LockTimeOut, iLockTimeOut, C_$Milliseconds)) hItem tiSysInfoGlobalAttributesBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Get AddTreeItem (SFormat (C_$LockDelay, iLockDelay, C_$Milliseconds)) hItem tiSysInfoGlobalAttributesBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Get AddTreeItem (SFormat (C_$HighDataIntegrity, If (iHighDataIntegrity, C_$Yes, C_$No))) hItem tiSysInfoGlobalAttributesBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Get AddTreeItem (SFormat (C_$OpenPath, sOpenPath)) hItem tiSysInfoGlobalAttributesBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Get AddTreeItem (SFormat (C_$Sysdate4State, If (bSysdate4State, C_$Yes, C_$No))) hItem tiSysInfoGlobalAttributesBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Get AddTreeItem (SFormat (C_$Date4State, If (bDate4State, C_$Yes, C_$No))) hItem tiSysInfoGlobalAttributesBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Get AddTreeItem (SFormat (C_$Epoch, iEpochValue)) hItem tiSysInfoGlobalAttributesBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid End_Procedure // DoAddGlobalAttributesInfo // This method will add some of the DataFlex global variables to the tree. If you want to see // more you can simply extend the list. Procedure DoAddGlobalVariablesInfo Handle hItem hVoid Get phCurrentRoot To hItem // Get AddTreeItem (SFormat (C_$PageEnd, PageEnd)) hItem tiSysInfoGlobalVariablesBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid // Get AddTreeItem (SFormat (C_$PageFeed, PageFeed)) hItem tiSysInfoGlobalVariablesBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid // Get AddTreeItem (SFormat (C_$PageCount, PageCount)) hItem tiSysInfoGlobalVariablesBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid // Get AddTreeItem (SFormat (C_$LineCount, LineCount)) hItem tiSysInfoGlobalVariablesBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Get AddTreeItem (SFormat (C_$FlxRevision, Flx_Revision)) hItem tiSysInfoGlobalVariablesBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Get AddTreeItem (SFormat (C_$ConstrainTestsCount, Constrain_Tests_Count)) hItem tiSysInfoGlobalVariablesBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Get AddTreeItem (SFormat (C_$ConstrainFoundCount, Constrain_Found_Count)) hItem tiSysInfoGlobalVariablesBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Get AddTreeItem (SFormat (C_$LastErr, LastErr)) hItem tiSysInfoGlobalVariablesBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid // Get AddTreeItem (SFormat (C_$ChainDepth, Chain_Depth)) hItem tiSysInfoGlobalVariablesBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Get AddTreeItem (SFormat (C_$TotalResources, Total_Resources)) hItem tiSysInfoGlobalVariablesBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Get AddTreeItem (SFormat (C_$TotalObjects, Total_Objects)) hItem tiSysInfoGlobalVariablesBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid End_Procedure // DoAddGlobalVariablesInfo // This method will add some of the system metrics information to the tree. If you want to see // more you can simply extend the list. Look in WINUSER.PKG for other system metrics constants. Procedure DoAddSystemMetricsInfo Handle hItem hVoid Boolean bMousePresent Integer iCleanBoot Get phCurrentRoot To hItem Define SM_MOUSEWHEELPRESENT For 75 Define SM_CXVIRTUALSCREEN For 78 Define SM_CYVIRTUALSCREEN For 79 Define SM_CMONITORS For 80 Define SM_REMOTESESSION For |CI$1000 Get AddTreeItem (SFormat (C_$VideoResolution, GetSystemMetrics (SM_CXSCREEN), GetSystemMetrics (SM_CYSCREEN))) hItem tiSysInfoGlobalAttributesBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Get AddTreeItem (SFormat (C_$SizeOfArrowBitmapOnHorizontalScrollbar, GetSystemMetrics (SM_CXHSCROLL), GetSystemMetrics (SM_CYHSCROLL))) hItem tiSysInfoGlobalAttributesBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Get AddTreeItem (SFormat (C_$HeightOfCaptionbar, GetSystemMetrics (SM_CYCAPTION))) hItem tiSysInfoGlobalAttributesBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Get AddTreeItem (SFormat (C_$SizeOfArrowBitmapOnVerticalScrollbar, GetSystemMetrics (SM_CXVSCROLL), GetSystemMetrics (SM_CYVSCROLL))) hItem tiSysInfoGlobalAttributesBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Get AddTreeItem (SFormat (C_$MidleEastEnabled, If (GetSystemMetrics (SM_MIDEASTENABLED), C_$Yes, C_$No))) hItem tiSysInfoGlobalAttributesBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Get AddTreeItem (SFormat (C_$SizeOfCursor, GetSystemMetrics (SM_CXCURSOR), GetSystemMetrics (SM_CYCURSOR))) hItem tiSysInfoGlobalAttributesBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Get AddTreeItem (SFormat (C_$SizeOfWindowClientAreaForFullScreenWindow, GetSystemMetrics (SM_CXFULLSCREEN), GetSystemMetrics (SM_CYFULLSCREEN))) hItem tiSysInfoGlobalAttributesBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Get AddTreeItem (SFormat (C_$SizeOfBitmapsContainedInTheTitleBar, GetSystemMetrics (SM_CXSIZE), GetSystemMetrics (SM_CYSIZE))) hItem tiSysInfoGlobalAttributesBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Move (GetSystemMetrics (SM_MOUSEPRESENT)) To bMousePresent Get AddTreeItem (SFormat (C_$MousePresent, If (bMousePresent, C_$Yes, C_$No))) hItem tiSysInfoGlobalAttributesBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid If (bMousePresent) Begin Get AddTreeItem (SFormat (C_$MouseWheelPresent, If (GetSystemMetrics (SM_MOUSEWHEELPRESENT), C_$Yes, C_$No))) hItem tiSysInfoGlobalAttributesBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Get AddTreeItem (SFormat (C_$MouseButtons, GetSystemMetrics (SM_CMOUSEBUTTONS))) hItem tiSysInfoGlobalAttributesBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid End Get AddTreeItem (SFormat (C_$DebugVersionOfUserExe, If (GetSystemMetrics (SM_DEBUG), C_$Yes, C_$No))) hItem tiSysInfoGlobalAttributesBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Get AddTreeItem (SFormat (C_$MenuDropAlignment, If (GetSystemMetrics (SM_MENUDROPALIGNMENT), C_$Left, C_$Right))) hItem tiSysInfoGlobalAttributesBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Get AddTreeItem (SFormat (C_$PenWindowsInstalled, If (GetSystemMetrics (SM_PENWINDOWS), C_$Yes, C_$No))) hItem tiSysInfoGlobalAttributesBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Get AddTreeItem (If (GetSystemMetrics (SM_REMOTESESSION), C_$CallingProcessIsTerminalServicesClientSession, C_$CallingProcessIsTerminalServerConsoleSession)) hItem tiSysInfoGlobalAttributesBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Get AddTreeItem (SFormat (C_$SecurityPresent, If (GetSystemMetrics (SM_SECURE), C_$Yes, C_$No))) hItem tiSysInfoGlobalAttributesBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Get AddTreeItem (SFormat (C_$NetWorkPresent, If (GetSystemMetrics (SM_NETWORK) Iand |CI00000001, C_$Yes, C_$No))) hItem tiSysInfoGlobalAttributesBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Get AddTreeItem (SFormat (C_$NumberOfDisplayMonitors, GetSystemMetrics (SM_CMONITORS))) hItem tiSysInfoGlobalAttributesBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Move (GetSystemMetrics (SM_CLEANBOOT)) To iCleanBoot Get AddTreeItem (SFormat (C_$CleanBoot, If (iCleanBoot = 0, C_$Normal, If (iCleanBoot = 1, C_$FailSafe, C_$FailSafeWithNetwork)))) hItem tiSysInfoGlobalAttributesBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Get AddTreeItem (SFormat (C_$LeftAndRightMouseButtonsAreSwapped, If (GetSystemMetrics (SM_SWAPBUTTON), C_$Yes, C_$No))) hItem tiSysInfoGlobalAttributesBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Get AddTreeItem (SFormat (C_$SizeOfThumbBoxOnVerticalScrollbar, GetSystemMetrics (SM_CXHTHUMB), GetSystemMetrics (SM_CYVTHUMB))) hItem tiSysInfoGlobalAttributesBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Get AddTreeItem (SFormat (C_$RectangleAroundTheLocationOfAFirstClickInADoubleClickSequence, GetSystemMetrics (SM_CXDOUBLECLK), GetSystemMetrics (SM_CYDOUBLECLK))) hItem tiSysInfoGlobalAttributesBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Get AddTreeItem (SFormat (C_$SizeOfVirtualScreen, GetSystemMetrics (SM_CXVIRTUALSCREEN), GetSystemMetrics (SM_CYVIRTUALSCREEN))) hItem tiSysInfoGlobalAttributesBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Get AddTreeItem (SFormat (C_$DoubleByteCharacterSetUserExeInstalled, If (GetSystemMetrics (SM_DBCSENABLED), C_$Yes, C_$No))) hItem tiSysInfoGlobalAttributesBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Get AddTreeItem (SFormat (C_$ComputerHasALowEndSlowProcessor, If (GetSystemMetrics (SM_SLOWMACHINE), C_$Yes, C_$No))) hItem tiSysInfoGlobalAttributesBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid End_Procedure // DoAddSystemMetricsInfo // This method will add all the system configuration values to the tree. It is the result of the // various SYSCONF function calls. Procedure DoAddSysConfInfo Handle hItem hVoid String sComputerName Get phCurrentRoot To hItem Define SYSCONF_RUNTIME_NAME For 11 Define SYSCONF_UTC_TIME_OFFSET For 12 Get AddTreeItem (SFormat (C_$NumberOfVDFTimerObjectEventsPerSecond, SysConf (SYSCONF_TIMER_RESOLUTION))) hItem tiSysInfoSysConfBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Get AddTreeItem (SFormat (C_$DirectorySeparator, SysConf (SYSCONF_DIR_SEPARATOR))) hItem tiSysInfoSysConfBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Get AddTreeItem (SFormat (C_$OSShortName, SysConf (SYSCONF_OS_SHORT_NAME))) hItem tiSysInfoSysConfBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Get AddTreeItem (SFormat (C_$OSMajorRevision, SysConf (SYSCONF_OS_MAJOR_REV))) hItem tiSysInfoSysConfBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Get AddTreeItem (SFormat (C_$OSMinorRevision, SysConf (SYSCONF_OS_MINOR_REV))) hItem tiSysInfoSysConfBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Get AddTreeItem (SFormat (C_$OSName, SysConf (SYSCONF_OS_NAME))) hItem tiSysInfoSysConfBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid // *** Change 2003-04-14 NGS *** Get GetComputerName To sComputerName Get AddTreeItem (SFormat (C_$MachineName, sComputerName)) hItem tiSysInfoSysConfBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid //Get AddTreeItem (SFormat (C_$MachineName, SysConf (SYSCONF_MACHINE_NAME))) hItem tiSysInfoSysConfBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid // *** Change stop *** Get AddTreeItem (SFormat (C_$FileMask, SysConf (SYSCONF_FILE_MASK))) hItem tiSysInfoSysConfBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Get AddTreeItem (SFormat (C_$DataFlexRevision, SysConf (SYSCONF_DATAFLEX_REV))) hItem tiSysInfoSysConfBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Get AddTreeItem (SFormat (C_$SystemName, SysConf (SYSCONF_SYSTEM_NAME))) hItem tiSysInfoSysConfBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Get AddTreeItem (SFormat (C_$PathSeparator, SysConf (SYSCONF_PATH_SEPARATOR))) hItem tiSysInfoSysConfBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Get AddTreeItem (SFormat (C_$RuntimeName, SysConf (SYSCONF_RUNTIME_NAME))) hItem tiSysInfoSysConfBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Get AddTreeItem (SFormat (C_$TimeOffsetFromMeridian, SysConf (SYSCONF_UTC_TIME_OFFSET))) hItem tiSysInfoSysConfBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid End_Procedure // DoAddSysConfInfo // Test for each index between first and last known index number if the index exists and if so // return the count Function NumberOfIndexes Integer iFile Returns Integer Integer iLastIndex iIndexNum iNumberOfSegments iIndexes Get_Attribute DF_FILE_LAST_INDEX_NUMBER Of iFile To iLastIndex For iIndexNum From 1 To iLastIndex Get_Attribute DF_INDEX_NUMBER_SEGMENTS Of iFile iIndexNum To iNumberOfSegments If (iNumberOfSegments > 0) Begin Increment iIndexes End Loop Function_Return iIndexes End_Function // NumberOfIndexes // For all open files report the file attributes, the fieldnames and the indexes Procedure DoAddDataFilesInfo Integer iMaxSlots iFile iFields Boolean bOpened String sRootName sDisplayName sLogicalName sPhysicalName Handle hItem hVoid hFileItem Get phCurrentRoot To hItem Define DF_NUMBER_FILES_SUPPORTED For |CI27 Get_Attribute DF_NUMBER_FILES_SUPPORTED To iMaxSlots If (iMaxSlots <= 255) Begin Move 250 To iMaxSlots End For iFile From 1 To iMaxSlots Get_Attribute DF_FILE_OPENED Of iFile To bOpened If (bOpened) Begin Get_Attribute DF_FILE_ROOT_NAME Of iFile To sRootName Get_Attribute DF_FILE_DISPLAY_NAME Of iFile To sDisplayName Get_Attribute DF_FILE_LOGICAL_NAME Of iFile To sLogicalName Get_Attribute DF_FILE_PHYSICAL_NAME Of iFile To sPhysicalName Get AddTreeItem sPhysicalName hItem tiSysInfoDataFilesBranchItem tvSysInfoBookClosedBmp tvSysInfoBookClosedBmp To hFileItem If (hFileItem <> 0) Begin Get AddTreeItem (SFormat (C_$FileNumber, iFile)) hFileItem tiSysInfoDataFilesBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Get AddTreeItem (SFormat (C_$RootName, sRootName)) hFileItem tiSysInfoDataFilesBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Get AddTreeItem (SFormat (C_$DisplayName, sDisplayName)) hFileItem tiSysInfoDataFilesBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Get AddTreeItem (SFormat (C_$LogicalName, sLogicalName)) hFileItem tiSysInfoDataFilesBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Get AddTreeItem C_$Attributes hFileItem ((iFile * 65536) + tiSysInfoDataFilesAttributesBranch) tvSysInfoBookClosedBmp tvSysInfoBookClosedBmp To hVoid Set ItemChildCount hVoid To 1 Get_Attribute DF_FILE_NUMBER_FIELDS Of iFile To iFields Get AddTreeItem (SFormat (C_$Fields, iFields + 1)) hFileItem ((iFile * 65536) + tiSysInfoDataFilesFieldsBranch) tvSysInfoBookClosedBmp tvSysInfoBookClosedBmp To hVoid Set ItemChildCount hVoid To 1 Get AddTreeItem (SFormat (C_$Indexes, NumberOfIndexes (Self, iFile))) hFileItem ((iFile * 65536) + tiSysInfoDataFilesIndexesBranch) tvSysInfoBookClosedBmp tvSysInfoBookClosedBmp To hVoid Set ItemChildCount hVoid To 1 End End Loop End_Procedure // DoAddDataFilesInfo // Internal method used by DoAddDataFilesInfo to add file attributes to the tree. Splitting in multiple // methods makes the code better to read. Procedure DoAddAttributesInfo Handle hAttributesItem Integer iFile Integer iRecordIdentityField iRecordLength iRecordLengthUsed iRecordsUsed Integer iFileOpenMode iFileAlias iFileCompression iOldState iMaxRecords Integer iFileMultiUser iFileIntegrityCheck iFileIsSystemFile iFileLockType Integer iFileReuseDeletedSpace iFileTransactionMode String sFileLogin sFileOwner sFileDriverName sFileRevision sFieldName Handle hVoid Get_Attribute DF_FILE_REVISION Of iFile To sFileRevision Get AddTreeItem (SFormat (C_$Revision, sFileRevision)) hAttributesItem tiSysInfoDataFilesBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Get_Attribute DF_FILE_RECORD_IDENTITY Of iFile To iRecordIdentityField Get_Attribute DF_FIELD_NAME Of iFile iRecordIdentityField To sFieldName Get AddTreeItem (SFormat (C_$RecordIdentityField, iRecordIdentityField, sFieldName)) hAttributesItem tiSysInfoDataFilesBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Get_Attribute DF_FILE_RECORD_LENGTH Of iFile To iRecordLength Get AddTreeItem (SFormat (C_$RecordLength, iRecordLength)) hAttributesItem tiSysInfoDataFilesBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Get_Attribute DF_FILE_RECORD_LENGTH_USED Of iFile To iRecordLengthUsed Get AddTreeItem (SFormat (C_$RecordLengthUsed, iRecordLengthUsed)) hAttributesItem tiSysInfoDataFilesBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Get_Attribute DF_FILE_OPEN_MODE Of iFile To iFileOpenMode Get AddTreeItem (SFormat (C_$FileOpenMode, If (iFileOpenMode = DF_SHARE, C_$Shared, C_$Exclusive))) hAttributesItem tiSysInfoDataFilesBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Get_Attribute DF_FILE_ALIAS Of iFile To iFileAlias Case Begin Case (iFileAlias = DF_FILE_ALIAS_DEFAULT) Get AddTreeItem (SFormat (C_$AliasAttribute, C_$NotSet)) hAttributesItem tiSysInfoDataFilesBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Case Break Case (iFileAlias = DF_FILE_IS_MASTER) Get AddTreeItem (SFormat (C_$AliasAttribute, C_$Master)) hAttributesItem tiSysInfoDataFilesBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Case Break Case (iFileAlias = DF_FILE_IS_ALIAS) Get AddTreeItem (SFormat (C_$AliasAttribute, C_$Alias)) hAttributesItem tiSysInfoDataFilesBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Case Break Case End Get_Attribute DF_FILE_COMPRESSION Of iFile To iFileCompression Case Begin Case (iFileCompression = DF_FILE_COMPRESS_NONE) Get AddTreeItem (SFormat (C_$Compression, C_$None)) hAttributesItem tiSysInfoDataFilesBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Case Break Case (iFileCompression = DF_FILE_COMPRESS_FAST) Get AddTreeItem (SFormat (C_$Compression, C_$FastRLE)) hAttributesItem tiSysInfoDataFilesBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Case Break Case (iFileCompression = DF_FILE_COMPRESS_STANDARD) Get AddTreeItem (SFormat (C_$Compression, C_$StandardHuffman)) hAttributesItem tiSysInfoDataFilesBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Case Break Case (iFileCompression = DF_FILE_COMPRESS_CUSTOM) Get AddTreeItem (SFormat (C_$Compression, C_$CustomHuffman)) hAttributesItem tiSysInfoDataFilesBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Case Break Case End Get_Attribute DF_FILE_DRIVER Of iFile To sFileDriverName Get AddTreeItem (SFormat (C_$FileDatabaseDriver, sFileDriverName)) hAttributesItem tiSysInfoDataFilesBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Get_Attribute DF_FILE_RECORDS_USED Of iFile To iRecordsUsed Get AddTreeItem (SFormat (C_$RecordsUsed, iRecordsUsed)) hAttributesItem tiSysInfoDataFilesBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Get_Attribute DF_FILE_REUSE_DELETED Of iFile To iFileReuseDeletedSpace Get AddTreeItem (SFormat (C_$ReuseDeletedSpace, If (iFileReuseDeletedSpace = DF_FILE_DELETED_NOREUSE, C_$No, C_$Yes))) hAttributesItem tiSysInfoDataFilesBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Get_Attribute DF_FILE_MAX_RECORDS Of iFile To iMaxRecords Get AddTreeItem (SFormat (C_$MaxRecords, iMaxRecords)) hAttributesItem tiSysInfoDataFilesBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Get_Attribute DF_FILE_INTEGRITY_CHECK Of iFile To iFileIntegrityCheck Get AddTreeItem (SFormat (C_$IntegrityCheck, If (iFileIntegrityCheck, C_$Yes, C_$No))) hAttributesItem tiSysInfoDataFilesBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Get_Attribute DF_FILE_IS_SYSTEM_FILE Of iFile To iFileIsSystemFile Get AddTreeItem (SFormat (C_$Systemfile, If (iFileIsSystemFile, C_$Yes, C_$No))) hAttributesItem tiSysInfoDataFilesBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Get_Attribute DF_FILE_MULTIUSER Of iFile To iFileMultiUser Get AddTreeItem (SFormat (C_$MultiUser, If (iFileMultiUser = DF_FILE_USER_MULTI, C_$Yes, C_$No))) hAttributesItem tiSysInfoDataFilesBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Get_Attribute DF_FILE_TRANSACTION Of iFile To iFileTransactionMode Case Begin Case (iFileTransactionMode = DF_FILE_TRANSACTION_NONE) Get AddTreeItem (SFormat (C_$TransactionTracking, C_$None)) hAttributesItem tiSysInfoDataFilesBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Case Break Case (iFileTransactionMode = DF_FILE_TRANSACTION_CLIENT_ATOMIC) Get AddTreeItem (SFormat (C_$TransactionTracking, C_$ClientAtomic)) hAttributesItem tiSysInfoDataFilesBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Case Break Case (iFileTransactionMode = DF_FILE_TRANSACTION_SERVER_ATOMIC) Get AddTreeItem (SFormat (C_$TransactionTracking, C_$ServerAtomic)) hAttributesItem tiSysInfoDataFilesBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Case Break Case (iFileTransactionMode = DF_FILE_TRANSACTION_SERVER_LOGGED) Get AddTreeItem (SFormat (C_$TransactionTracking, C_$ServerLogged)) hAttributesItem tiSysInfoDataFilesBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Case Break Case End Get_Attribute DF_FILE_LOCK_TYPE Of iFile To iFileLockType Case Begin Case (iFileLockType = DF_LOCK_TYPE_FILE) Get AddTreeItem (SFormat (C_$LockType, C_$File)) hAttributesItem tiSysInfoDataFilesBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Case Break Case (iFileLockType = DF_LOCK_TYPE_RECORD) Get AddTreeItem (SFormat (C_$LockType, C_$Record)) hAttributesItem tiSysInfoDataFilesBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Case Break Case (iFileLockType = DF_LOCK_TYPE_NONE) Get AddTreeItem (SFormat (C_$LockType, C_$None)) hAttributesItem tiSysInfoDataFilesBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Case Break Case End Get_Attribute DF_REPORT_UNSUPPORTED_ATTRIBUTES To iOldState Set_Attribute DF_REPORT_UNSUPPORTED_ATTRIBUTES To False Get_Attribute DF_FILE_LOGIN Of iFile To sFileLogin Get AddTreeItem (SFormat (C_$Login, sFileLogin)) hAttributesItem tiSysInfoDataFilesBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Get_Attribute DF_FILE_OWNER Of iFile To sFileOwner Get AddTreeItem (SFormat (C_$Owner, sFileOwner)) hAttributesItem tiSysInfoDataFilesBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Set_Attribute DF_REPORT_UNSUPPORTED_ATTRIBUTES To iOldState End_Procedure // DoAddAttributesInfo Procedure DoAddFieldInfo Handle hFieldItem Integer iFile Integer iFieldNum Integer iFieldRelatedFile iFieldRelatedField iFieldOffset Integer iFieldLength iFieldPrecision iFieldMainIndex iFieldType String sFileName sFieldName Boolean bOpened Handle hVoid Get_Attribute DF_FIELD_LENGTH Of iFile iFieldNum To iFieldLength Get AddTreeItem (SFormat (C_$FieldLength, iFieldLength)) hFieldItem tiSysInfoDataFilesBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Get_Attribute DF_FIELD_TYPE Of iFile iFieldNum To iFieldType Case Begin Case (iFieldType = DF_ASCII) Get AddTreeItem (SFormat (C_$Type, "DF_ASCII")) hFieldItem tiSysInfoDataFilesBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Case Break Case (iFieldType = DF_BCD) Get AddTreeItem (SFormat (C_$Type, "DF_BCD")) hFieldItem tiSysInfoDataFilesBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Get_Attribute DF_FIELD_PRECISION Of iFile iFieldNum To iFieldPrecision Get AddTreeItem (SFormat (C_$Precision, iFieldPrecision)) hFieldItem tiSysInfoDataFilesBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Case Break Case (iFieldType = DF_DATE) Get AddTreeItem (SFormat (C_$Type, "DF_DATE")) hFieldItem tiSysInfoDataFilesBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Case Break Case (iFieldType = DF_OVERLAP) Get AddTreeItem (SFormat (C_$Type, "DF_OVERLAP")) hFieldItem tiSysInfoDataFilesBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Case Break Case (iFieldType = DF_BINARY) Get AddTreeItem (SFormat (C_$Type, "DF_BINARY")) hFieldItem tiSysInfoDataFilesBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Case Break Case (iFieldType = DF_TEXT) Get AddTreeItem (SFormat (C_$Type, "DF_TEXT")) hFieldItem tiSysInfoDataFilesBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Case Break Case End Get_Attribute DF_FIELD_OFFSET Of iFile iFieldNum To iFieldOffset Get AddTreeItem (SFormat (C_$Offset, iFieldOffset)) hFieldItem tiSysInfoDataFilesBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Get_Attribute DF_FIELD_INDEX Of iFile iFieldNum To iFieldMainIndex If (iFieldMainIndex <> 0) Begin Get AddTreeItem (SFormat (C_$Mainindex, iFieldMainIndex)) hFieldItem tiSysInfoDataFilesBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid End Get_Attribute DF_FIELD_RELATED_FILE Of iFile iFieldNum To iFieldRelatedFile If (iFieldRelatedFile <> 0) Begin Get_Attribute DF_FIELD_RELATED_FIELD Of iFile iFieldNum To iFieldRelatedField Get_Attribute DF_FILE_OPENED Of iFieldRelatedFile To bOpened If (bOpened) Begin Get_Attribute DF_FILE_PHYSICAL_NAME Of iFieldRelatedFile To sFileName Get_Attribute DF_FIELD_NAME Of iFieldRelatedFile iFieldRelatedField To sFieldName End Else Begin Move C_$NotAvailable To sFileName Move C_$NotAvailable To sFieldName End Get AddTreeItem (SFormat (C_$RelatesToFile, iFieldRelatedFile, sFileName)) hFieldItem tiSysInfoDataFilesBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Get AddTreeItem (SFormat (C_$RelatesToField, iFieldRelatedField, sFieldName)) hFieldItem tiSysInfoDataFilesBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid End End_Procedure // DoAddFieldInfo // Internal method used by DoAddDataFilesInfo to add file attributes to the tree. Splitting in multiple // methods makes the code better to read. Procedure DoAddFieldsInfo Handle hFieldsItem Integer iFile Integer iFieldNum iFields String sFieldName Handle hFieldItem Get_Attribute DF_FILE_NUMBER_FIELDS Of iFile To iFields For iFieldNum From 0 To iFields Get_Attribute DF_FIELD_NAME Of iFile iFieldNum To sFieldName Get AddTreeItem sFieldName hFieldsItem tiSysInfoDataFilesBranchItem tvSysInfoBookClosedBmp tvSysInfoBookClosedBmp To hFieldItem If (hFieldItem <> 0) Begin Send DoAddFieldInfo hFieldItem iFile iFieldNum End Loop End_Procedure // DoAddFieldsInfo // Internal method used by DoAddDataFilesInfo to add file attributes to the tree. Splitting in multiple // methods makes the code better to read. Procedure DoAddIndexInfo Handle hIndexesItem Integer iFile Integer iLastIndex iIndexNum iNumberOfSegments iIndexSegmentNum iFieldNum Integer iSegmentCase iSegmentDirection iNumberOfBuffers iIndexType Integer iNumberOfLevels iIndexKeyLength Handle hIndexItem hIndexFieldItem hVoid String sFieldName Get_Attribute DF_FILE_LAST_INDEX_NUMBER Of iFile To iLastIndex For iIndexNum From 1 To iLastIndex Get_Attribute DF_INDEX_NUMBER_SEGMENTS Of iFile iIndexNum To iNumberOfSegments If (iNumberOfSegments <> 0) Begin Get AddTreeItem (SFormat (C_$Index, iIndexNum)) hIndexesItem tiSysInfoDataFilesBranchItem tvSysInfoBookClosedBmp tvSysInfoBookClosedBmp To hIndexItem If (hIndexItem <> 0) Begin Get_Attribute DF_INDEX_NUMBER_BUFFERS Of iFile iIndexNum To iNumberOfBuffers Get AddTreeItem (SFormat (C_$Buffers, iNumberOfBuffers)) hIndexItem tiSysInfoDataFilesBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Get_Attribute DF_INDEX_TYPE Of iFile iIndexNum To iIndexType Get AddTreeItem (SFormat (C_$Indextype, If (iIndexType = DF_INDEX_TYPE_ONLINE, C_$Online, C_$Batch))) hIndexItem tiSysInfoDataFilesBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Get_Attribute DF_INDEX_LEVELS Of iFile iIndexNum To iNumberOfLevels Get AddTreeItem (SFormat (C_$Levels, iNumberOfLevels)) hIndexItem tiSysInfoDataFilesBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Get_Attribute DF_INDEX_KEY_LENGTH Of iFile iIndexNum To iIndexKeyLength Get AddTreeItem (SFormat (C_$KeyLength, iIndexKeyLength)) hIndexItem tiSysInfoDataFilesBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Get AddTreeItem (SFormat (C_$Segments, iNumberOfSegments)) hIndexItem tiSysInfoDataFilesBranchItem tvSysInfoBookClosedBmp tvSysInfoBookClosedBmp To hIndexItem For iIndexSegmentNum From 1 To iNumberOfSegments Get_Attribute DF_INDEX_SEGMENT_FIELD Of iFile iIndexNum iIndexSegmentNum To iFieldNum Get_Attribute DF_FIELD_NAME Of iFile iFieldNum To sFieldName Get AddTreeItem sFieldName hIndexItem tiSysInfoDataFilesBranchItem tvSysInfoBookClosedBmp tvSysInfoBookClosedBmp To hIndexFieldItem If (hIndexFieldItem <> 0) Begin Get_Attribute DF_INDEX_SEGMENT_CASE Of iFile iIndexNum iIndexSegmentNum To iSegmentCase Get AddTreeItem (If (iSegmentCase = DF_CASE_USED, "", C_$Not) * C_$CaseSensitive) hIndexFieldItem tiSysInfoDataFilesBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Get_Attribute DF_INDEX_SEGMENT_DIRECTION Of iFile iIndexNum iIndexSegmentNum To iSegmentDirection Get AddTreeItem (If (iSegmentDirection = DF_ASCENDING, C_$Ascending, C_$Descending)) hIndexFieldItem tiSysInfoDataFilesBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Send DoAddFieldInfo hIndexFieldItem iFile iFieldNum End Loop End End Loop End_Procedure // DoAddIndexInfo // Add values (properties) from the ghoApplication object Procedure DoAddApplicationInfo Handle hItem hVoid String sHelpType Integer eHelpType Get peHelpType Of ghoApplication To eHelpType Case Begin Case (eHelpType = htWinHelp) Move C_$HelpTypeWinHelp To sHelpType Case Break Case (eHelpType = htHTMLHelp) Move C_$HelpTypeHTMLHelp To sHelpType Case Break Case (eHelpType = htNoHelp) Move C_$HelpTypeNoHelp To sHelpType Case Break Case End Get phCurrentRoot To hItem Get AddTreeItem (SFormat (C_$EnterKeyNavForward, If (pbEnterKeyAsTabKey (ghoApplication), C_$True, C_$False))) hItem tiSysInfoApplicationBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Get AddTreeItem (SFormat (C_$HelpFile, psHelpFile (ghoApplication))) hItem tiSysInfoApplicationBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Get AddTreeItem (SFormat (C_$HelpType, sHelpType)) hItem tiSysInfoApplicationBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Get AddTreeItem (SFormat (C_$AppCompanyName, psCompany (ghoApplication))) hItem tiSysInfoApplicationBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Get AddTreeItem (SFormat (C_$AppProduct, psProduct (ghoApplication))) hItem tiSysInfoApplicationBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Get AddTreeItem (SFormat (C_$AppVersion, psVersion (ghoApplication))) hItem tiSysInfoApplicationBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Get AddTreeItem (SFormat (C_$AppProgram, psProgram (ghoApplication))) hItem tiSysInfoApplicationBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Get AddTreeItem (SFormat (C_$AppPreserveEnvironment, If (pbPreserveEnvironment (ghoApplication), C_$True, C_$False))) hItem tiSysInfoApplicationBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid // *** Change 2003-04-14 NGS Get AddTreeItem (SFormat (C_$AppRegistryKeyString, ("HKEY_CURRENT_USER\" + RegistryKeyString (ghoApplication)))) hItem tiSysInfoApplicationBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid //Get AddTreeItem (SFormat (C_$AppRegistryKeyString, RegistryKeyString (ghoApplication))) hItem tiSysInfoApplicationBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid // *** Change stop *** Get AddTreeItem (SFormat (C_$AppFileName, GetApplicationFileName (ghoApplication))) hItem tiSysInfoApplicationBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Get AddTreeItem (SFormat (C_$AppPath, GetApplicationPath (ghoApplication))) hItem tiSysInfoApplicationBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid Get AddTreeItem (SFormat (C_$AppName, GetApplicationName (ghoApplication))) hItem tiSysInfoApplicationBranchItem tvSysInfoItemBmp tvSysInfoItemBmp To hVoid End_Procedure // DoAddApplicationInfo // When the user clicks on the "+" symbol in the tree we need to figure out if the // childitems need to be created or not. If not just quit and let Windows open the tree. // If the items need to be created call one of the above methods to fill its part of the // treeview. Procedure OnItemExpanding Handle hItem Integer iItemData iType iData hoWorkSpace Set phCurrentRoot To hItem Get ItemData hItem To iItemData Move (Low (iItemData)) To iType Move (Hi (iItemData)) To iData If (ItemImage (Self, hItem) = tvSysInfoBookClosedBmp) Begin Set ItemSelectedImage hItem To tvSysInfoBookOpenBmp Set ItemImage hItem To tvSysInfoBookOpenBmp End Case Begin Case (iType = tiSysInfoWorkSpaceBranch) If (ghoApplication <> 0) Begin Get phoWorkSpace Of ghoApplication To hoWorkSpace If (hoWorkSpace <> 0) Begin Register_Procedure EnumerateWorkspaceData Integer hObjId Integer hmMessId Send EnumerateWorkspaceData Of hoWorkSpace Self Msg_DoAddWorkSpaceItems End End Case Break Case (iType = tiSysInfoApplicationBranch) Send DoAddApplicationInfo Case Break Case (iType = tiSysInfoDataBaseDriversBranch) Send DoAddDriversInfo Case Break Case (iType = tiSysInfoMemoryBranch) Send DoAddMemoryInfo Case Break Case (iType = tiSysInfoVersionBranch) Send DoAddVersionInfo Case Break Case (iType = tiSysInfoVersionsOfBinDirBranch) Send DoAddBinFilesInfo Case Break Case (iType = tiSysInfoVersionsEnumeratedModulesDirBranch) Send DoAddModuleNames hItem Case Break Case (iType = tiSysInfoFilesDirBranch) Send DoAddFilesAndDirInfo Case Break Case (iType = tiSysInfoKeyboardBranch) Send DoAddKeyboardInfo Case Break Case (iType = tiSysInfoAccKeysBranch) Send DoAddAccKeyInfo Case Break Case (iType = tiSysInfoRegistrationBranch) Send DoAddRegistrationInfo Case Break Case (iType = tiSysInfoUserBranch) Send DoAddUserInfo Case Break Case (iType = tiSysWindowsLocaleBranch) Send DoAddWindowsLocaleInfo Case Break Case (iType = tiSysInfoGlobalAttributesBranch) Send DoAddGlobalAttributesInfo Case Break Case (iType = tiSysInfoGlobalVariablesBranch) Send DoAddGlobalVariablesInfo Case Break Case (iType = tiSysInfoSystemMetricsBranch) Send DoAddSystemMetricsInfo Case Break Case (iType = tiSysInfoDataFilesBranch) Send DoAddDataFilesInfo Case Break Case (iType = tiSysInfoDataFilesAttributesBranch) Send DoAddAttributesInfo hItem iData Case Break Case (iType = tiSysInfoDataFilesFieldsBranch) Send DoAddFieldsInfo hItem iData Case Break Case (iType = tiSysInfoDataFilesIndexesBranch) Send DoAddIndexInfo hItem iData Case Break Case (iType = tiSysInfoSysConfBranch) Send DoAddSysConfInfo Case Break Case End //Set ExpandedOnceState hItem To False End_Procedure // OnItemExpanding // Internal method used by OnItemCollapsed to delete all the child items of the // the item that is just collapsed. Procedure DoDeleteChildItems Handle hItem Handle hNextItem Get ChildItem hItem To hItem While (hItem <> 0) Get NextSiblingItem hItem To hNextItem Send DoDeleteItem hItem Move hNextItem To hItem End End_Procedure // DoDeleteChildItems // When the user closes a branch in the tree we want to delete the child items // of some treetypes. This is usefull when the information can change before // the next time it is opened. So the data will be more accurate. Procedure OnItemCollapsed Handle hItem Set ItemSelectedImage hItem To tvSysInfoBookClosedBmp Set ItemImage hItem To tvSysInfoBookClosedBmp Send DoDeleteChildItems hItem End_Procedure // OnItemCollapsed // This function enumerates the whole treeview and exports the item label of each treeview item // into an xml object. The recursionlevel and the itemtype are exported as attributes Procedure DoEnumerateTreeForXMLExport Handle hItem Integer iRecurseLevel Integer hoXMLRoot Handle hChildItem Integer hoXMLChildRoot hoElement iItemType String sItemLabel If (hoXMLRoot <> 0) Begin Move (WindowsMessage (TVM_GETNEXTITEM, TVGN_CHILD, hItem)) To hChildItem If (hChildItem <> 0) Begin Move (Low (ItemData (Self, hItem))) To iItemType Get ItemLabel hItem To sItemLabel Get AddElement Of hoXMLRoot C_$Item sItemLabel To hoXMLChildRoot If (hoXMLChildRoot <> 0) Begin Send AddAttribute Of hoXMLChildRoot C_$Itemtype iItemType Send DoEnumerateTreeForXMLExport hChildItem (iRecurseLevel + 1) hoXMLChildRoot Send Destroy Of hoXMLChildRoot End End Else Begin If (hoXMLRoot <> 0) Begin Move (Low (ItemData (Self, hItem))) To iItemType Get ItemLabel hItem To sItemLabel Get AddElement Of hoXMLRoot C_$Item sItemLabel To hoElement If (hoElement <> 0) Begin Send AddAttribute Of hoElement C_$Itemtype iItemType Send Destroy Of hoElement End End End Move (WindowsMessage (TVM_GETNEXTITEM, TVGN_NEXT, hItem)) To hItem If (hItem <> 0) Begin Send DoEnumerateTreeForXMLExport hItem iRecurseLevel hoXMLRoot End End End_Procedure // DoEnumerateTreeForXMLExport Procedure DoAddMetaData Integer hoDocumentRoot Integer hoElement hoItemTypeElement Get AddElement Of hoDocumentRoot C_$Metadata "" To hoElement If (hoElement <> 0) Begin Get AddElement Of hoElement C_$Itemtype "tiSysInfoUserBranch" To hoItemTypeElement If (hoItemTypeElement <> 0) Begin Send AddAttribute Of hoItemTypeElement C_$Value tiSysInfoUserBranch Send Destroy Of hoItemTypeElement End Get AddElement Of hoElement C_$Itemtype "tiSysInfoUserBranchItem" To hoItemTypeElement If (hoItemTypeElement <> 0) Begin Send AddAttribute Of hoItemTypeElement C_$Value tiSysInfoUserBranchItem Send Destroy Of hoItemTypeElement End Get AddElement Of hoElement C_$Itemtype "tiSysWindowsLocaleBranch" To hoItemTypeElement If (hoItemTypeElement <> 0) Begin Send AddAttribute Of hoItemTypeElement C_$Value tiSysWindowsLocaleBranch Send Destroy Of hoItemTypeElement End Get AddElement Of hoElement C_$Itemtype "tiSysWindowsLocaleBranchItem" To hoItemTypeElement If (hoItemTypeElement <> 0) Begin Send AddAttribute Of hoItemTypeElement C_$Value tiSysWindowsLocaleBranchItem Send Destroy Of hoItemTypeElement End Get AddElement Of hoElement C_$Itemtype "tiSysInfoDataBaseDriversBranch" To hoItemTypeElement If (hoItemTypeElement <> 0) Begin Send AddAttribute Of hoItemTypeElement C_$Value tiSysInfoDataBaseDriversBranch Send Destroy Of hoItemTypeElement End Get AddElement Of hoElement C_$Itemtype "tiSysInfoDataBaseDriversBranchItem" To hoItemTypeElement If (hoItemTypeElement <> 0) Begin Send AddAttribute Of hoItemTypeElement C_$Value tiSysInfoDataBaseDriversBranchItem Send Destroy Of hoItemTypeElement End Get AddElement Of hoElement C_$Itemtype "tiSysInfoVersionBranch" To hoItemTypeElement If (hoItemTypeElement <> 0) Begin Send AddAttribute Of hoItemTypeElement C_$Value tiSysInfoVersionBranch Send Destroy Of hoItemTypeElement End Get AddElement Of hoElement C_$Itemtype "tiSysInfoVersionBranchItem" To hoItemTypeElement If (hoItemTypeElement <> 0) Begin Send AddAttribute Of hoItemTypeElement C_$Value tiSysInfoVersionBranchItem Send Destroy Of hoItemTypeElement End Get AddElement Of hoElement C_$Itemtype "tiSysInfoVersionsOfBinDirBranch" To hoItemTypeElement If (hoItemTypeElement <> 0) Begin Send AddAttribute Of hoItemTypeElement C_$Value tiSysInfoVersionsOfBinDirBranch Send Destroy Of hoItemTypeElement End Get AddElement Of hoElement C_$Itemtype "tiSysInfoVersionsEnumeratedModulesDirBranch" To hoItemTypeElement If (hoItemTypeElement <> 0) Begin Send AddAttribute Of hoItemTypeElement C_$Value tiSysInfoVersionsEnumeratedModulesDirBranch Send Destroy Of hoItemTypeElement End Get AddElement Of hoElement C_$Itemtype "tiSysInfoWorkSpaceBranch" To hoItemTypeElement If (hoItemTypeElement <> 0) Begin Send AddAttribute Of hoItemTypeElement C_$Value tiSysInfoWorkSpaceBranch Send Destroy Of hoItemTypeElement End Get AddElement Of hoElement C_$Itemtype "tiSysInfoWorkSpaceBranchItem" To hoItemTypeElement If (hoItemTypeElement <> 0) Begin Send AddAttribute Of hoItemTypeElement C_$Value tiSysInfoWorkSpaceBranchItem Send Destroy Of hoItemTypeElement End Get AddElement Of hoElement C_$Itemtype "tiSysInfoMemoryBranch" To hoItemTypeElement If (hoItemTypeElement <> 0) Begin Send AddAttribute Of hoItemTypeElement C_$Value tiSysInfoMemoryBranch Send Destroy Of hoItemTypeElement End Get AddElement Of hoElement C_$Itemtype "tiSysInfoMemoryBranchItem" To hoItemTypeElement If (hoItemTypeElement <> 0) Begin Send AddAttribute Of hoItemTypeElement C_$Value tiSysInfoMemoryBranchItem Send Destroy Of hoItemTypeElement End Get AddElement Of hoElement C_$Itemtype "tiSysInfoFilesDirBranch" To hoItemTypeElement If (hoItemTypeElement <> 0) Begin Send AddAttribute Of hoItemTypeElement C_$Value tiSysInfoFilesDirBranch Send Destroy Of hoItemTypeElement End Get AddElement Of hoElement C_$Itemtype "tiSysInfoFilesDirBranchItem" To hoItemTypeElement If (hoItemTypeElement <> 0) Begin Send AddAttribute Of hoItemTypeElement C_$Value tiSysInfoFilesDirBranchItem Send Destroy Of hoItemTypeElement End Get AddElement Of hoElement C_$Itemtype "tiSysInfoKeyboardBranch" To hoItemTypeElement If (hoItemTypeElement <> 0) Begin Send AddAttribute Of hoItemTypeElement C_$Value tiSysInfoKeyboardBranch Send Destroy Of hoItemTypeElement End Get AddElement Of hoElement C_$Itemtype "tiSysInfoKeyboardBranchItem" To hoItemTypeElement If (hoItemTypeElement <> 0) Begin Send AddAttribute Of hoItemTypeElement C_$Value tiSysInfoKeyboardBranchItem Send Destroy Of hoItemTypeElement End Get AddElement Of hoElement C_$Itemtype "tiSysInfoAccKeysBranch" To hoItemTypeElement If (hoItemTypeElement <> 0) Begin Send AddAttribute Of hoItemTypeElement C_$Value tiSysInfoAccKeysBranch Send Destroy Of hoItemTypeElement End Get AddElement Of hoElement C_$Itemtype "tiSysInfoAccKeysBranchItem" To hoItemTypeElement If (hoItemTypeElement <> 0) Begin Send AddAttribute Of hoItemTypeElement C_$Value tiSysInfoAccKeysBranchItem Send Destroy Of hoItemTypeElement End Get AddElement Of hoElement C_$Itemtype "tiSysInfoRegistrationBranch" To hoItemTypeElement If (hoItemTypeElement <> 0) Begin Send AddAttribute Of hoItemTypeElement C_$Value tiSysInfoRegistrationBranch Send Destroy Of hoItemTypeElement End Get AddElement Of hoElement "itemtype" "tiSysInfoRegistrationBranchItem" To hoItemTypeElement If (hoItemTypeElement <> 0) Begin Send AddAttribute Of hoItemTypeElement C_$Value tiSysInfoRegistrationBranchItem Send Destroy Of hoItemTypeElement End Get AddElement Of hoElement C_$Itemtype "tiSysInfoDataBaseServersBranch" To hoItemTypeElement If (hoItemTypeElement <> 0) Begin Send AddAttribute Of hoItemTypeElement C_$Value tiSysInfoDataBaseServersBranch Send Destroy Of hoItemTypeElement End Get AddElement Of hoElement C_$Itemtype "tiSysInfoDataBaseServersBranchItem" To hoItemTypeElement If (hoItemTypeElement <> 0) Begin Send AddAttribute Of hoItemTypeElement C_$Value tiSysInfoDataBaseServersBranchItem Send Destroy Of hoItemTypeElement End Get AddElement Of hoElement C_$Itemtype "tiSysInfoGlobalAttributesBranch" To hoItemTypeElement If (hoItemTypeElement <> 0) Begin Send AddAttribute Of hoItemTypeElement C_$Value tiSysInfoGlobalAttributesBranch Send Destroy Of hoItemTypeElement End Get AddElement Of hoElement C_$Itemtype "tiSysInfoGlobalAttributesBranchItem" To hoItemTypeElement If (hoItemTypeElement <> 0) Begin Send AddAttribute Of hoItemTypeElement C_$Value tiSysInfoGlobalAttributesBranchItem Send Destroy Of hoItemTypeElement End Get AddElement Of hoElement C_$Itemtype "tiSysInfoGlobalVariablesBranch" To hoItemTypeElement If (hoItemTypeElement <> 0) Begin Send AddAttribute Of hoItemTypeElement C_$Value tiSysInfoGlobalVariablesBranch Send Destroy Of hoItemTypeElement End Get AddElement Of hoElement C_$Itemtype "tiSysInfoGlobalVariablesBranchItem" To hoItemTypeElement If (hoItemTypeElement <> 0) Begin Send AddAttribute Of hoItemTypeElement C_$Value tiSysInfoGlobalVariablesBranchItem Send Destroy Of hoItemTypeElement End Get AddElement Of hoElement C_$Itemtype "tiSysInfoSystemMetricsBranch" To hoItemTypeElement If (hoItemTypeElement <> 0) Begin Send AddAttribute Of hoItemTypeElement C_$Value tiSysInfoSystemMetricsBranch Send Destroy Of hoItemTypeElement End Get AddElement Of hoElement C_$Itemtype "tiSysInfoSystemMetricsBranchItem" To hoItemTypeElement If (hoItemTypeElement <> 0) Begin Send AddAttribute Of hoItemTypeElement C_$Value tiSysInfoSystemMetricsBranchItem Send Destroy Of hoItemTypeElement End Get AddElement Of hoElement C_$Itemtype "tiSysInfoSysConfBranch" To hoItemTypeElement If (hoItemTypeElement <> 0) Begin Send AddAttribute Of hoItemTypeElement C_$Value tiSysInfoSysConfBranch Send Destroy Of hoItemTypeElement End Get AddElement Of hoElement C_$Itemtype "tiSysInfoSysConfBranchItem" To hoItemTypeElement If (hoItemTypeElement <> 0) Begin Send AddAttribute Of hoItemTypeElement C_$Value tiSysInfoSysConfBranchItem Send Destroy Of hoItemTypeElement End Get AddElement Of hoElement C_$Itemtype "tiSysInfoDataFilesBranch" To hoItemTypeElement If (hoItemTypeElement <> 0) Begin Send AddAttribute Of hoItemTypeElement C_$Value tiSysInfoDataFilesBranch Send Destroy Of hoItemTypeElement End Get AddElement Of hoElement C_$Itemtype "tiSysInfoDataFilesFilesBranch" To hoItemTypeElement If (hoItemTypeElement <> 0) Begin Send AddAttribute Of hoItemTypeElement C_$Value tiSysInfoDataFilesFilesBranch Send Destroy Of hoItemTypeElement End Get AddElement Of hoElement C_$Itemtype "tiSysInfoDataFilesAttributesBranch" To hoItemTypeElement If (hoItemTypeElement <> 0) Begin Send AddAttribute Of hoItemTypeElement C_$Value tiSysInfoDataFilesAttributesBranch Send Destroy Of hoItemTypeElement End Get AddElement Of hoElement C_$Itemtype "tiSysInfoDataFilesFieldsBranch" To hoItemTypeElement If (hoItemTypeElement <> 0) Begin Send AddAttribute Of hoItemTypeElement C_$Value tiSysInfoDataFilesFieldsBranch Send Destroy Of hoItemTypeElement End Get AddElement Of hoElement C_$Itemtype "tiSysInfoDataFilesIndexesBranch" To hoItemTypeElement If (hoItemTypeElement <> 0) Begin Send AddAttribute Of hoItemTypeElement C_$Value tiSysInfoDataFilesIndexesBranch Send Destroy Of hoItemTypeElement End Get AddElement Of hoElement C_$Itemtype "tiSysInfoDataFilesBranchItem" To hoItemTypeElement If (hoItemTypeElement <> 0) Begin Send AddAttribute Of hoItemTypeElement C_$Value tiSysInfoDataFilesBranchItem Send Destroy Of hoItemTypeElement End Get AddElement Of hoElement C_$Itemtype "tiSysInfoApplicationBranch" To hoItemTypeElement If (hoItemTypeElement <> 0) Begin Send AddAttribute Of hoItemTypeElement C_$Value tiSysInfoApplicationBranch Send Destroy Of hoItemTypeElement End Get AddElement Of hoElement C_$Itemtype "tiSysInfoApplicationBranchItem" To hoItemTypeElement If (hoItemTypeElement <> 0) Begin Send AddAttribute Of hoItemTypeElement C_$Value tiSysInfoApplicationBranchItem Send Destroy Of hoItemTypeElement End Send Destroy Of hoElement End End_Procedure // DoAddMetaData // This method is called to export all treeview information in a XML document. To do this we // need to open all treeview items first. The filename will be always sysinfo.xml stored in the // first directory of the datapath. If there is no workspace object the file will be created in // the current windows directory. Procedure DoExportToXML Handle hRootItem Integer hoXML hoDocumentRoot hoProcessInstructionNode iResult hoCommentNode hoWorkSpace String sDataPath Boolean bErr Get Create U_cXMLDomDocument To hoXML If (hoXML <> 0) Begin If (ghoApplication <> 0) Begin Get phoWorkSpace Of ghoApplication To hoWorkSpace End If (hoWorkSpace <> 0) Begin Get psDataPath Of hoWorkSpace To sDataPath If (sDataPath <> "") Begin Get PathAtIndex Of hoWorkSpace sDataPath 1 To sDataPath Move (Trim (sDataPath)) To sDataPath If (Right (sDataPath, 1) <> SysConf (SYSCONF_DIR_SEPARATOR)) Begin Move (sDataPath - SysConf (SYSCONF_DIR_SEPARATOR)) To sDataPath End End End Set psDocumentName Of hoXML To (Trim (sDataPath) - "SysInfo.XML") Get CreateDocumentElement Of hoXML C_$XMLExportSysteminfo To hoDocumentRoot If (hoDocumentRoot <> 0) Begin Get CreateChildProcessingInstruction Of hoDocumentRoot "xml" 'version="1.0" encoding="UTF-8" standalone="yes"' To hoProcessInstructionNode If (hoProcessInstructionNode <> 0) Begin Get InsertBeforeNode Of hoXML hoProcessInstructionNode hoDocumentRoot To iResult Send Destroy Of hoProcessInstructionNode End Get CreateChildComment Of hoXML (SFormat (C_$SysInfoXMLExportComment, String (CurrentDateTime ()))) To hoCommentNode If (hoCommentNode <> 0) Begin Get InsertBeforeNode Of hoXML hoCommentNode hoDocumentRoot To iResult Send Destroy Of hoCommentNode End Get RootItem To hRootItem Send DoEnumerateTree Msg_OnItemExpanding hRootItem 0 Send DoAddMetaData hoDocumentRoot Send DoEnumerateTreeForXMLExport hRootItem 0 hoDocumentRoot Send DoEnumerateTree Msg_OnItemCollapsed hRootItem 0 Send Destroy Of hoDocumentRoot Get SaveXMLDocument Of hoXML To bErr If (Not (bErr)) Begin Send Info_Box (SFormat (C_$XMLExportTo, psDocumentName (hoXML), C_$Successfull)) End Else Begin Send Stop_Box (SFormat (C_$XMLExportTo, psDocumentName (hoXML), C_$NotSuccessfull)) End End Send Destroy Of hoXML End End_Procedure // DoExportToXML //AB-StoreEnd End_Object // oSystemInfoTreeView //AB-StoreStart // Since the real export takes place in the treeview we will redirect this message to // export to the treeview. Procedure DoRequestExportToXML Send DoExportToXML Of oSystemInfoTreeView End_Procedure // DoRequestExportToXML //AB-StoreEnd End_Object // oBox Object oXMLExportButton is a Button Set Label to "&XML export" Set Location to 157 230 Set peAnchors to anBottomRight //AB-StoreStart // Start the XML export of the treeview data. Tell the user to be patient by changing the // cursor shape. Procedure OnClick Integer hoCursorControl Move Cursor_Control To hoCursorControl Send Cursor_Wait Of hoCursorControl Send DoRequestExportToXML Of oBox Send Cursor_Ready Of hoCursorControl End_Procedure // OnClick //AB-StoreEnd End_Object // oXMLExportButton Object oOkButton is a Button Set Label to "&OK" Set Location to 157 285 Set peAnchors to anBottomRight Set Default_State to TRUE //AB-StoreStart // Just close the systeminfo panel Procedure OnClick Send Close_Panel End_Procedure // OnClick //AB-StoreEnd End_Object // oOkButton //AB-StoreStart // Tell the object what to do if the following keys are pressed. On_Key kCancel Send KeyAction Of oOkButton On_Key Key_Alt+Key_O Send KeyAction Of oOkButton On_Key Key_Alt+Key_X Send KeyAction Of oXMLExportButton // Make the panel show centered on the screen Set Locate_Mode To CENTER_ON_SCREEN //AB-StoreEnd End_Object // oSystemInformationDialog //AB-StoreStart //AB-StoreEnd //AB/ End_Object // prj