Use Windows.pkg Use Tools\TH3Workspace.pkg Use cSplitButton.pkg Use Dir_Dlg.pkg Use File_dlg.pkg Use cCmdLineSelector.pkg Use THDialog.pkg Use cTextEdit.pkg Use cCJCommandBarSystem.pkg Class cTHWSGrid is a Grid Procedure Construct_Object Forward Send Construct_Object Set Size to 115 233 Set Location to 11 7 Set CurrentCellColor to (RGB(39,150,216)) Set CurrentCellTextColor to clWhite Set CurrentRowColor to (RGB(39,150,216)) Set CurrentRowTextColor to clWhite Set Resize_Column_State to False Set Highlight_Row_State to True Set GridLine_Mode to Grid_Visible_Horz Set Select_Mode to No_Select On_Key Key_Delete Send mRemoveLine On_Key Key_Insert Send mInsertLine On_Key Key_Enter Send Next End_Procedure Procedure DoFillGrid End_Procedure Function Base_Row_Item Integer iItem Returns Integer Function_Return (iItem-mod(iItem,low(matrix_size(Self)))) End_Function End_Class Object oTH3WorkspaceConfigure is a ModalPanel Set Size to 195 325 Set Label to "Configure Project Workspace" Set piMinSize to 195 325 Set Location to 2 2 Set Border_Style To Border_Thick Set Locate_Mode to CENTER_ON_SCREEN Set Icon to "Configure16.ico" Object oApplyBtn is a Button Set Label to "&Apply" Set Location to 176 213 Set peAnchors To anBottomRight Procedure OnClick Send mApplyChanges End_Procedure End_Object Object oCancelBtn is a Button Set Label to "&Cancel" Set Location to 176 269 Set peAnchors to anBottomRight Procedure OnClick Send Close_Panel End_Procedure End_Object Object oWSConfig is a TabDialog Set Size to 165 315 Set Location to 5 5 Set peAnchors to anAll Object oGeneralPage is a TabPage Set Label to "General" Object oProjectGroup is a Group Set Size to 58 300 Set Location to 3 5 Set peAnchors to anTopLeftRight Set Label to "Project" Object oProjectName is a Form Set Size to 13 170 Set Location to 10 75 Set Status_Help to "Leave blank for the default name" Set Label to "Name (optional)" Set Label_Col_Offset to 2 Set Label_Justification_Mode to JMode_Right Set peAnchors to anTopLeftRight Procedure Activating tTHWorkspace THWorkspace Forward Send Activating Get pTHWorkspace of ghoApplication To THWorkspace Set Value to THWorkspace.sName End_Procedure End_Object Object oSchema is a ComboForm Set Size to 12 100 Set Location to 26 75 Set Label to "Schema (optional)" Set Status_Help to "Optional The Hammer Schema" Set Label_Col_Offset to 2 Set Label_Justification_Mode to JMode_Right Set peAnchors to anTopLeftRight Procedure Combo_Fill_List tTHWorkspace THWorkspace Get pTHWorkspace of ghoApplication To THWorkspace Send Combo_Add_Item TH_SCHEMA_DATAFLEX Send Combo_Add_Item TH_SCHEMA_DELPHI Send Combo_Add_Item TH_SCHEMA_CCPP Send Combo_Add_Item TH_SCHEMA_PYTHON Send Combo_Add_Item TH_SCHEMA_WEB Send Combo_Add_Item TH_SCHEMA_OTHER Set Entry_State item 0 to False If (THWorkspace.sSchema<>"") Set Value to THWorkspace.sSchema Else Set Value to TH_SCHEMA_OTHER End_Procedure Procedure Activating tTHWorkspace THWorkspace Forward Send Activating Get pTHWorkspace of ghoApplication To THWorkspace If (THWorkspace.sSchema<>"") Set Value to THWorkspace.sSchema Else Set Value to TH_SCHEMA_OTHER End_Procedure End_Object Object oShowPaths is a CheckBox Set Size to 10 50 Set Location to 42 75 Set Label to "Show file paths" Procedure Activating tTHWorkspace THWorkspace Forward Send Activating Get pTHWorkspace of ghoApplication To THWorkspace Set Checked_State to THWorkspace.iShowPaths End_Procedure End_Object End_Object Object oWorkspaceGroup is a Group Set Size to 85 301 Set Location to 61 5 Set Label to 'Workspace*' Set peAnchors to anAll Object oOpenDialog is a OpenDialog Set Filter_String to ; 'Executable|*.exe|All Files|*.*' Set Initial_Folder to 'C:\Program Files (x86)' End_Object Object oStudio is a Form Set Size to 13 170 Set Location to 10 75 Set Status_Help to "Leave blank for the default option" Set Label to "Studio / IDE" Set Label_Col_Offset to 2 Set Label_Justification_Mode to JMode_Right Set peAnchors to anTopLeftRight Procedure Activating tTHWorkspace THWorkspace Forward Send Activating Get pTHWorkspace of ghoApplication To THWorkspace Set Value to THWorkspace.sStudio End_Procedure End_Object Object oBrowseStudio is a cCmdLineSelector Set Location to 10 250 Set Size to 13 40 Set psFileDialogCaption to "Select the Studio / IDE" Set phoPathForm to (oStudio(Self)) Set peAnchors to anTopRight End_Object Object oCompiler is a Form Set Size to 13 170 Set Location to 26 75 Set Status_Help to "Leave blank for the default option" Set Label to "Compiler" Set Label_Col_Offset to 2 Set Label_Justification_Mode to JMode_Right Set peAnchors to anTopLeftRight Procedure Activating tTHWorkspace THWorkspace Forward Send Activating Get pTHWorkspace of ghoApplication To THWorkspace Set Value to THWorkspace.sCompiler End_Procedure End_Object Object oBrowseCompiler is a cCmdLineSelector Set Location to 26 250 Set Size to 13 40 Set psFileDialogCaption to "Select Project Compiler" Set phoPathForm to (oCompiler(Self)) Set peAnchors to anTopRight End_Object Object oDBEditor is a Form Set Size to 13 170 Set Location to 42 75 Set Status_Help to "Leave blank for the default option" Set Label to "Database Editor" Set Label_Col_Offset to 2 Set Label_Justification_Mode to JMode_Right Set peAnchors to anTopLeftRight Procedure Activating tTHWorkspace THWorkspace Forward Send Activating Get pTHWorkspace of ghoApplication To THWorkspace Set Value to THWorkspace.sDBEditor End_Procedure End_Object Object oBrowseEditor is a cCmdLineSelector Set Location to 42 250 Set Size to 13 40 Set psFileDialogCaption to "Select Database Editor" Set phoPathForm to (oDBEditor(Self)) Set peAnchors to anTopRight End_Object Object oDBViewer is a Form Set Size to 13 170 Set Location to 58 75 Set Status_Help to "Leave blank for the default option" Set Label to "Database Viewer" Set Label_Col_Offset to 2 Set Label_Justification_Mode to JMode_Right Set peAnchors to anTopLeftRight Procedure Activating tTHWorkspace THWorkspace Forward Send Activating Get pTHWorkspace of ghoApplication To THWorkspace Set Value to THWorkspace.sDBViewer End_Procedure End_Object Object oBrowseViewer is a cCmdLineSelector Set Location to 58 250 Set Size to 13 40 Set psFileDialogCaption to "Select Database Viewer" Set phoPathForm to (oDBViewer(Self)) Set peAnchors to anTopRight End_Object Object oNote is a TextBox Set Auto_Size_State to False Set Size to 10 215 Set Location to 72 75 Set Label to '* Leave these options blank to use The Hammer defaults.' End_Object End_Object Procedure mApply tTHWorkspace ByRef THWorkspace Get Value of oProjectName to THWorkspace.sName Get Value of oSchema to THWorkspace.sSchema Get Checked_State of oShowPaths to THWorkspace.iShowPaths Get Value of oStudio to THWorkspace.sStudio Get Value of oCompiler to THWorkspace.sCompiler Get Value of oDBEditor to THWorkspace.sDBEditor Get Value of oDBViewer to THWorkspace.sDBViewer End_Procedure #IFDEF TH_TRANSLATION Procedure Translate Set Label to gILanguage[776] // Project Group Set Label of oProjectGroup to gILanguage[777] Set Label of (oProjectName(oProjectGroup(Self))) to gILanguage[778] Set Status_Help of (oProjectName(oProjectGroup(Self))) to gILanguage[779] Set Label of (oSchema(oProjectGroup(Self))) to gILanguage[780] Set Status_Help of (oSchema(oProjectGroup(Self))) to gILanguage[781] Set Label of (oShowPaths(oProjectGroup(Self))) to gILanguage[782] Set Status_Help of (oShowPaths(oProjectGroup(Self))) to gILanguage[783] // Workspace Group Set Label of oWorkspaceGroup to gILanguage[784] Set Filter_String of (oOpenDialog(oWorkspaceGroup(Self))) to gILanguage[785] Set Label of (oStudio(oWorkspaceGroup(Self))) to gILanguage[786] Set Status_Help of (oStudio(oWorkspaceGroup(Self))) to gILanguage[787] Set psFileDialogCaption of (oBrowseStudio(oWorkspaceGroup(Self))) to gILanguage[788] Set Label of (oBrowseStudio(oWorkspaceGroup(Self))) to gILanguage[799] Set Label of (oCompiler(oWorkspaceGroup(Self))) to gILanguage[789] Set Status_Help of (oCompiler(oWorkspaceGroup(Self))) to gILanguage[790] Set psFileDialogCaption of (oBrowseCompiler(oWorkspaceGroup(Self))) to gILanguage[791] Set Label of (oBrowseCompiler(oWorkspaceGroup(Self))) to gILanguage[799] Set Label of (oDBEditor(oWorkspaceGroup(Self))) to gILanguage[792] Set Status_Help of (oDBEditor(oWorkspaceGroup(Self))) to gILanguage[793] Set psFileDialogCaption of (oBrowseEditor(oWorkspaceGroup(Self))) to gILanguage[794] Set Label of (oBrowseEditor(oWorkspaceGroup(Self))) to gILanguage[799] Set Label of (oDBViewer(oWorkspaceGroup(Self))) to gILanguage[795] Set Status_Help of (oDBViewer(oWorkspaceGroup(Self))) to gILanguage[796] Set psFileDialogCaption of (oBrowseViewer(oWorkspaceGroup(Self))) to gILanguage[797] Set Label of (oBrowseViewer(oWorkspaceGroup(Self))) to gILanguage[799] Set Label of (oNote(oWorkspaceGroup(Self))) to gILanguage[798] End_Procedure #ENDIF End_Object // oGenralPage Object oFoldersPage is a TabPage Set Label to "Folders" Object oFoldersGroup is a Group Set Size to 142 300 Set Location to 3 5 Set peAnchors to anAll Object oListFolders is an OpenDirDialog Set Dialog_Caption to "Select Source Directory" End_Object Object oFolders is a cTHWSGrid Set Size to 112 233 Set Line_Width to 1 0 Set Form_Width 0 to 230 Set Header_Label 0 to "Folder" Set peAnchors to anAll On_Key Key_Insert Send mAddFolder Procedure DoFillGrid Integer iFolder iFolders tTHWorkspace THWorkspace Send Delete_Data Get pTHWorkspace of ghoApplication To THWorkspace Move (SizeOfArray(THWorkspace.saFolders)) to iFolders For iFolder from 0 to (iFolders-1) If (iFolder=0) Send Add_Item Msg_None ('['+THWorkspace.saFolders[iFolder]+"]*") Else Send Add_Item Msg_None THWorkspace.saFolders[iFolder] Set Entry_State item (Item_Count(Self)-1) to False Loop End_Procedure Procedure Add_New_Line String sName Send Add_Item Msg_None sName Set ItemTextColor (Item_Count(oFolders(Self))-1) to clRed End_Procedure End_Object Procedure mRemoveLine Integer iItem Get Current_Item of oFolders to iItem If (iItem=0) Begin Send Info_Box (_T("Project Home folder can not be removed.", 803)) (_T("Warning", 804)) Procedure_Return End Send Delete_Item to oFolders (Current_Item(oFolders(Self))) End_Procedure Procedure mAddFolder Integer iOK String sFolder Get Show_Dialog of oListFolders to iOK If (iOK) Begin Get Dir_Name of oListFolders to sFolder Send Add_New_Line to oFolders sFolder End End_Procedure Object oAdd is a Button Set Location to 11 245 Set Label to "Add (Ins)" Set peAnchors to anTopRight Procedure OnClick Send mAddFolder End_Procedure End_Object Object oRemove is a Button Set Location to 28 245 Set Label to "Remove (Del)" Set peAnchors to anTopRight Procedure OnClick Send mRemoveLine End_Procedure End_Object Object oHelp is a TextBox Set Auto_Size_State to False Set Size to 10 287 Set Location to 126 8 Set Label to "* Project Workspace Folder" Set peAnchors to anBottomLeft End_Object End_Object Procedure mApply tTHWorkspace ByRef THWorkspace Integer iFolder iFolders String sFolder Get Item_Count of oFolders to iFolders For iFolder from 0 to (iFolders-1) Get Value of oFolders item iFolder to sFolder If (sFolder<>"") Begin If (iFolder=0) Begin // '[' Move (Right(sFolder, Length(sFolder)-1)) to sFolder // ']*' Move (Left(sFolder, Length(sFolder)-2)) to sFolder End Move sFolder to THWorkspace.saFolders[SizeOfArray(THWorkspace.saFolders)] End Loop End_Procedure #IFDEF TH_TRANSLATION Procedure Translate Set Label to gILanguage[800] Set Dialog_Caption of (oListFolders(oFoldersGroup(Self))) to (ToAnsi(gILanguage[801])) Set Header_Label of (oFolders(oFoldersGroup(Self))) 0 to gILanguage[802] Set Label of (oAdd(oFoldersGroup(Self))) to gILanguage[805] Set Label of (oRemove(oFoldersGroup(Self))) to gILanguage[806] Set Label of (oHelp(oFoldersGroup(Self))) to gILanguage[807] End_Procedure #ENDIF End_Object // oFoldersPage Object oFilesPage is a TabPage Set Label to "Include" Object oFilesGroup is a Group Set Size to 142 300 Set Location to 3 5 Set peAnchors to anAll Object oFiles is a cTHWSGrid Set Size to 112 233 Set Line_Width to 2 0 Set Form_Width 0 to 60 Set Header_Label 0 to "Extension" Set Form_Width 1 to 170 Set Header_Label 1 to "Description" Set peAnchors to anAll Procedure DoFillGrid Integer iFile iFiles tTHWorkspace THWorkspace Send Delete_Data Get pTHWorkspace of ghoApplication To THWorkspace Move (SizeOfArray(THWorkspace.saFiles)) to iFiles For iFile from 0 to (iFiles-1) Send Add_Item Msg_None THWorkspace.saFiles[iFile] Set Entry_State item (Item_Count(Self)-1) to False Send Add_Item Msg_None THWorkspace.saFileDesc[iFile] Set Entry_State item (Item_Count(Self)-1) to False Loop End_Procedure Procedure Add_New_Line String sName String sDesc Send Add_Item Msg_None sName Set ItemTextColor (Item_Count(oFiles(Self))-1) to clRed Send Add_Item Msg_None sDesc Set ItemTextColor (Item_Count(oFiles(Self))-1) to clRed End_Procedure End_Object Procedure mRemoveLine Integer iRowBase If (Item_Count(oFiles(Self))=0) Procedure_Return Get Base_Row_Item of oFiles (Current_Item(oFiles(Self))) to iRowBase Send Delete_Item to oFiles (iRowBase+1) Send Delete_Item to oFiles iRowBase End_Procedure Procedure mInsertLine Send Add_New_Line to oFiles "" "" Send End_of_Data to oFiles Send Activate to oFiles End_Procedure Procedure mRemoveAll Integer iOK If (Item_Count(oFiles(Self))) Begin Get YesNo_Box (_T("Confirm You wish to remove all files extensions?", 811)) (_T("Confirmation", 812)) MBR_No to iOK If (iOk=MBR_Yes) Send Delete_Data to oFiles End End_Procedure Procedure ApplyDataFlex Send Add_New_Line to oFiles "SRC" "DataFlex Project (Program)" Send Add_New_Line to oFiles "PKG" "DataFlex Package" Send Add_New_Line to oFiles "DD" "DataFlex Data Dictionary" Send Add_New_Line to oFiles "BP" "DataFlex Business Process" Send Add_New_Line to oFiles "DG" "DataFlex Dialog" Send Add_New_Line to oFiles "SL" "DataFlex Selection List" Send Add_New_Line to oFiles "VW" "DataFlex View" Send Add_New_Line to oFiles "RV" "DataFlex Report View" Send Add_New_Line to oFiles "WO" "DataFlex Web Object" Send Add_New_Line to oFiles "UTL" "Sture's DataFlex Utility" Send Add_New_Line to oFiles "MN" "DataFlex Menu (Obsolete)" Send Add_New_Line to oFiles "HTM" "HyperText Markup Language" Send Add_New_Line to oFiles "HTML" "HyperText Markup Language" Send Add_New_Line to oFiles "ASP" "Active Server Page" Send Add_New_Line to oFiles "JS" "JavaScript" Send Add_New_Line to oFiles "WS" "DataFlex Workspace" Send Add_New_Line to oFiles "SWS" "DataFlex Studio Workspace" Send Add_New_Line to oFiles "INI" "Configuration File" Send Add_New_Line to oFiles "CSS" "Cascading Style Sheet" Send Add_New_Line to oFiles "INT" "Database Intermediate File" End_Procedure Procedure ApplyWeb Send Add_New_Line to oFiles "HTM" "HyperText Markup Language" Send Add_New_Line to oFiles "HTML" "HyperText Markup Language" Send Add_New_Line to oFiles "ASP" "Active Server Page" Send Add_New_Line to oFiles "JS" "JavaScript" Send Add_New_Line to oFiles "JSON" "JSON Object" Send Add_New_Line to oFiles "CSS" "Cascading Style Sheet" Send Add_New_Line to oFiles "XML" "eXtensible Markup Language" End_Procedure Procedure ApplyDelphi Send Add_New_Line to oFiles "PAS" "Delphi Unit Source File" Send Add_New_Line to oFiles "DOF" "Delphi Project Options" Send Add_New_Line to oFiles "DPK" "Delphi Package Project" Send Add_New_Line to oFiles "DPKW" "Delphi Package Project for Windows" Send Add_New_Line to oFiles "DPR" "Delphi Project File" Send Add_New_Line to oFiles "BDSPROJ" "Developer Studio Project File" Send Add_New_Line to oFiles "DPROJ" "Project File for the native compiler" Send Add_New_Line to oFiles "GROUPPROJ" "Project Group File" Send Add_New_Line to oFiles "PROJ" "Codegear RAD Studio project" End_Procedure Procedure ApplyCCPP Send Add_New_Line to oFiles "VCXPROJ" "Visual C++ Project File" Send Add_New_Line to oFiles "H" "Header" Send Add_New_Line to oFiles "C" "C Source File" Send Add_New_Line to oFiles "CPP" "C++ Source File" End_Procedure Procedure ApplyPython Send Add_New_Line to oFiles "PY" "Python Source File" Send Add_New_Line to oFiles "PYW" "Python for Windows" End_Procedure Procedure ApplyDefaults String sType Integer iOk String sConfirmation #IFDEF TH_TRANSLATION Move (Replace("%1", gILanguage[813], sType)) to sConfirmation Get YesNo_Box sConfirmation gILanguage[814] MBR_No to iOK #ELSE Get YesNo_Box ("Confirm You wish to apply"*sType*"defaults?") "Confirmation" MBR_No to iOK #ENDIF If (iOk=MBR_Yes) Begin Send Delete_Data to oFiles If (sType=TH_SCHEMA_DATAFLEX) Send ApplyDataFlex Else If (sType=TH_SCHEMA_WEB) Send ApplyWeb Else If (sType=TH_SCHEMA_DELPHI) Send ApplyDelphi Else If (sType=TH_SCHEMA_CCPP) Send ApplyCCPP Else If (sType=TH_SCHEMA_PYTHON) Send ApplyPython End End_Procedure Object oAdd is a Button Set Location to 11 245 Set Label to "Add (Ins)" Set peAnchors to anTopRight Procedure OnClick Send mInsertLine End_Procedure End_Object Object oRemove is a Button Set Location to 28 245 Set Label to "Remove (Del)" Set peAnchors to anTopRight Procedure OnClick Send mRemoveLine End_Procedure End_Object Object oRemoveAll is a Button Set Location to 45 245 Set Label to "Remove All" Set peAnchors to anTopRight Procedure OnClick Send mRemoveAll End_Procedure End_Object Object oAddDefault is a cSplitButton Set Location to 109 245 Set Label to 'Defaults' Set peAnchors to anBottomRight Procedure OnClick String sLabel Move (Label(Self)) to sLabel If (sLabel=_T("Defaults", 818)) Send OnDropDown Else Send ApplyDefaults sLabel End_Procedure Object oButtonMenu is a cCJContextMenu Object oDataFlexDefaults is a cCJMenuItem Set psCaption to TH_SCHEMA_DATAFLEX Procedure OnExecute Variant vCommandBarControl Delegate Set Label to TH_SCHEMA_DATAFLEX Send ApplyDefaults TH_SCHEMA_DATAFLEX End_Procedure End_Object Object oDelphiDefaults is a cCJMenuItem Set psCaption to TH_SCHEMA_DELPHI Procedure OnExecute Variant vCommandBarControl Delegate Set Label to TH_SCHEMA_DELPHI Send ApplyDefaults TH_SCHEMA_DELPHI End_Procedure End_Object Object oCCPPDefaults is a cCJMenuItem Set psCaption to TH_SCHEMA_CCPP Procedure OnExecute Variant vCommandBarControl Delegate Set Label to TH_SCHEMA_CCPP Send ApplyDefaults TH_SCHEMA_CCPP End_Procedure End_Object Object oPythonDefaults is a cCJMenuItem Set psCaption to TH_SCHEMA_PYTHON Procedure OnExecute Variant vCommandBarControl Delegate Set Label to TH_SCHEMA_PYTHON Send ApplyDefaults TH_SCHEMA_PYTHON End_Procedure End_Object Object oWebDefaults is a cCJMenuItem Set psCaption to TH_SCHEMA_WEB Procedure OnExecute Variant vCommandBarControl Delegate Set Label to TH_SCHEMA_WEB Send ApplyDefaults TH_SCHEMA_WEB End_Procedure End_Object End_Object Set phoButtonPopup to oButtonMenu End_Object Object oHelp is a TextBox Set Auto_Size_State to False Set Size to 10 287 Set Location to 126 8 Set Label to "* File extensions to be shown on the Project list" Set peAnchors to anBottomLeft End_Object End_Object Procedure mApply tTHWorkspace ByRef THWorkspace Integer iFile iFiles iCount String sFile Get Item_Count of oFiles to iFiles For iFile from 0 to (iFiles-1) Get Value of oFiles item iFile to sFile If (sFile="") Increment iFile Else Begin Move sFile to THWorkspace.saFiles[iCount] Increment iFile Get Value of oFiles item iFile to THWorkspace.saFileDesc[iCount] Increment iCount End Loop End_Procedure #IFDEF TH_TRANSLATION Procedure Translate Set Label to gILanguage[808] Set Header_Label of (oFiles(oFilesGroup(Self))) 0 to gILanguage[809] Set Header_Label of (oFiles(oFilesGroup(Self))) 1 to gILanguage[810] Set Label of (oAdd(oFilesGroup(Self))) to gILanguage[815] Set Label of (oRemove(oFilesGroup(Self))) to gILanguage[816] Set Label of (oRemoveAll(oFilesGroup(Self))) to gILanguage[817] Set Label of (oAddDefault(oFilesGroup(Self))) to gILanguage[818] Set Label of (oHelp(oFilesGroup(Self))) to gILanguage[819] End_Procedure #ENDIF End_Object // oFilesPage Object oExcludePage is a TabPage Set Label to "Exclude" Object oExcludeGroup is a Group Set Size to 142 300 Set Location to 3 5 Set peAnchors to anAll Object oExcludes is a cTHWSGrid Set Size to 112 233 Set Line_Width to 1 0 Set Form_Width 0 to 230 Set Header_Label 0 to "Pattern" Set peAnchors to anAll On_Key Key_Insert Send mAddExclude Procedure DoFillGrid Integer iExclude iExcludes tTHWorkspace THWorkspace Get pTHWorkspace of ghoApplication To THWorkspace Send Delete_Data Move (SizeOfArray(THWorkspace.saExclude)) to iExcludes For iExclude from 0 to (iExcludes-1) Send Add_Item Msg_None THWorkspace.saExclude[iExclude] Set Entry_State item (Item_Count(Self)-1) to False Loop End_Procedure Procedure Add_New_Line String sName Send Add_Item Msg_None sName Set ItemTextColor (Item_Count(Self)-1) to clRed End_Procedure End_Object Procedure mRemoveLine Send Delete_Item to oExcludes (Current_Item(oExcludes(Self))) End_Procedure Procedure mAddExclude Send Add_New_Line to oExcludes "" Send End_of_Data to oExcludes Send Activate to oExcludes End_Procedure Object oAdd is a Button Set Location to 11 245 Set Label to "Add (Ins)" Set peAnchors to anTopRight Procedure OnClick Send mAddExclude End_Procedure End_Object Object oRemove is a Button Set Location to 28 245 Set Label to "Remove (Del)" Set peAnchors to anTopRight Procedure OnClick Send mRemoveLine End_Procedure End_Object Object oHelp is a TextBox Set Auto_Size_State to False Set Size to 10 287 Set Location to 126 8 Set Label to "* Enter file or folder name to be excluded" Set peAnchors to anBottomLeft End_Object End_Object Procedure mApply tTHWorkspace ByRef THWorkspace Integer iExclude iExcludes String sPattern Get Item_Count of oExcludes to iExcludes For iExclude from 0 to (iExcludes-1) Get Value of oExcludes item iExclude to sPattern If (sPattern<>"") ; Move sPattern to THWorkspace.saExclude[SizeOfArray(THWorkspace.saExclude)] Loop End_Procedure #IFDEF TH_TRANSLATION Procedure Translate Set Label to gILanguage[820] Set Header_Label of (oExcludes(oExcludeGroup(Self))) 0 to gILanguage[821] Set Label of (oAdd(oExcludeGroup(Self))) to gILanguage[822] Set Label of (oRemove(oExcludeGroup(Self))) to gILanguage[823] Set Label of (oHelp(oExcludeGroup(Self))) to gILanguage[824] End_Procedure #ENDIF End_Object // oExcludePage Object oSourcePage is a TabPage Set Label to "Repository" Object oSourceGroup is a Group Set Size to 143 300 Set Location to 3 5 Set peAnchors to anAll Object oSources is a cTHWSGrid Set Location to 11 7 Set Size to 112 288 Set Line_Width to 3 0 Set Form_Width 0 to 180 Set Header_Label 0 to "Source File Name" Set Header_Label 1 to "Cursor Position" Set Form_Width 1 to 60 Set Header_Label 2 to "Bookmarks" Set Form_Width 2 to 45 Set peAnchors to anAll Set peResizeColumn to rcSelectedColumn Set Resize_Column_State to True On_Key Key_Insert Send mAddLine Procedure DoFillGrid Integer iFile iFiles tTHWorkspace THWorkspace Send Delete_Data Get pTHWorkspace of ghoApplication To THWorkspace Move (SizeOfArray(THWorkspace.taSources)) to iFiles For iFile from 0 to (iFiles-1) Send Add_Item Msg_None THWorkspace.taSources[iFile].sFile Set Entry_State item (Item_Count(Self)-1) to False #IFDEF TH_TRANSLATION Send Add_Item Msg_None ; (gILanguage[829]*String(THWorkspace.taSources[iFile].iCursorLine)+","*gILanguage[830]*String(THWorkspace.taSources[iFile].iCursorColumn)) #ELSE Send Add_Item Msg_None ; ("Ln"*String(THWorkspace.taSources[iFile].iCursorLine)+", Col"*String(THWorkspace.taSources[iFile].iCursorColumn)) #ENDIF Set Entry_State item (Item_Count(Self)-1) to False Send Add_Item Msg_None THWorkspace.taSources[iFile].iBookmarkCount Set Entry_State item (Item_Count(Self)-1) to False Loop End_Procedure Procedure mAddLine End_Procedure Procedure mRemoveLine Integer iRowBase If (Item_Count(Self)=0) Procedure_Return Get Base_Row_Item (Current_Item(Self)) to iRowBase Send Delete_Item (iRowBase+2) Send Delete_Item (iRowBase+1) Send Delete_Item iRowBase End_Procedure End_Object Object oRemove is a Button Set Location to 125 245 Set Label to "Remove (Del)" Set peAnchors to anBottomRight Procedure OnClick Integer iOK Get YesNo_Box (_T("Confirm You wish delete pre-saved file information?", 832)) (_T("Confirmation", 833)) MBR_No to iOK If (iOk=MBR_Yes) Send mRemoveLine to oSources End_Procedure End_Object Object oHelp is a TextBox Set Auto_Size_State to False Set Size to 10 230 Set Location to 125 8 Set Label to "Pre-saved file information (Bookmarks and Cursor position)" Set peAnchors to anBottomLeft End_Object End_Object //oSourceGroup Procedure mApply tTHWorkspace ByRef THWorkspace Integer iFile iFiles iFound String sFile tTHSource[] lTHSources Get Item_Count of oSources to iFiles For iFile from 0 to (iFiles-1) Get Value of oSources item iFile to sFile If (sFile<>"") Begin Get THWS_FindFile sFile to iFound If (iFound>=0) Move THWorkspace.taSources[iFound] to lTHSources[SizeOfArray(lTHSources)] Increment iFile Increment iFile End Loop Move lTHSources To THWorkspace.taSources End_Procedure #IFDEF TH_TRANSLATION Procedure Translate Set Label to gILanguage[825] Set Header_Label of (oSources(oSourceGroup(Self))) 0 to gILanguage[826] Set Header_Label of (oSources(oSourceGroup(Self))) 1 to gILanguage[827] Set Header_Label of (oSources(oSourceGroup(Self))) 2 to gILanguage[828] Set Label of (oRemove(oSourceGroup(Self))) to gILanguage[831] Set Label of (oHelp(oSourceGroup(Self))) to gILanguage[834] End_Procedure #ENDIF End_Object // oSourcePage Object oFindPage is a TabPage Set Label to "Find-in-Files" Object oFindOptionsGroup is a Group Set Size to 34 301 Set Location to 3 5 Set Label to "Options" Set peAnchors to anTopLeftRight Object oMatchWord is a CheckBox Set Size to 10 50 Set Location to 10 60 Set Label to "Match Whole Word" Procedure Activating tTHWorkspace THWorkspace Forward Send Activating Get pTHWorkspace of ghoApplication To THWorkspace Set Checked_State to THWorkspace.iFFMatchWord End_Procedure End_Object Object oMatchCase is a CheckBox Set Size to 10 50 Set Location to 20 60 Set Label to "Match Case" Procedure Activating tTHWorkspace THWorkspace Forward Send Activating Get pTHWorkspace of ghoApplication To THWorkspace Set Checked_State to THWorkspace.iFFMatchCase End_Procedure End_Object Object oRegExp is a CheckBox Set Size to 10 50 Set Location to 10 145 Set Label to "Regular Expression" Procedure Activating tTHWorkspace THWorkspace Forward Send Activating Get pTHWorkspace of ghoApplication To THWorkspace Set Checked_State to THWorkspace.iFFRegExp End_Procedure End_Object Object oSearchSub is a CheckBox Set Size to 10 50 Set Location to 20 145 Set Label to "Search Subfolders" Procedure Activating tTHWorkspace THWorkspace Forward Send Activating Get pTHWorkspace of ghoApplication To THWorkspace Set Checked_State to THWorkspace.iFFSubFolders End_Procedure End_Object Object oShowAll is a CheckBox Set Size to 10 50 Set Location to 10 225 Set Label to "Show All Results" Procedure Activating tTHWorkspace THWorkspace Forward Send Activating Get pTHWorkspace of ghoApplication To THWorkspace Set Checked_State to THWorkspace.iFFShowAll End_Procedure End_Object Object oExcludeComments is a CheckBox Set Size to 10 50 Set Location to 20 225 Set Label to "Exclude comments" Procedure Activating tTHWorkspace THWorkspace Forward Send Activating Get pTHWorkspace of ghoApplication To THWorkspace Set Checked_State to THWorkspace.iFFExcludeComments End_Procedure End_Object End_Object Object oFindParametersGroup is a Group Set Size to 109 301 Set Location to 37 5 Set Label to "Parameters" Set peAnchors to anAll Object oFFText is a cTextEdit Set Size to 29 235 Set Location to 10 60 Set Label to "Search Text" Set Label_Justification_Mode to JMode_Right Set Label_Col_Offset to 2 Set peAnchors to anTopLeftRight Procedure Activating tTHWorkspace THWorkspace Forward Send Activating Get pTHWorkspace of ghoApplication To THWorkspace Set Value to THWorkspace.sFFText End_Procedure End_Object Object oFFType is a cTextEdit Set Size to 29 235 Set Location to 42 60 Set Label to "File Types" Set Label_Justification_Mode to JMode_Right Set Label_Col_Offset to 2 Set peAnchors to anTopLeftRight Procedure Activating tTHWorkspace THWorkspace Forward Send Activating Get pTHWorkspace of ghoApplication To THWorkspace Set Value to THWorkspace.sFFTypes End_Procedure End_Object Object oFFFolders is a cTextEdit Set Size to 29 235 Set Location to 74 60 Set Label to "Folders" Set Label_Justification_Mode to JMode_Right Set Label_Col_Offset to 2 Set peAnchors to anTopLeftRight Procedure Activating tTHWorkspace THWorkspace Forward Send Activating Get pTHWorkspace of ghoApplication To THWorkspace Set Value to THWorkspace.sFFPath End_Procedure End_Object End_Object // oFindParametersGroup Procedure mApply tTHWorkspace ByRef THWorkspace Get Checked_State of oMatchWord to THWorkspace.iFFMatchWord Get Checked_State of oMatchCase to THWorkspace.iFFMatchCase Get Checked_State of oRegExp to THWorkspace.iFFRegExp Get Checked_State of oSearchSub to THWorkspace.iFFSubFolders Get Checked_State Of oShowAll To THWorkspace.iFFShowAll Get Checked_State Of oExcludeComments To THWorkspace.iFFExcludeComments Get Value of oFFText to THWorkspace.sFFText Get Value of oFFType to THWorkspace.sFFTypes Get Value Of oFFFolders To THWorkspace.sFFPath End_Procedure #IFDEF TH_TRANSLATION Procedure Translate Set Label to gILanguage[835] Set Label of oFindOptionsGroup to gILanguage[836] Set Label of (oMatchWord(oFindOptionsGroup(Self))) to gILanguage[837] Set Label of (oMatchCase(oFindOptionsGroup(Self))) to gILanguage[838] Set Label of (oRegExp(oFindOptionsGroup(Self))) to gILanguage[839] Set Label of (oSearchSub(oFindOptionsGroup(Self))) to gILanguage[840] Set Label of (oShowAll(oFindOptionsGroup(Self))) to gILanguage[841] Set Label of oFindParametersGroup to gILanguage[842] Set Label of (oFFText(oFindParametersGroup(Self))) to gILanguage[843] Set Label of (oFFType(oFindParametersGroup(Self))) to gILanguage[844] Set Label of (oFFFolders(oFindParametersGroup(Self))) to gILanguage[845] End_Procedure #ENDIF End_Object // oFindPage End_Object On_Key Key_Alt+Key_A Send KeyAction of oApplyBtn On_Key Key_Alt+Key_C Send KeyAction of oCancelBtn Procedure mApplyChanges tTHWorkspace THWorkspace EmptyTHWorkspace tTHSource[] lTHSources String[] lsaOpened String sFullName Integer iOK Get YesNo_Box (_T("Confirm You wish apply changes made?", 846)) (_T("Confirmation", 847)) MBR_No to iOK If (iOK=MBR_Yes) Begin Get pTHWorkspace of ghoApplication To THWorkspace Move THWorkspace.sFullName to sFullName Move THWorkspace.taSources to lTHSources Move THWorkspace.saOpened to lsaOpened Move EmptyTHWorkspace To THWorkspace Move sFullName to THWorkspace.sFullName Send mApply to oFoldersPage (&THWorkspace) Send mApply to oFilesPage (&THWorkspace) Send mApply to oGeneralPage (&THWorkspace) Send mApply to oExcludePage (&THWorkspace) Send mApply to oFindPage (&THWorkspace) Move lTHSources to THWorkspace.taSources Move lsaOpened to THWorkspace.saOpened Send mApply To oSourcePage (&THWorkspace) Set pTHWorkspace of ghoApplication To THWorkspace Send THDoWriteWorkspace Send Close_Panel End End_Procedure #IFDEF TH_TRANSLATION Procedure Translate Set Label to gILanguage[772] Set Label of oApplyBtn to gILanguage[773] Set Label of oCancelBtn to gILanguage[774] Send Translate to oGeneralPage Send Translate to oFoldersPage Send Translate to oFilesPage Send Translate to oExcludePage Send Translate to oSourcePage Send Translate to oFindPage End_Procedure #ENDIF Procedure Activating Integer iRetVal String sTitle tTHWorkspace THWorkspace Forward Send Activating Send THDoReadWorkspace Get pTHWorkspace of ghoApplication To THWorkspace // Send DoFillGrid to oFiles Send DoFillGrid to oFolders Send DoFillGrid to oExcludes Send DoFillGrid to oSources #IFDEF TH_TRANSLATION Send Translate Move (Replace("%1", gILanguage[775], THWorkspace.sFullName)) to sTitle #ELSE Move ("Configure Project Workspace ["+THWorkspace.sFullName+"]") to sTitle #ENDIF If (THWorkspace.sFullName<>"") Set Label to sTitle // Procedure_Return iRetVal End_Procedure End_Object