├── .gitignore ├── DML ├── CtMetaTable.pas ├── Ctobj │ ├── CTMetaData.pas │ ├── CtObjDbSerial.pas │ ├── CtObjJsonSerial.pas │ ├── CtObjSerialer.pas │ └── CtObjXmlSerial.pas ├── DbConn │ ├── CtMetaCustomDb.pas │ ├── CtMetaEzdmlFakeDb.pas │ ├── CtMetaFCLSqlDb.pas │ ├── CtMetaHttpDb.pas │ ├── CtMetaMysqlDb.pas │ ├── CtMetaOdbcDb.pas │ ├── CtMetaOracleDb.pas │ ├── CtMetaPostgreSqlDb.pas │ ├── CtMetaSqliteDb.pas │ ├── CtMetaSqlsvrDb.pas │ ├── EzJdbcConn.pas │ ├── uFormCtDbLogon.lfm │ ├── uFormCtDbLogon.lrj │ ├── uFormCtDbLogon.pas │ ├── uFormWindowsOdbcCfg.lfm │ ├── uFormWindowsOdbcCfg.lrj │ ├── uFormWindowsOdbcCfg.pas │ ├── wCommonDBConfig.lfm │ ├── wCommonDBConfig.lrj │ ├── wCommonDBConfig.pas │ ├── wHttpJdbcConfig.lfm │ ├── wHttpJdbcConfig.lrj │ ├── wHttpJdbcConfig.pas │ ├── wOracleDBConfig.lfm │ ├── wOracleDBConfig.lrj │ ├── wOracleDBConfig.pas │ ├── wSqlServerDBConfig.lfm │ ├── wSqlServerDBConfig.lrj │ └── wSqlServerDBConfig.pas ├── Graph │ ├── DMLGraph.pas │ ├── DMLObjs.pas │ ├── DMLObjs_old.inc │ ├── ImgView.pas │ ├── uColorStyles.lfm │ ├── uColorStyles.lrj │ ├── uColorStyles.pas │ ├── uFormAddTbLink.lfm │ ├── uFormAddTbLink.lrj │ ├── uFormAddTbLink.pas │ ├── uFormCtDML.lfm │ ├── uFormCtDML.lrj │ ├── uFormCtDML.pas │ ├── uFrameDML.lfm │ ├── uFrameDML.lrj │ └── uFrameDML.pas ├── ImpExp │ ├── uFormGenSql.lfm │ ├── uFormGenSql.lrj │ ├── uFormGenSql.pas │ ├── uFormImpTable.lfm │ ├── uFormImpTable.lrj │ └── uFormImpTable.pas ├── Props │ ├── uFormAddCtFields.lfm │ ├── uFormAddCtFields.lrj │ ├── uFormAddCtFields.pas │ ├── uFormCtFieldProp.lfm │ ├── uFormCtFieldProp.lrj │ ├── uFormCtFieldProp.pas │ ├── uFormCtTableProp.lfm │ ├── uFormCtTableProp.lrj │ ├── uFormCtTableProp.pas │ ├── uFormGenTabCust.lfm │ ├── uFormGenTabCust.lrj │ ├── uFormGenTabCust.pas │ ├── uFormSelectFields.lfm │ ├── uFormSelectFields.lrj │ ├── uFormSelectFields.pas │ ├── uFrameCtFieldDef.lfm │ ├── uFrameCtFieldDef.lrj │ ├── uFrameCtFieldDef.pas │ ├── uFrameCtTableDef.lfm │ ├── uFrameCtTableDef.lrj │ ├── uFrameCtTableDef.pas │ ├── uFrameCtTableList.lfm │ ├── uFrameCtTableList.lrj │ ├── uFrameCtTableList.pas │ ├── uFrameCtTableProp.lfm │ ├── uFrameCtTableProp.lrj │ └── uFrameCtTableProp.pas ├── Scripts │ ├── DmlGlobalPasScriptLite.pas │ ├── DmlPasScriptLite.pas │ ├── DmlScriptPublic.pas │ ├── PasGen_AddAllTables.pas │ ├── PasGen_Cpp.pas │ ├── PasGen_Excel.pas │ ├── PasGen_JDBCServer.pas │ ├── PasGen_RandColor.pas │ ├── PasGen_Test.pas │ └── PasGen_Word.pas ├── SqlEditor │ ├── uDMLSqlEditor.lrj │ ├── uDMLSqlEditor.pas │ ├── udmlsqleditoro.lfm │ ├── udmlsqleditoro.lrj │ └── udmlsqleditoro.pas ├── Utils │ ├── AutoNameCapitalize.pas │ ├── CtMetaTbUtil.pas │ ├── PvtInput.pas │ └── UCNSpell.pas └── dmlstrs.pas ├── LICENSE ├── README.cn.md ├── README.md ├── Settings ├── uFrameCustPhyFieldTypes.lfm ├── uFrameCustPhyFieldTypes.pas ├── wSettings.lfm ├── wSettings.lrj └── wSettings.pas ├── SubForms ├── uFormDmlSearch.lfm ├── uFormDmlSearch.lrj ├── uFormDmlSearch.pas ├── uFormEzdmlDbFile.lfm ├── uFormEzdmlDbFile.lrj ├── uFormEzdmlDbFile.pas ├── uFormOnlineFile.lfm ├── uFormOnlineFile.lrj ├── uFormOnlineFile.pas ├── wDmlHelp.lfm ├── wDmlHelp.lrj ├── wDmlHelp.pas ├── wShareFile.lfm ├── wShareFile.lrj ├── wShareFile.pas ├── wabout.lfm ├── wabout.lrj └── wabout.pas ├── demo.dmj ├── demo_ch.dmj ├── doc └── images │ ├── ezdml_lite_cn.png │ └── ezdml_lite_en.png ├── ezdml_lite.ico ├── ezdml_lite.lpi ├── ezdml_lite.lpr ├── ezdmlstrs.pas ├── languages ├── ezdml_lite.ch.po ├── ezdml_lite.po └── ezdml_x.po ├── mainicon.ico ├── pkg ├── AESCrypt.pas ├── CtSysInfo.pas ├── MessageBoxOnTop.lfm ├── MessageBoxOnTop.lrj ├── MessageBoxOnTop.pas ├── NetUtil.pas ├── ThreadWait.dfm ├── ThreadWait.lrj ├── ThreadWait.lrs ├── ThreadWait.pas ├── WindowFuncs.pas ├── XLSfile.pas ├── uJSON.pas ├── uWaitWnd.lfm ├── uWaitWnd.lrj ├── uWaitWnd.pas ├── wToast.lfm ├── wToast.lrj └── wToast.pas ├── wMainDml.lfm ├── wMainDml.lrj └── wMainDml.pas /.gitignore: -------------------------------------------------------------------------------- 1 | # Lazarus compiler-generated binaries (safe to delete) 2 | *.exe 3 | *.dll 4 | *.so 5 | *.dylib 6 | *.lrs 7 | *.res 8 | *.compiled 9 | *.dbg 10 | *.or 11 | *.a 12 | 13 | # Lazarus autogenerated files (duplicated info) 14 | *.rst 15 | *.rsj 16 | *.lrt 17 | 18 | # Lazarus local files (user-specific info) 19 | *.lps 20 | 21 | # Lazarus backups and unit output folders. 22 | # These can be changed by user in Lazarus/project options. 23 | backup/ 24 | *.bak 25 | lib/ 26 | 27 | # Application bundle for Mac OS 28 | *.app/ 29 | /jdbc/EzdmlJdbcServer/bin 30 | target 31 | -------------------------------------------------------------------------------- /DML/Ctobj/CTMetaData.pas: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/huzgd/ezdml/5fbf534685b0e38f3d634eaba6f6ffe96999f3b8/DML/Ctobj/CTMetaData.pas -------------------------------------------------------------------------------- /DML/Ctobj/CtObjDbSerial.pas: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/huzgd/ezdml/5fbf534685b0e38f3d634eaba6f6ffe96999f3b8/DML/Ctobj/CtObjDbSerial.pas -------------------------------------------------------------------------------- /DML/DbConn/CtMetaEzdmlFakeDb.pas: -------------------------------------------------------------------------------- 1 | unit CtMetaEzdmlFakeDb; 2 | 3 | {$MODE Delphi} 4 | 5 | interface 6 | 7 | uses 8 | LCLIntf, LCLType, LMessages, Messages, SysUtils, Variants, Classes, Graphics, Controls, ImgList, 9 | IniFiles, CTMetaData, CtMetaTable, DB, Forms, Dialogs; 10 | 11 | type 12 | TCtMetaEzdmlFakeDb = class(TCtMetaDatabase) 13 | private 14 | FDataModelList: TCtDataModelGraphList; 15 | protected 16 | public 17 | constructor Create; override; 18 | destructor Destroy; override; 19 | 20 | procedure SetFakeEngineType(AEngType: String); 21 | 22 | property DataModelList: TCtDataModelGraphList read FDataModelList; 23 | 24 | function GetObjInfos(ADbUser, AObjName, AOpt: string): TCtMetaObject; override; 25 | function ObjectExists(ADbUser, AObjName: string): Boolean; override; 26 | end; 27 | 28 | 29 | implementation 30 | 31 | { TCtMetaEzdmlFakeDb } 32 | 33 | constructor TCtMetaEzdmlFakeDb.Create; 34 | begin 35 | inherited; 36 | FEngineType := 'STANDARD'; 37 | FDataModelList := TCtDataModelGraphList.Create; 38 | end; 39 | 40 | destructor TCtMetaEzdmlFakeDb.Destroy; 41 | begin 42 | FDataModelList.Free; 43 | inherited; 44 | end; 45 | 46 | function TCtMetaEzdmlFakeDb.GetObjInfos(ADbUser, AObjName, 47 | AOpt: string): TCtMetaObject; 48 | var 49 | J, K: integer; 50 | MetaObjListDB: TCtMetaObjectList; 51 | dmlDBTbObj: TCtMetaObject; 52 | begin 53 | Result := nil; 54 | for K := 0 to FDataModelList.Count - 1 do 55 | begin 56 | if ADbUser <> '' then 57 | if not AnsiSameText(ADbUser, FDataModelList.Items[K].Name) then 58 | Continue; 59 | MetaObjListDB:=FDataModelList.Items[K].Tables; 60 | 61 | for J := 0 to MetaObjListDB.Count - 1 do 62 | begin 63 | dmlDBTbObj := TCtMetaTable(MetaObjListDB[J]); 64 | if AnsiSameText(dmlDBTbObj.Name, AObjName) then 65 | begin 66 | Result := dmlDBTbObj; 67 | Exit; 68 | end; 69 | end; 70 | end; 71 | end; 72 | 73 | function TCtMetaEzdmlFakeDb.ObjectExists(ADbUser, AObjName: string): Boolean; 74 | var 75 | res: TCtMetaObject; 76 | begin 77 | Result := False; 78 | res := GetObjInfos(ADbUser, AObjName, ''); 79 | if res <> nil then 80 | Result := True; 81 | end; 82 | 83 | procedure TCtMetaEzdmlFakeDb.SetFakeEngineType(AEngType: String); 84 | begin 85 | Self.FEngineType := AEngType; 86 | end; 87 | 88 | end. 89 | 90 | -------------------------------------------------------------------------------- /DML/DbConn/EzJdbcConn.pas: -------------------------------------------------------------------------------- 1 | unit EzJdbcConn; 2 | 3 | {$ifdef EZDML_LITE} 4 | 5 | {$mode delphi} 6 | 7 | interface 8 | 9 | uses 10 | Classes, SysUtils, sqldb; 11 | 12 | type 13 | 14 | { TEzJdbcSqlConnection } 15 | 16 | TEzJdbcSqlConnection=class(TSQLConnection) 17 | private 18 | protected 19 | FJdbcProcActive: Boolean; 20 | FEzDbDriverClass: string; 21 | FEzDbType: string; 22 | FAccessToken: string; 23 | FConnectResponse: string; 24 | FJdbcSvAddr: string; 25 | procedure DoInternalConnect; override; 26 | procedure DoInternalDisconnect; override; 27 | public 28 | property JdbcProcActive: Boolean read FJdbcProcActive; 29 | property EzDbType: string read FEzDbType write FEzDbType; 30 | property EzDbDriverClass: string read FEzDbDriverClass write FEzDbDriverClass; 31 | end; 32 | 33 | TCtCustDbCursor=class(TSQLCursor) 34 | public 35 | FSelectCursorType: Boolean; 36 | end; 37 | 38 | 39 | function ExtractJdbcProp(connstr, prop: string): string; 40 | function GetDefaultDbTypeOfUrl(url: string): string; 41 | function GetDefaultDbDriverOfUrl(url: string): string; 42 | 43 | implementation 44 | 45 | uses 46 | WindowFuncs, ezdmlstrs, dmlstrs; 47 | 48 | function ExtractJdbcProp(connstr, prop: string): string; 49 | begin 50 | if Copy(connstr,1,5)='JDBC:' then 51 | connstr := Trim(copy(connstr,6,Length(connstr))); 52 | Result := ExtractCompStr(';'+connstr+';', ';'+prop+'=',';'); 53 | end; 54 | 55 | function GetDefaultDbTypeOfUrl(url: string): string; 56 | begin 57 | Result := ''; 58 | if Pos('jdbc:oracle:', url)=1 then 59 | Result := 'ORACLE' 60 | else if Pos('jdbc:mysql:', url)=1 then 61 | Result := 'MYSQL' 62 | else if Pos('jdbc:postgresql:', url)=1 then 63 | Result := 'POSTGRESQL' 64 | else if Pos('jdbc:sqlserver:', url)=1 then 65 | Result := 'SQLSERVER' 66 | else if Pos('jdbc:h2:', url)=1 then 67 | Result := 'H2' 68 | else if Pos('jdbc:hive2:', url)=1 then 69 | Result := 'HIVE'; 70 | end; 71 | 72 | function GetDefaultDbDriverOfUrl(url: string): string; 73 | var 74 | dbTp, cfg: string; 75 | begin 76 | Result := ''; 77 | dbTp := GetDefaultDbTypeOfUrl(url); 78 | if dbTp='' then 79 | Exit; 80 | cfg := GetCtDropDownTextOfValue(dbTp, srEzJdbcDriverList); 81 | Result := ExtractJdbcProp(cfg, 'driver'); 82 | end; 83 | 84 | { TEzJdbcSqlConnection } 85 | 86 | procedure TEzJdbcSqlConnection.DoInternalConnect; 87 | begin 88 | raise Exception.Create(srEzdmlLiteNotSupportFun); 89 | end; 90 | 91 | procedure TEzJdbcSqlConnection.DoInternalDisconnect; 92 | begin 93 | raise Exception.Create(srEzdmlLiteNotSupportFun); 94 | end; 95 | 96 | {$else} 97 | 98 | {$i EzJdbcConnPr.inc} 99 | 100 | {$endif} 101 | 102 | end. 103 | 104 | -------------------------------------------------------------------------------- /DML/DbConn/uFormCtDbLogon.lfm: -------------------------------------------------------------------------------- 1 | object frmLogonCtDB: TfrmLogonCtDB 2 | Left = 455 3 | Height = 287 4 | Top = 295 5 | Width = 515 6 | BorderStyle = bsDialog 7 | Caption = 'Database connection' 8 | ClientHeight = 287 9 | ClientWidth = 515 10 | Color = clBtnFace 11 | OnClick = FormClick 12 | OnCreate = FormCreate 13 | OnDestroy = FormDestroy 14 | OnShow = FormShow 15 | ParentFont = True 16 | Position = poMainFormCenter 17 | LCLVersion = '2.0.12.0' 18 | object Label1: TLabel 19 | Left = 15 20 | Height = 17 21 | Top = 22 22 | Width = 71 23 | Caption = 'Engine Type' 24 | ParentColor = False 25 | end 26 | object Label2: TLabel 27 | Left = 16 28 | Height = 17 29 | Top = 98 30 | Width = 27 31 | Caption = 'User' 32 | ParentColor = False 33 | end 34 | object Label_Pwd: TLabel 35 | Left = 15 36 | Height = 17 37 | Top = 137 38 | Width = 56 39 | Caption = 'Password' 40 | ParentColor = False 41 | OnDblClick = Label_PwdDblClick 42 | end 43 | object Label4: TLabel 44 | Left = 16 45 | Height = 17 46 | Top = 60 47 | Width = 70 48 | Caption = 'Data source' 49 | ParentColor = False 50 | end 51 | object combDbType: TComboBox 52 | Left = 112 53 | Height = 25 54 | Top = 20 55 | Width = 302 56 | ItemHeight = 17 57 | ItemIndex = 0 58 | Items.Strings = ( 59 | 'ORACLE' 60 | ) 61 | OnChange = combDbTypeChange 62 | OnClick = FormClick 63 | OnDropDown = FormClick 64 | Style = csDropDownList 65 | TabOrder = 0 66 | Text = 'ORACLE' 67 | end 68 | object edtUserName: TEdit 69 | Left = 112 70 | Height = 25 71 | Top = 97 72 | Width = 302 73 | OnClick = FormClick 74 | TabOrder = 3 75 | end 76 | object edtPassword: TEdit 77 | Left = 112 78 | Height = 25 79 | Top = 135 80 | Width = 302 81 | EchoMode = emPassword 82 | OnClick = FormClick 83 | PasswordChar = '*' 84 | TabOrder = 4 85 | end 86 | object combDBName: TComboBox 87 | Left = 112 88 | Height = 25 89 | Top = 59 90 | Width = 288 91 | DropDownCount = 32 92 | ItemHeight = 17 93 | OnClick = FormClick 94 | OnCloseUp = combDBNameCloseUp 95 | OnDropDown = FormClick 96 | TabOrder = 1 97 | end 98 | object btnOK: TButton 99 | Left = 112 100 | Height = 27 101 | Top = 235 102 | Width = 130 103 | Caption = 'OK' 104 | Default = True 105 | OnClick = btnOKClick 106 | TabOrder = 5 107 | end 108 | object btnCancel: TButton 109 | Left = 246 110 | Height = 27 111 | Top = 235 112 | Width = 64 113 | Cancel = True 114 | Caption = 'Cancel' 115 | OnClick = btnCancelClick 116 | TabOrder = 6 117 | end 118 | object btnDBCfg: TButton 119 | Left = 400 120 | Height = 27 121 | Hint = 'Config...' 122 | Top = 58 123 | Width = 14 124 | Caption = '..' 125 | OnClick = btnDBCfgClick 126 | ParentShowHint = False 127 | ShowHint = True 128 | TabOrder = 2 129 | end 130 | object ckbSavePwd: TCheckBox 131 | Left = 112 132 | Height = 21 133 | Top = 168 134 | Width = 110 135 | Caption = 'Save password' 136 | OnClick = ckbSavePwdClick 137 | TabOrder = 7 138 | end 139 | object ckbAutoLogin: TCheckBox 140 | Left = 112 141 | Height = 21 142 | Top = 193 143 | Width = 207 144 | Caption = 'Auto login (press SHIFT to skip)' 145 | TabOrder = 8 146 | end 147 | object btnLogonHist: TButton 148 | Left = 422 149 | Height = 27 150 | Hint = 'Logon history' 151 | Top = 19 152 | Width = 34 153 | Caption = '...' 154 | OnClick = btnLogonHistClick 155 | ParentShowHint = False 156 | ShowHint = True 157 | TabOrder = 9 158 | end 159 | object PanelAutoLoginTip: TPanel 160 | Left = 15 161 | Height = 30 162 | Top = 160 163 | Width = 399 164 | BevelOuter = bvNone 165 | ClientHeight = 30 166 | ClientWidth = 399 167 | TabOrder = 10 168 | Visible = False 169 | object lbConnectingTip: TLabel 170 | Cursor = crHandPoint 171 | Left = 96 172 | Height = 17 173 | Top = 7 174 | Width = 74 175 | Caption = 'Connecting...' 176 | ParentColor = False 177 | OnClick = lbConnectingTipClick 178 | end 179 | end 180 | object btnHelp: TButton 181 | Left = 422 182 | Height = 25 183 | Hint = 'Help' 184 | Top = 235 185 | Width = 34 186 | Caption = '?' 187 | OnClick = btnHelpClick 188 | ParentShowHint = False 189 | ShowHint = True 190 | TabOrder = 11 191 | end 192 | object btnSettings: TButton 193 | Left = 388 194 | Height = 25 195 | Hint = 'Settings' 196 | Top = 235 197 | Width = 34 198 | Caption = '*' 199 | OnClick = btnSettingsClick 200 | ParentShowHint = False 201 | ShowHint = True 202 | TabOrder = 12 203 | end 204 | object TimerAutoLogin: TTimer 205 | Enabled = False 206 | Interval = 1200 207 | OnTimer = TimerAutoLoginTimer 208 | left = 344 209 | top = 240 210 | end 211 | object PopupMenuLogonHist: TPopupMenu 212 | left = 464 213 | top = 24 214 | end 215 | end 216 | -------------------------------------------------------------------------------- /DML/DbConn/uFormCtDbLogon.lrj: -------------------------------------------------------------------------------- 1 | {"version":1,"strings":[ 2 | {"hash":122049230,"name":"tfrmlogonctdb.caption","sourcebytes":[68,97,116,97,98,97,115,101,32,99,111,110,110,101,99,116,105,111,110],"value":"Database connection"}, 3 | {"hash":70913637,"name":"tfrmlogonctdb.label1.caption","sourcebytes":[69,110,103,105,110,101,32,84,121,112,101],"value":"Engine Type"}, 4 | {"hash":379330,"name":"tfrmlogonctdb.label2.caption","sourcebytes":[85,115,101,114],"value":"User"}, 5 | {"hash":145417188,"name":"tfrmlogonctdb.label_pwd.caption","sourcebytes":[80,97,115,115,119,111,114,100],"value":"Password"}, 6 | {"hash":132924069,"name":"tfrmlogonctdb.label4.caption","sourcebytes":[68,97,116,97,32,115,111,117,114,99,101],"value":"Data source"}, 7 | {"hash":88496133,"name":"tfrmlogonctdb.combdbtype.text","sourcebytes":[79,82,65,67,76,69],"value":"ORACLE"}, 8 | {"hash":1339,"name":"tfrmlogonctdb.btnok.caption","sourcebytes":[79,75],"value":"OK"}, 9 | {"hash":77089212,"name":"tfrmlogonctdb.btncancel.caption","sourcebytes":[67,97,110,99,101,108],"value":"Cancel"}, 10 | {"hash":80735086,"name":"tfrmlogonctdb.btndbcfg.hint","sourcebytes":[67,111,110,102,105,103,46,46,46],"value":"Config..."}, 11 | {"hash":782,"name":"tfrmlogonctdb.btndbcfg.caption","sourcebytes":[46,46],"value":".."}, 12 | {"hash":19313076,"name":"tfrmlogonctdb.ckbsavepwd.caption","sourcebytes":[83,97,118,101,32,112,97,115,115,119,111,114,100],"value":"Save password"}, 13 | {"hash":70945449,"name":"tfrmlogonctdb.ckbautologin.caption","sourcebytes":[65,117,116,111,32,108,111,103,105,110,32,40,112,114,101,115,115,32,83,72,73,70,84,32,116,111,32,115,107,105,112,41],"value":"Auto login (press SHIFT to skip)"}, 14 | {"hash":240441001,"name":"tfrmlogonctdb.btnlogonhist.hint","sourcebytes":[76,111,103,111,110,32,104,105,115,116,111,114,121],"value":"Logon history"}, 15 | {"hash":12558,"name":"tfrmlogonctdb.btnlogonhist.caption","sourcebytes":[46,46,46],"value":"..."}, 16 | {"hash":10611950,"name":"tfrmlogonctdb.lbconnectingtip.caption","sourcebytes":[67,111,110,110,101,99,116,105,110,103,46,46,46],"value":"Connecting..."}, 17 | {"hash":322608,"name":"tfrmlogonctdb.btnhelp.hint","sourcebytes":[72,101,108,112],"value":"Help"}, 18 | {"hash":63,"name":"tfrmlogonctdb.btnhelp.caption","sourcebytes":[63],"value":"?"}, 19 | {"hash":213582195,"name":"tfrmlogonctdb.btnsettings.hint","sourcebytes":[83,101,116,116,105,110,103,115],"value":"Settings"}, 20 | {"hash":42,"name":"tfrmlogonctdb.btnsettings.caption","sourcebytes":[42],"value":"*"} 21 | ]} 22 | -------------------------------------------------------------------------------- /DML/DbConn/uFormWindowsOdbcCfg.lfm: -------------------------------------------------------------------------------- 1 | object frmWindowsOdbcConfg: TfrmWindowsOdbcConfg 2 | Left = 398 3 | Height = 338 4 | Top = 161 5 | Width = 432 6 | BorderStyle = bsDialog 7 | Caption = 'ODBC Connect' 8 | ClientHeight = 338 9 | ClientWidth = 432 10 | OnCloseQuery = FormCloseQuery 11 | Position = poScreenCenter 12 | LCLVersion = '2.0.12.0' 13 | object Label1: TLabel 14 | Left = 16 15 | Height = 17 16 | Top = 14 17 | Width = 49 18 | Caption = 'DSN list:' 19 | ParentColor = False 20 | end 21 | object ckbUserDSN: TRadioButton 22 | Left = 24 23 | Height = 21 24 | Top = 248 25 | Width = 79 26 | Caption = 'User DSN' 27 | Checked = True 28 | OnChange = ckbUserDSNChange 29 | TabOrder = 5 30 | TabStop = True 31 | end 32 | object ckbSystemDSN: TRadioButton 33 | Left = 176 34 | Height = 21 35 | Top = 248 36 | Width = 93 37 | Caption = 'System DSN' 38 | OnChange = ckbSystemDSNChange 39 | TabOrder = 0 40 | end 41 | object ListBoxDSNs: TListBox 42 | Left = 19 43 | Height = 201 44 | Top = 39 45 | Width = 397 46 | ItemHeight = 0 47 | TabOrder = 1 48 | end 49 | object btnConfigDSN: TButton 50 | Left = 20 51 | Height = 25 52 | Top = 291 53 | Width = 75 54 | Caption = 'Config' 55 | OnClick = btnConfigDSNClick 56 | TabOrder = 2 57 | end 58 | object btnOk: TButton 59 | Left = 240 60 | Height = 25 61 | Top = 291 62 | Width = 75 63 | Caption = 'OK' 64 | Default = True 65 | ModalResult = 1 66 | TabOrder = 3 67 | end 68 | object btnCancel: TButton 69 | Left = 333 70 | Height = 25 71 | Top = 291 72 | Width = 75 73 | Cancel = True 74 | Caption = 'Cancel' 75 | ModalResult = 2 76 | TabOrder = 4 77 | end 78 | object lbErrorMsg: TStaticText 79 | Left = 36 80 | Height = 18 81 | Top = 50 82 | Width = 136 83 | AutoSize = True 84 | Caption = 'Insufficient permissions' 85 | Font.Color = clRed 86 | ParentFont = False 87 | TabOrder = 6 88 | end 89 | end 90 | -------------------------------------------------------------------------------- /DML/DbConn/uFormWindowsOdbcCfg.lrj: -------------------------------------------------------------------------------- 1 | {"version":1,"strings":[ 2 | {"hash":226307812,"name":"tfrmwindowsodbcconfg.caption","sourcebytes":[79,68,66,67,32,67,111,110,110,101,99,116],"value":"ODBC Connect"}, 3 | {"hash":7554042,"name":"tfrmwindowsodbcconfg.label1.caption","sourcebytes":[68,83,78,32,108,105,115,116,58],"value":"DSN list:"}, 4 | {"hash":163859646,"name":"tfrmwindowsodbcconfg.ckbuserdsn.caption","sourcebytes":[85,115,101,114,32,68,83,78],"value":"User DSN"}, 5 | {"hash":180025822,"name":"tfrmwindowsodbcconfg.ckbsystemdsn.caption","sourcebytes":[83,121,115,116,101,109,32,68,83,78],"value":"System DSN"}, 6 | {"hash":78007543,"name":"tfrmwindowsodbcconfg.btnconfigdsn.caption","sourcebytes":[67,111,110,102,105,103],"value":"Config"}, 7 | {"hash":1339,"name":"tfrmwindowsodbcconfg.btnok.caption","sourcebytes":[79,75],"value":"OK"}, 8 | {"hash":77089212,"name":"tfrmwindowsodbcconfg.btncancel.caption","sourcebytes":[67,97,110,99,101,108],"value":"Cancel"}, 9 | {"hash":253984995,"name":"tfrmwindowsodbcconfg.lberrormsg.caption","sourcebytes":[73,110,115,117,102,102,105,99,105,101,110,116,32,112,101,114,109,105,115,115,105,111,110,115],"value":"Insufficient permissions"} 10 | ]} 11 | -------------------------------------------------------------------------------- /DML/DbConn/uFormWindowsOdbcCfg.pas: -------------------------------------------------------------------------------- 1 | unit uFormWindowsOdbcCfg; 2 | 3 | {$mode delphi} 4 | 5 | interface 6 | 7 | uses 8 | Classes, SysUtils, Forms, Controls, Graphics, Dialogs, StdCtrls; 9 | 10 | type 11 | 12 | { TfrmWindowsOdbcConfg } 13 | 14 | TfrmWindowsOdbcConfg = class(TForm) 15 | btnConfigDSN: TButton; 16 | btnOk: TButton; 17 | btnCancel: TButton; 18 | ckbSystemDSN: TRadioButton; 19 | Label1: TLabel; 20 | ckbUserDSN: TRadioButton; 21 | ListBoxDSNs: TListBox; 22 | lbErrorMsg: TStaticText; 23 | procedure btnConfigDSNClick(Sender: TObject); 24 | procedure ckbSystemDSNChange(Sender: TObject); 25 | procedure ckbUserDSNChange(Sender: TObject); 26 | procedure FormCloseQuery(Sender: TObject; var CanClose: boolean); 27 | private 28 | 29 | public 30 | procedure RefreshDSNs; 31 | function GetSelectedDSN: string; 32 | end; 33 | 34 | implementation 35 | 36 | {$R *.lfm} 37 | 38 | uses 39 | DmlScriptPublic, Registry; 40 | 41 | { TfrmWindowsOdbcConfg } 42 | 43 | procedure TfrmWindowsOdbcConfg.btnConfigDSNClick(Sender: TObject); 44 | const 45 | DEF_ODBC_CONF_PS = 46 | 'function DLLSQLManageDataSources(IntPtr: hwnd): Boolean; external ''SQLManageDataSources@odbccp32.dll stdcall'';' + #13#10 + 47 | 'begin' + #13#10 + 48 | ' DLLSQLManageDataSources(Screen.ActiveForm.Handle);' + #13#10 + 49 | 'end.'; 50 | begin 51 | with CreateScriptForFile('odbc_dlg.pas') do 52 | try 53 | try 54 | Init('DML_SCRIPT', nil, nil, nil); 55 | Exec('DML_SCRIPT', DEF_ODBC_CONF_PS); 56 | except 57 | on E: Exception do 58 | raise Exception.Create('ODBC config Script Error: ' + 59 | E.Message); 60 | end; 61 | finally 62 | Free; 63 | end; 64 | RefreshDSNs; 65 | end; 66 | 67 | procedure TfrmWindowsOdbcConfg.ckbSystemDSNChange(Sender: TObject); 68 | begin 69 | RefreshDSNs; 70 | end; 71 | 72 | procedure TfrmWindowsOdbcConfg.ckbUserDSNChange(Sender: TObject); 73 | begin 74 | RefreshDSNs; 75 | end; 76 | 77 | procedure TfrmWindowsOdbcConfg.FormCloseQuery(Sender: TObject; 78 | var CanClose: boolean); 79 | begin 80 | if ModalResult = mrOk then 81 | if GetSelectedDSN = '' then 82 | CanClose := False; 83 | end; 84 | 85 | procedure TfrmWindowsOdbcConfg.RefreshDSNs; 86 | var 87 | Reg: TRegIniFile; 88 | const 89 | REG_ODBC_KEY = '\Software\ODBC\ODBC.INI\ODBC Data Sources'; 90 | begin 91 | ListBoxDSNs.Items.Clear; 92 | lbErrorMsg.Visible := False; 93 | 94 | Reg := TRegIniFile.Create; 95 | try 96 | Reg.Access := KEY_READ; 97 | if ckbSystemDSN.Checked then 98 | Reg.RootKey := HKEY_LOCAL_MACHINE 99 | else 100 | Reg.RootKey := HKEY_CURRENT_USER; 101 | 102 | if not Reg.OpenKey(REG_ODBC_KEY, False) then 103 | begin 104 | //lbErrorMsg.Text := ''; 105 | lbErrorMsg.Visible := True; 106 | lbErrorMsg.BringToFront; 107 | Exit; 108 | end; 109 | Reg.GetValueNames(ListBoxDSNs.Items); 110 | finally 111 | Reg.Free; 112 | end; 113 | end; 114 | 115 | function TfrmWindowsOdbcConfg.GetSelectedDSN: string; 116 | var 117 | I: Integer; 118 | begin 119 | Result:=''; 120 | I:=ListBoxDSNs.ItemIndex; 121 | if I<0 then 122 | Exit; 123 | Result := ListBoxDSNs.Items[I]; 124 | end; 125 | 126 | end. 127 | 128 | -------------------------------------------------------------------------------- /DML/DbConn/wCommonDBConfig.lfm: -------------------------------------------------------------------------------- 1 | object frmCommDBConfig: TfrmCommDBConfig 2 | Left = 408 3 | Height = 498 4 | Top = 310 5 | Width = 473 6 | BorderStyle = bsDialog 7 | Caption = 'Database Connection' 8 | ClientHeight = 498 9 | ClientWidth = 473 10 | Color = clBtnFace 11 | OnCloseQuery = FormCloseQuery 12 | ParentFont = True 13 | Position = poMainFormCenter 14 | LCLVersion = '2.0.12.0' 15 | object Label1: TLabel 16 | Left = 48 17 | Height = 12 18 | Top = 56 19 | Width = 42 20 | Caption = 'Server:' 21 | ParentColor = False 22 | end 23 | object Label2: TLabel 24 | Left = 320 25 | Height = 12 26 | Top = 56 27 | Width = 30 28 | Caption = 'Port:' 29 | ParentColor = False 30 | end 31 | object Label3: TLabel 32 | Left = 48 33 | Height = 12 34 | Top = 96 35 | Width = 54 36 | Caption = 'Database:' 37 | ParentColor = False 38 | end 39 | object edtPort: TEdit 40 | Left = 368 41 | Height = 25 42 | Top = 52 43 | Width = 72 44 | TabOrder = 2 45 | end 46 | object edtDbName: TEdit 47 | Left = 116 48 | Height = 25 49 | Top = 92 50 | Width = 324 51 | TabOrder = 3 52 | end 53 | object btnOK: TButton 54 | Left = 272 55 | Height = 27 56 | Top = 452 57 | Width = 96 58 | Caption = 'OK' 59 | Default = True 60 | ModalResult = 1 61 | TabOrder = 12 62 | end 63 | object btnCancel: TButton 64 | Left = 376 65 | Height = 27 66 | Top = 452 67 | Width = 64 68 | Cancel = True 69 | Caption = 'Cancel' 70 | ModalResult = 2 71 | TabOrder = 13 72 | end 73 | object btnHelp: TButton 74 | Left = 28 75 | Height = 27 76 | Top = 452 77 | Width = 71 78 | Caption = 'Help' 79 | OnClick = btnHelpClick 80 | TabOrder = 14 81 | end 82 | object combSveIp: TComboBox 83 | Left = 116 84 | Height = 25 85 | Top = 52 86 | Width = 188 87 | ItemHeight = 17 88 | Items.Strings = ( 89 | 'localhost' 90 | '127.0.0.1' 91 | '192.168.1.123' 92 | ) 93 | TabOrder = 1 94 | end 95 | object btnSettings: TButton 96 | Left = 108 97 | Height = 27 98 | Top = 452 99 | Width = 71 100 | Caption = 'Settings' 101 | OnClick = btnSettingsClick 102 | TabOrder = 15 103 | end 104 | object rdbIPAddr: TRadioButton 105 | Left = 22 106 | Height = 21 107 | Top = 15 108 | Width = 117 109 | Caption = 'Specify address:' 110 | Checked = True 111 | OnChange = rdbIPAddrChange 112 | TabOrder = 0 113 | TabStop = True 114 | end 115 | object rbdOdbcDsn: TRadioButton 116 | Left = 22 117 | Height = 21 118 | Top = 248 119 | Width = 90 120 | Caption = 'ODBC DSN:' 121 | OnChange = rdbIPAddrChange 122 | TabOrder = 7 123 | end 124 | object Label6: TLabel 125 | Left = 48 126 | Height = 12 127 | Top = 284 128 | Width = 24 129 | Caption = 'DSN:' 130 | ParentColor = False 131 | end 132 | object edtDsnName: TEdit 133 | Left = 116 134 | Height = 25 135 | Top = 280 136 | Width = 256 137 | TabOrder = 8 138 | end 139 | object btnBrowseDsn: TButton 140 | Left = 376 141 | Height = 25 142 | Top = 280 143 | Width = 64 144 | Caption = 'Browse' 145 | OnClick = btnBrowseDsnClick 146 | TabOrder = 9 147 | end 148 | object rdbOdbcConnStr: TRadioButton 149 | Left = 22 150 | Height = 21 151 | Top = 324 152 | Width = 167 153 | Caption = 'ODBC Connection String:' 154 | OnChange = rdbIPAddrChange 155 | TabOrder = 10 156 | end 157 | object MemoOdbcConnStr: TMemo 158 | Left = 48 159 | Height = 66 160 | Top = 356 161 | Width = 392 162 | Lines.Strings = ( 163 | 'Driver=SQL Server;Server=MyDbServer,Port\SID;Database=pubs;Integrated Security=SSPI;' 164 | ) 165 | TabOrder = 11 166 | end 167 | object rdbJdbcConnStr: TRadioButton 168 | Left = 22 169 | Height = 21 170 | Top = 140 171 | Width = 120 172 | Caption = 'JDBC properties:' 173 | OnChange = rdbIPAddrChange 174 | TabOrder = 4 175 | end 176 | object MemoJdbcConnStr: TMemo 177 | Left = 48 178 | Height = 54 179 | Hint = 'Format: url=jdbc:xxx:@192.168.1.1:xxx/db;driver=com.xxx.Driver' 180 | Top = 172 181 | Width = 392 182 | Lines.Strings = ( 183 | 'url=jdbc:xxx:@192.168.1.1:xxx;' 184 | ) 185 | ParentShowHint = False 186 | ShowHint = True 187 | TabOrder = 6 188 | WantReturns = False 189 | end 190 | object ckbShowJdbcConsole: TCheckBox 191 | Left = 304 192 | Height = 21 193 | Top = 140 194 | Width = 136 195 | Caption = 'Show JDBC console' 196 | TabOrder = 5 197 | end 198 | end 199 | -------------------------------------------------------------------------------- /DML/DbConn/wCommonDBConfig.lrj: -------------------------------------------------------------------------------- 1 | {"version":1,"strings":[ 2 | {"hash":121918158,"name":"tfrmcommdbconfig.caption","sourcebytes":[68,97,116,97,98,97,115,101,32,67,111,110,110,101,99,116,105,111,110],"value":"Database Connection"}, 3 | {"hash":164219914,"name":"tfrmcommdbconfig.label1.caption","sourcebytes":[83,101,114,118,101,114,58],"value":"Server:"}, 4 | {"hash":5728634,"name":"tfrmcommdbconfig.label2.caption","sourcebytes":[80,111,114,116,58],"value":"Port:"}, 5 | {"hash":175686410,"name":"tfrmcommdbconfig.label3.caption","sourcebytes":[68,97,116,97,98,97,115,101,58],"value":"Database:"}, 6 | {"hash":1339,"name":"tfrmcommdbconfig.btnok.caption","sourcebytes":[79,75],"value":"OK"}, 7 | {"hash":77089212,"name":"tfrmcommdbconfig.btncancel.caption","sourcebytes":[67,97,110,99,101,108],"value":"Cancel"}, 8 | {"hash":322608,"name":"tfrmcommdbconfig.btnhelp.caption","sourcebytes":[72,101,108,112],"value":"Help"}, 9 | {"hash":213582195,"name":"tfrmcommdbconfig.btnsettings.caption","sourcebytes":[83,101,116,116,105,110,103,115],"value":"Settings"}, 10 | {"hash":54581930,"name":"tfrmcommdbconfig.rdbipaddr.caption","sourcebytes":[83,112,101,99,105,102,121,32,97,100,100,114,101,115,115,58],"value":"Specify address:"}, 11 | {"hash":106218906,"name":"tfrmcommdbconfig.rbdodbcdsn.caption","sourcebytes":[79,68,66,67,32,68,83,78,58],"value":"ODBC DSN:"}, 12 | {"hash":301082,"name":"tfrmcommdbconfig.label6.caption","sourcebytes":[68,83,78,58],"value":"DSN:"}, 13 | {"hash":77164181,"name":"tfrmcommdbconfig.btnbrowsedsn.caption","sourcebytes":[66,114,111,119,115,101],"value":"Browse"}, 14 | {"hash":79787546,"name":"tfrmcommdbconfig.rdbodbcconnstr.caption","sourcebytes":[79,68,66,67,32,67,111,110,110,101,99,116,105,111,110,32,83,116,114,105,110,103,58],"value":"ODBC Connection String:"}, 15 | {"hash":166298218,"name":"tfrmcommdbconfig.rdbjdbcconnstr.caption","sourcebytes":[74,68,66,67,32,112,114,111,112,101,114,116,105,101,115,58],"value":"JDBC properties:"}, 16 | {"hash":38908098,"name":"tfrmcommdbconfig.memojdbcconnstr.hint","sourcebytes":[70,111,114,109,97,116,58,32,117,114,108,61,106,100,98,99,58,120,120,120,58,64,49,57,50,46,49,54,56,46,49,46,49,58,120,120,120,47,100,98,59,100,114,105,118,101,114,61,99,111,109,46,120,120,120,46,68,114,105,118,101,114],"value":"Format: url=jdbc:xxx:@192.168.1.1:xxx/db;driver=com.xxx.Driver"}, 17 | {"hash":250877909,"name":"tfrmcommdbconfig.ckbshowjdbcconsole.caption","sourcebytes":[83,104,111,119,32,74,68,66,67,32,99,111,110,115,111,108,101],"value":"Show JDBC console"} 18 | ]} 19 | -------------------------------------------------------------------------------- /DML/DbConn/wHttpJdbcConfig.lfm: -------------------------------------------------------------------------------- 1 | object frmHttpJdbcConfig: TfrmHttpJdbcConfig 2 | Left = 408 3 | Height = 433 4 | Top = 310 5 | Width = 473 6 | BorderStyle = bsDialog 7 | Caption = 'HTTP_JDBC Connection' 8 | ClientHeight = 433 9 | ClientWidth = 473 10 | Color = clBtnFace 11 | OnCloseQuery = FormCloseQuery 12 | OnCreate = FormCreate 13 | ParentFont = True 14 | Position = poMainFormCenter 15 | LCLVersion = '2.0.12.0' 16 | object edtHttpUrl: TEdit 17 | Left = 48 18 | Height = 25 19 | Top = 48 20 | Width = 392 21 | TabOrder = 1 22 | end 23 | object btnOK: TButton 24 | Left = 272 25 | Height = 27 26 | Top = 384 27 | Width = 96 28 | Caption = 'OK' 29 | Default = True 30 | ModalResult = 1 31 | TabOrder = 8 32 | end 33 | object btnCancel: TButton 34 | Left = 376 35 | Height = 27 36 | Top = 384 37 | Width = 64 38 | Cancel = True 39 | Caption = 'Cancel' 40 | ModalResult = 2 41 | TabOrder = 9 42 | end 43 | object btnHelp: TButton 44 | Left = 28 45 | Height = 27 46 | Top = 384 47 | Width = 71 48 | Caption = 'Help' 49 | OnClick = btnHelpClick 50 | TabOrder = 10 51 | end 52 | object btnSettings: TButton 53 | Left = 108 54 | Height = 27 55 | Top = 384 56 | Width = 71 57 | Caption = 'Settings' 58 | OnClick = btnSettingsClick 59 | TabOrder = 11 60 | end 61 | object rdbHttp: TRadioButton 62 | Left = 22 63 | Height = 21 64 | Top = 15 65 | Width = 77 66 | Caption = 'Http URL:' 67 | Checked = True 68 | OnChange = rdbHttpChange 69 | TabOrder = 0 70 | TabStop = True 71 | end 72 | object rdbJdbc: TRadioButton 73 | Left = 22 74 | Height = 21 75 | Top = 140 76 | Width = 55 77 | Caption = 'JDBC:' 78 | OnChange = rdbHttpChange 79 | TabOrder = 3 80 | end 81 | object btnStartHttpSv: TButton 82 | Left = 49 83 | Height = 25 84 | Top = 90 85 | Width = 135 86 | Caption = 'Start JDBC Server' 87 | OnClick = btnStartHttpSvClick 88 | TabOrder = 2 89 | end 90 | object Label1: TLabel 91 | Left = 49 92 | Height = 12 93 | Top = 184 94 | Width = 48 95 | Caption = 'DB Type:' 96 | ParentColor = False 97 | end 98 | object combDbType: TComboBox 99 | Left = 136 100 | Height = 25 101 | Top = 180 102 | Width = 304 103 | ItemHeight = 17 104 | OnCloseUp = combDbTypeCloseUp 105 | TabOrder = 5 106 | end 107 | object Label2: TLabel 108 | Left = 49 109 | Height = 12 110 | Top = 228 111 | Width = 42 112 | Caption = 'Drvier:' 113 | ParentColor = False 114 | end 115 | object edtDriver: TEdit 116 | Left = 136 117 | Height = 25 118 | Top = 228 119 | Width = 304 120 | TabOrder = 6 121 | end 122 | object edtJdbcUrl: TEdit 123 | Left = 136 124 | Height = 25 125 | Top = 268 126 | Width = 304 127 | TabOrder = 7 128 | end 129 | object Label3: TLabel 130 | Left = 49 131 | Height = 12 132 | Top = 268 133 | Width = 24 134 | Caption = 'Url:' 135 | ParentColor = False 136 | end 137 | object Label4: TLabel 138 | Left = 32 139 | Height = 64 140 | Top = 312 141 | Width = 410 142 | AutoSize = False 143 | Caption = 'Note: JDBC requires the Java runtime environment, and database driver jar files should be placed in the EZDML/jdbc/lib directory.' 144 | ParentColor = False 145 | WordWrap = True 146 | end 147 | object ckbShowJdbcConsole: TCheckBox 148 | Left = 304 149 | Height = 21 150 | Top = 140 151 | Width = 136 152 | Caption = 'Show JDBC console' 153 | TabOrder = 4 154 | end 155 | end 156 | -------------------------------------------------------------------------------- /DML/DbConn/wHttpJdbcConfig.lrj: -------------------------------------------------------------------------------- 1 | {"version":1,"strings":[ 2 | {"hash":192442494,"name":"tfrmhttpjdbcconfig.caption","sourcebytes":[72,84,84,80,95,74,68,66,67,32,67,111,110,110,101,99,116,105,111,110],"value":"HTTP_JDBC Connection"}, 3 | {"hash":1339,"name":"tfrmhttpjdbcconfig.btnok.caption","sourcebytes":[79,75],"value":"OK"}, 4 | {"hash":77089212,"name":"tfrmhttpjdbcconfig.btncancel.caption","sourcebytes":[67,97,110,99,101,108],"value":"Cancel"}, 5 | {"hash":322608,"name":"tfrmhttpjdbcconfig.btnhelp.caption","sourcebytes":[72,101,108,112],"value":"Help"}, 6 | {"hash":213582195,"name":"tfrmhttpjdbcconfig.btnsettings.caption","sourcebytes":[83,101,116,116,105,110,103,115],"value":"Settings"}, 7 | {"hash":187033930,"name":"tfrmhttpjdbcconfig.rdbhttp.caption","sourcebytes":[72,116,116,112,32,85,82,76,58],"value":"Http URL:"}, 8 | {"hash":5146218,"name":"tfrmhttpjdbcconfig.rdbjdbc.caption","sourcebytes":[74,68,66,67,58],"value":"JDBC:"}, 9 | {"hash":59290114,"name":"tfrmhttpjdbcconfig.btnstarthttpsv.caption","sourcebytes":[83,116,97,114,116,32,74,68,66,67,32,83,101,114,118,101,114],"value":"Start JDBC Server"}, 10 | {"hash":73138698,"name":"tfrmhttpjdbcconfig.label1.caption","sourcebytes":[68,66,32,84,121,112,101,58],"value":"DB Type:"}, 11 | {"hash":194837530,"name":"tfrmhttpjdbcconfig.label2.caption","sourcebytes":[68,114,118,105,101,114,58],"value":"Drvier:"}, 12 | {"hash":379130,"name":"tfrmhttpjdbcconfig.label3.caption","sourcebytes":[85,114,108,58],"value":"Url:"}, 13 | {"hash":123481134,"name":"tfrmhttpjdbcconfig.label4.caption","sourcebytes":[78,111,116,101,58,32,74,68,66,67,32,114,101,113,117,105,114,101,115,32,116,104,101,32,74,97,118,97,32,114,117,110,116,105,109,101,32,101,110,118,105,114,111,110,109,101,110,116,44,32,97,110,100,32,100,97,116,97,98,97,115,101,32,100,114,105,118,101,114,32,106,97,114,32,102,105,108,101,115,32,115,104,111,117,108,100,32,98,101,32,112,108,97,99,101,100,32,105,110,32,116,104,101,32,69,90,68,77,76,47,106,100,98,99,47,108,105,98,32,100,105,114,101,99,116,111,114,121,46],"value":"Note: JDBC requires the Java runtime environment, and database driver jar files should be placed in the EZDML/jdbc/lib directory."}, 14 | {"hash":250877909,"name":"tfrmhttpjdbcconfig.ckbshowjdbcconsole.caption","sourcebytes":[83,104,111,119,32,74,68,66,67,32,99,111,110,115,111,108,101],"value":"Show JDBC console"} 15 | ]} 16 | -------------------------------------------------------------------------------- /DML/DbConn/wOracleDBConfig.lfm: -------------------------------------------------------------------------------- 1 | object frmOraDBConfig: TfrmOraDBConfig 2 | Left = 408 3 | Height = 606 4 | Top = 310 5 | Width = 473 6 | BorderStyle = bsDialog 7 | Caption = 'ORACLE Connection' 8 | ClientHeight = 606 9 | ClientWidth = 473 10 | Color = clBtnFace 11 | OnCloseQuery = FormCloseQuery 12 | ParentFont = True 13 | Position = poMainFormCenter 14 | LCLVersion = '2.0.12.0' 15 | object Label1: TLabel 16 | Left = 48 17 | Height = 17 18 | Top = 108 19 | Width = 45 20 | Caption = 'Host IP:' 21 | ParentColor = False 22 | end 23 | object Label2: TLabel 24 | Left = 320 25 | Height = 17 26 | Top = 108 27 | Width = 27 28 | Caption = 'Port:' 29 | ParentColor = False 30 | end 31 | object Label3: TLabel 32 | Left = 48 33 | Height = 17 34 | Top = 148 35 | Width = 23 36 | Caption = 'SID:' 37 | ParentColor = False 38 | end 39 | object edtIP: TEdit 40 | Left = 116 41 | Height = 25 42 | Top = 104 43 | Width = 196 44 | TabOrder = 3 45 | end 46 | object edtPort: TEdit 47 | Left = 368 48 | Height = 25 49 | Top = 104 50 | Width = 72 51 | TabOrder = 4 52 | Text = '1521' 53 | end 54 | object edtSvcName: TEdit 55 | Left = 116 56 | Height = 25 57 | Top = 144 58 | Width = 324 59 | TabOrder = 5 60 | end 61 | object btnOK: TButton 62 | Left = 268 63 | Height = 27 64 | Top = 568 65 | Width = 100 66 | Caption = 'OK' 67 | Default = True 68 | ModalResult = 1 69 | TabOrder = 14 70 | end 71 | object btnCancel: TButton 72 | Left = 376 73 | Height = 27 74 | Top = 568 75 | Width = 64 76 | Cancel = True 77 | Caption = 'Cancel' 78 | ModalResult = 2 79 | TabOrder = 15 80 | end 81 | object combNetSvcName: TComboBox 82 | Left = 48 83 | Height = 25 84 | Top = 40 85 | Width = 392 86 | ItemHeight = 17 87 | Items.Strings = ( 88 | 'ORCL' 89 | '127.0.0.1:1521/ORCL' 90 | ) 91 | TabOrder = 1 92 | end 93 | object rdbNetSvc: TRadioButton 94 | Left = 16 95 | Height = 21 96 | Top = 12 97 | Width = 185 98 | Caption = 'Through local service name:' 99 | Checked = True 100 | OnClick = rdbNetSvcClick 101 | TabOrder = 0 102 | TabStop = True 103 | end 104 | object rdbSvcParam: TRadioButton 105 | Left = 16 106 | Height = 21 107 | Top = 72 108 | Width = 166 109 | Caption = 'Specify host parameters:' 110 | OnClick = rdbSvcParamClick 111 | TabOrder = 2 112 | end 113 | object Label4: TLabel 114 | Left = 17 115 | Height = 72 116 | Top = 200 117 | Width = 439 118 | AutoSize = False 119 | Caption = 'Note: EZDML needs oracle client / instant-client to logon. You can specify the location of libociei.dylib/.so/oci.dll in main settings dialog (a restart will be needed).' 120 | ParentColor = False 121 | WordWrap = True 122 | end 123 | object btnHelp: TButton 124 | Left = 20 125 | Height = 25 126 | Top = 568 127 | Width = 74 128 | Caption = 'Help' 129 | OnClick = btnHelpClick 130 | TabOrder = 16 131 | end 132 | object btnSettings: TButton 133 | Left = 100 134 | Height = 25 135 | Top = 568 136 | Width = 70 137 | Caption = 'Settings' 138 | OnClick = btnSettingsClick 139 | TabOrder = 17 140 | end 141 | object rbdOdbcDsn: TRadioButton 142 | Left = 22 143 | Height = 21 144 | Top = 376 145 | Width = 90 146 | Caption = 'ODBC DSN:' 147 | OnClick = rdbNetSvcClick 148 | TabOrder = 9 149 | end 150 | object Label6: TLabel 151 | Left = 48 152 | Height = 17 153 | Top = 412 154 | Width = 29 155 | Caption = 'DSN:' 156 | ParentColor = False 157 | end 158 | object edtDsnName: TEdit 159 | Left = 116 160 | Height = 25 161 | Top = 408 162 | Width = 256 163 | TabOrder = 10 164 | end 165 | object btnBrowseDsn: TButton 166 | Left = 376 167 | Height = 25 168 | Top = 408 169 | Width = 64 170 | Caption = 'Browse' 171 | OnClick = btnBrowseDsnClick 172 | TabOrder = 11 173 | end 174 | object rdbOdbcConnStr: TRadioButton 175 | Left = 22 176 | Height = 21 177 | Top = 452 178 | Width = 167 179 | Caption = 'ODBC Connection String:' 180 | OnClick = rdbNetSvcClick 181 | TabOrder = 12 182 | end 183 | object MemoOdbcConnStr: TMemo 184 | Left = 48 185 | Height = 66 186 | Top = 484 187 | Width = 392 188 | Lines.Strings = ( 189 | 'Driver=Oracle in instantclient_11_2;Server=My Db Server;UID=UserName;' 190 | ) 191 | TabOrder = 13 192 | end 193 | object MemoJdbcConnStr: TMemo 194 | Left = 46 195 | Height = 54 196 | Hint = 'Format: url=jdbc:oracle:thin:@192.168.1.5:1521:orcl;driver=oracle.jdbc.OracleDriver'#13#10'Dameng: url=jdbc:dm://192.168.1.5:5236;driver=dm.jdbc.driver.DmDriver' 197 | Top = 304 198 | Width = 392 199 | Lines.Strings = ( 200 | 'url=jdbc:oracle:thin:@192.168.1.5:1521:orcl;' 201 | ) 202 | ParentShowHint = False 203 | ShowHint = True 204 | TabOrder = 8 205 | WantReturns = False 206 | end 207 | object rdbJdbcConnStr: TRadioButton 208 | Left = 20 209 | Height = 21 210 | Top = 272 211 | Width = 120 212 | Caption = 'JDBC properties:' 213 | OnClick = rdbNetSvcClick 214 | TabOrder = 6 215 | end 216 | object ckbShowJdbcConsole: TCheckBox 217 | Left = 302 218 | Height = 21 219 | Top = 272 220 | Width = 136 221 | Caption = 'Show JDBC console' 222 | TabOrder = 7 223 | end 224 | end 225 | -------------------------------------------------------------------------------- /DML/DbConn/wOracleDBConfig.lrj: -------------------------------------------------------------------------------- 1 | {"version":1,"strings":[ 2 | {"hash":77311886,"name":"tfrmoradbconfig.caption","sourcebytes":[79,82,65,67,76,69,32,67,111,110,110,101,99,116,105,111,110],"value":"ORACLE Connection"}, 3 | {"hash":111561418,"name":"tfrmoradbconfig.label1.caption","sourcebytes":[72,111,115,116,32,73,80,58],"value":"Host IP:"}, 4 | {"hash":5728634,"name":"tfrmoradbconfig.label2.caption","sourcebytes":[80,111,114,116,58],"value":"Port:"}, 5 | {"hash":359802,"name":"tfrmoradbconfig.label3.caption","sourcebytes":[83,73,68,58],"value":"SID:"}, 6 | {"hash":215121,"name":"tfrmoradbconfig.edtport.text","sourcebytes":[49,53,50,49],"value":"1521"}, 7 | {"hash":1339,"name":"tfrmoradbconfig.btnok.caption","sourcebytes":[79,75],"value":"OK"}, 8 | {"hash":77089212,"name":"tfrmoradbconfig.btncancel.caption","sourcebytes":[67,97,110,99,101,108],"value":"Cancel"}, 9 | {"hash":45044426,"name":"tfrmoradbconfig.rdbnetsvc.caption","sourcebytes":[84,104,114,111,117,103,104,32,108,111,99,97,108,32,115,101,114,118,105,99,101,32,110,97,109,101,58],"value":"Through local service name:"}, 10 | {"hash":229387866,"name":"tfrmoradbconfig.rdbsvcparam.caption","sourcebytes":[83,112,101,99,105,102,121,32,104,111,115,116,32,112,97,114,97,109,101,116,101,114,115,58],"value":"Specify host parameters:"}, 11 | {"hash":170048654,"name":"tfrmoradbconfig.label4.caption","sourcebytes":[78,111,116,101,58,32,69,90,68,77,76,32,110,101,101,100,115,32,111,114,97,99,108,101,32,99,108,105,101,110,116,32,47,32,105,110,115,116,97,110,116,45,99,108,105,101,110,116,32,116,111,32,108,111,103,111,110,46,32,89,111,117,32,99,97,110,32,115,112,101,99,105,102,121,32,116,104,101,32,108,111,99,97,116,105,111,110,32,111,102,32,108,105,98,111,99,105,101,105,46,100,121,108,105,98,47,46,115,111,47,111,99,105,46,100,108,108,32,105,110,32,109,97,105,110,32,115,101,116,116,105,110,103,115,32,100,105,97,108,111,103,32,40,97,32,114,101,115,116,97,114,116,32,119,105,108,108,32,98,101,32,110,101,101,100,101,100,41,46],"value":"Note: EZDML needs oracle client / instant-client to logon. You can specify the location of libociei.dylib/.so/oci.dll in main settings dialog (a restart will be needed)."}, 12 | {"hash":322608,"name":"tfrmoradbconfig.btnhelp.caption","sourcebytes":[72,101,108,112],"value":"Help"}, 13 | {"hash":213582195,"name":"tfrmoradbconfig.btnsettings.caption","sourcebytes":[83,101,116,116,105,110,103,115],"value":"Settings"}, 14 | {"hash":106218906,"name":"tfrmoradbconfig.rbdodbcdsn.caption","sourcebytes":[79,68,66,67,32,68,83,78,58],"value":"ODBC DSN:"}, 15 | {"hash":301082,"name":"tfrmoradbconfig.label6.caption","sourcebytes":[68,83,78,58],"value":"DSN:"}, 16 | {"hash":77164181,"name":"tfrmoradbconfig.btnbrowsedsn.caption","sourcebytes":[66,114,111,119,115,101],"value":"Browse"}, 17 | {"hash":79787546,"name":"tfrmoradbconfig.rdbodbcconnstr.caption","sourcebytes":[79,68,66,67,32,67,111,110,110,101,99,116,105,111,110,32,83,116,114,105,110,103,58],"value":"ODBC Connection String:"}, 18 | {"hash":3467922,"name":"tfrmoradbconfig.memojdbcconnstr.hint","sourcebytes":[70,111,114,109,97,116,58,32,117,114,108,61,106,100,98,99,58,111,114,97,99,108,101,58,116,104,105,110,58,64,49,57,50,46,49,54,56,46,49,46,53,58,49,53,50,49,58,111,114,99,108,59,100,114,105,118,101,114,61,111,114,97,99,108,101,46,106,100,98,99,46,79,114,97,99,108,101,68,114,105,118,101,114,13,10,68,97,109,101,110,103,58,32,117,114,108,61,106,100,98,99,58,100,109,58,47,47,49,57,50,46,49,54,56,46,49,46,53,58,53,50,51,54,59,100,114,105,118,101,114,61,100,109,46,106,100,98,99,46,100,114,105,118,101,114,46,68,109,68,114,105,118,101,114],"value":"Format: url=jdbc:oracle:thin:@192.168.1.5:1521:orcl;driver=oracle.jdbc.OracleDriver\r\nDameng: url=jdbc:dm://192.168.1.5:5236;driver=dm.jdbc.driver.DmDriver"}, 19 | {"hash":166298218,"name":"tfrmoradbconfig.rdbjdbcconnstr.caption","sourcebytes":[74,68,66,67,32,112,114,111,112,101,114,116,105,101,115,58],"value":"JDBC properties:"}, 20 | {"hash":250877909,"name":"tfrmoradbconfig.ckbshowjdbcconsole.caption","sourcebytes":[83,104,111,119,32,74,68,66,67,32,99,111,110,115,111,108,101],"value":"Show JDBC console"} 21 | ]} 22 | -------------------------------------------------------------------------------- /DML/DbConn/wSqlServerDBConfig.lfm: -------------------------------------------------------------------------------- 1 | object frmSqlSvrDBConfig: TfrmSqlSvrDBConfig 2 | Left = 397 3 | Height = 564 4 | Top = 320 5 | Width = 473 6 | BorderStyle = bsDialog 7 | Caption = 'SQLServer Connection' 8 | ClientHeight = 564 9 | ClientWidth = 473 10 | Color = clBtnFace 11 | OnCloseQuery = FormCloseQuery 12 | ParentFont = True 13 | Position = poMainFormCenter 14 | LCLVersion = '2.0.12.0' 15 | object Label1: TLabel 16 | Left = 48 17 | Height = 12 18 | Top = 52 19 | Width = 48 20 | Caption = 'Host IP:' 21 | ParentColor = False 22 | end 23 | object Label2: TLabel 24 | Left = 320 25 | Height = 12 26 | Top = 52 27 | Width = 30 28 | Caption = 'Port:' 29 | ParentColor = False 30 | end 31 | object Label3: TLabel 32 | Left = 48 33 | Height = 12 34 | Top = 92 35 | Width = 48 36 | Caption = 'Instant:' 37 | ParentColor = False 38 | end 39 | object edtPort: TEdit 40 | Left = 368 41 | Height = 25 42 | Top = 48 43 | Width = 72 44 | TabOrder = 2 45 | Text = '1433' 46 | end 47 | object edtInstName: TEdit 48 | Left = 116 49 | Height = 25 50 | Top = 88 51 | Width = 324 52 | TabOrder = 3 53 | end 54 | object btnOK: TButton 55 | Left = 268 56 | Height = 27 57 | Top = 516 58 | Width = 100 59 | Caption = 'OK' 60 | Default = True 61 | ModalResult = 1 62 | TabOrder = 13 63 | end 64 | object btnCancel: TButton 65 | Left = 376 66 | Height = 27 67 | Top = 516 68 | Width = 64 69 | Cancel = True 70 | Caption = 'Cancel' 71 | ModalResult = 2 72 | TabOrder = 14 73 | end 74 | object combAddr: TComboBox 75 | Left = 116 76 | Height = 25 77 | Top = 48 78 | Width = 188 79 | ItemHeight = 17 80 | Items.Strings = ( 81 | 'localhost' 82 | '127.0.0.1' 83 | '192.168.1.123' 84 | ) 85 | TabOrder = 1 86 | end 87 | object btnHelp: TButton 88 | Left = 20 89 | Height = 25 90 | Top = 516 91 | Width = 74 92 | Caption = 'Help' 93 | OnClick = btnHelpClick 94 | TabOrder = 15 95 | end 96 | object Label4: TLabel 97 | Left = 48 98 | Height = 12 99 | Top = 132 100 | Width = 54 101 | Caption = 'Database:' 102 | ParentColor = False 103 | end 104 | object edtDbName: TEdit 105 | Left = 116 106 | Height = 25 107 | Top = 128 108 | Width = 324 109 | TabOrder = 4 110 | end 111 | object Label5: TLabel 112 | Left = 48 113 | Height = 24 114 | Top = 176 115 | Width = 392 116 | Anchors = [akTop, akLeft, akRight] 117 | Caption = 'Note: Leave user-name empty for integrated security authentication' 118 | ParentColor = False 119 | WordWrap = True 120 | end 121 | object rdbIPAddr: TRadioButton 122 | Left = 22 123 | Height = 21 124 | Top = 15 125 | Width = 117 126 | Caption = 'Specify address:' 127 | Checked = True 128 | OnChange = rdbIPAddrChange 129 | TabOrder = 0 130 | TabStop = True 131 | end 132 | object rbdOdbcDsn: TRadioButton 133 | Left = 22 134 | Height = 21 135 | Top = 320 136 | Width = 90 137 | Caption = 'ODBC DSN:' 138 | OnChange = rdbIPAddrChange 139 | TabOrder = 8 140 | end 141 | object Label6: TLabel 142 | Left = 48 143 | Height = 12 144 | Top = 356 145 | Width = 24 146 | Caption = 'DSN:' 147 | ParentColor = False 148 | end 149 | object edtDsnName: TEdit 150 | Left = 116 151 | Height = 25 152 | Top = 352 153 | Width = 256 154 | TabOrder = 9 155 | end 156 | object btnBrowseDsn: TButton 157 | Left = 376 158 | Height = 25 159 | Top = 352 160 | Width = 64 161 | Caption = 'Browse' 162 | OnClick = btnBrowseDsnClick 163 | TabOrder = 10 164 | end 165 | object rdbOdbcConnStr: TRadioButton 166 | Left = 22 167 | Height = 21 168 | Top = 396 169 | Width = 167 170 | Caption = 'ODBC Connection String:' 171 | OnChange = rdbIPAddrChange 172 | TabOrder = 11 173 | end 174 | object MemoOdbcConnStr: TMemo 175 | Left = 48 176 | Height = 66 177 | Top = 428 178 | Width = 392 179 | Lines.Strings = ( 180 | 'Driver=SQL Server;Server=MyDbServer,Port\SID;Database=pubs;Integrated Security=SSPI;' 181 | ) 182 | TabOrder = 12 183 | end 184 | object btnSettings: TButton 185 | Left = 100 186 | Height = 25 187 | Top = 516 188 | Width = 70 189 | Caption = 'Settings' 190 | OnClick = btnSettingsClick 191 | TabOrder = 16 192 | end 193 | object MemoJdbcConnStr: TMemo 194 | Left = 48 195 | Height = 54 196 | Hint = 'Format: url=jdbc:sqlserver://localhost:1433#59#databaseName=DbName;driver=com.microsoft.sqlserver.jdbc.SQLServerDriver' 197 | Top = 248 198 | Width = 392 199 | Lines.Strings = ( 200 | 'url=jdbc:sqlserver://localhost:1433#59#databaseName=DbName;' 201 | ) 202 | ParentShowHint = False 203 | ShowHint = True 204 | TabOrder = 7 205 | WantReturns = False 206 | end 207 | object rdbJdbcConnStr: TRadioButton 208 | Left = 22 209 | Height = 21 210 | Top = 216 211 | Width = 120 212 | Caption = 'JDBC properties:' 213 | OnChange = rdbIPAddrChange 214 | TabOrder = 5 215 | end 216 | object ckbShowJdbcConsole: TCheckBox 217 | Left = 304 218 | Height = 21 219 | Top = 216 220 | Width = 136 221 | Caption = 'Show JDBC console' 222 | TabOrder = 6 223 | end 224 | end 225 | -------------------------------------------------------------------------------- /DML/DbConn/wSqlServerDBConfig.lrj: -------------------------------------------------------------------------------- 1 | {"version":1,"strings":[ 2 | {"hash":250070606,"name":"tfrmsqlsvrdbconfig.caption","sourcebytes":[83,81,76,83,101,114,118,101,114,32,67,111,110,110,101,99,116,105,111,110],"value":"SQLServer Connection"}, 3 | {"hash":111561418,"name":"tfrmsqlsvrdbconfig.label1.caption","sourcebytes":[72,111,115,116,32,73,80,58],"value":"Host IP:"}, 4 | {"hash":5728634,"name":"tfrmsqlsvrdbconfig.label2.caption","sourcebytes":[80,111,114,116,58],"value":"Port:"}, 5 | {"hash":95060090,"name":"tfrmsqlsvrdbconfig.label3.caption","sourcebytes":[73,110,115,116,97,110,116,58],"value":"Instant:"}, 6 | {"hash":214883,"name":"tfrmsqlsvrdbconfig.edtport.text","sourcebytes":[49,52,51,51],"value":"1433"}, 7 | {"hash":1339,"name":"tfrmsqlsvrdbconfig.btnok.caption","sourcebytes":[79,75],"value":"OK"}, 8 | {"hash":77089212,"name":"tfrmsqlsvrdbconfig.btncancel.caption","sourcebytes":[67,97,110,99,101,108],"value":"Cancel"}, 9 | {"hash":322608,"name":"tfrmsqlsvrdbconfig.btnhelp.caption","sourcebytes":[72,101,108,112],"value":"Help"}, 10 | {"hash":175686410,"name":"tfrmsqlsvrdbconfig.label4.caption","sourcebytes":[68,97,116,97,98,97,115,101,58],"value":"Database:"}, 11 | {"hash":71716014,"name":"tfrmsqlsvrdbconfig.label5.caption","sourcebytes":[78,111,116,101,58,32,76,101,97,118,101,32,117,115,101,114,45,110,97,109,101,32,101,109,112,116,121,32,102,111,114,32,105,110,116,101,103,114,97,116,101,100,32,115,101,99,117,114,105,116,121,32,97,117,116,104,101,110,116,105,99,97,116,105,111,110],"value":"Note: Leave user-name empty for integrated security authentication"}, 12 | {"hash":54581930,"name":"tfrmsqlsvrdbconfig.rdbipaddr.caption","sourcebytes":[83,112,101,99,105,102,121,32,97,100,100,114,101,115,115,58],"value":"Specify address:"}, 13 | {"hash":106218906,"name":"tfrmsqlsvrdbconfig.rbdodbcdsn.caption","sourcebytes":[79,68,66,67,32,68,83,78,58],"value":"ODBC DSN:"}, 14 | {"hash":301082,"name":"tfrmsqlsvrdbconfig.label6.caption","sourcebytes":[68,83,78,58],"value":"DSN:"}, 15 | {"hash":77164181,"name":"tfrmsqlsvrdbconfig.btnbrowsedsn.caption","sourcebytes":[66,114,111,119,115,101],"value":"Browse"}, 16 | {"hash":79787546,"name":"tfrmsqlsvrdbconfig.rdbodbcconnstr.caption","sourcebytes":[79,68,66,67,32,67,111,110,110,101,99,116,105,111,110,32,83,116,114,105,110,103,58],"value":"ODBC Connection String:"}, 17 | {"hash":213582195,"name":"tfrmsqlsvrdbconfig.btnsettings.caption","sourcebytes":[83,101,116,116,105,110,103,115],"value":"Settings"}, 18 | {"hash":221676146,"name":"tfrmsqlsvrdbconfig.memojdbcconnstr.hint","sourcebytes":[70,111,114,109,97,116,58,32,117,114,108,61,106,100,98,99,58,115,113,108,115,101,114,118,101,114,58,47,47,108,111,99,97,108,104,111,115,116,58,49,52,51,51,35,53,57,35,100,97,116,97,98,97,115,101,78,97,109,101,61,68,98,78,97,109,101,59,100,114,105,118,101,114,61,99,111,109,46,109,105,99,114,111,115,111,102,116,46,115,113,108,115,101,114,118,101,114,46,106,100,98,99,46,83,81,76,83,101,114,118,101,114,68,114,105,118,101,114],"value":"Format: url=jdbc:sqlserver://localhost:1433#59#databaseName=DbName;driver=com.microsoft.sqlserver.jdbc.SQLServerDriver"}, 19 | {"hash":166298218,"name":"tfrmsqlsvrdbconfig.rdbjdbcconnstr.caption","sourcebytes":[74,68,66,67,32,112,114,111,112,101,114,116,105,101,115,58],"value":"JDBC properties:"}, 20 | {"hash":250877909,"name":"tfrmsqlsvrdbconfig.ckbshowjdbcconsole.caption","sourcebytes":[83,104,111,119,32,74,68,66,67,32,99,111,110,115,111,108,101],"value":"Show JDBC console"} 21 | ]} 22 | -------------------------------------------------------------------------------- /DML/Graph/DMLObjs.pas: -------------------------------------------------------------------------------- 1 | unit DMLObjs; 2 | 3 | {$ifdef EZDML_LITE} 4 | {$i DMLObjs_old.inc} 5 | {$else} 6 | {$i DMLObjs_new.inc} 7 | {$endif} 8 | 9 | end. 10 | -------------------------------------------------------------------------------- /DML/Graph/DMLObjs_old.inc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/huzgd/ezdml/5fbf534685b0e38f3d634eaba6f6ffe96999f3b8/DML/Graph/DMLObjs_old.inc -------------------------------------------------------------------------------- /DML/Graph/uColorStyles.lrj: -------------------------------------------------------------------------------- 1 | {"version":1,"strings":[ 2 | {"hash":35675251,"name":"tfrmcolorstyles.caption","sourcebytes":[77,111,100,101,108,32,79,112,116,105,111,110,115],"value":"Model Options"}, 3 | {"hash":93371107,"name":"tfrmcolorstyles.tabsheet2.caption","sourcebytes":[79,98,106,101,99,116,115],"value":"Objects"}, 4 | {"hash":78001754,"name":"tfrmcolorstyles.label15.caption","sourcebytes":[67,111,108,111,114,58],"value":"Color:"}, 5 | {"hash":263002489,"name":"tfrmcolorstyles.label16.caption","sourcebytes":[70,111,114,101,105,103,110,32,107,101,121],"value":"Foreign key"}, 6 | {"hash":159887390,"name":"tfrmcolorstyles.label9.caption","sourcebytes":[67,97,112,116,105,111,110],"value":"Caption"}, 7 | {"hash":78001754,"name":"tfrmcolorstyles.label3.caption","sourcebytes":[67,111,108,111,114,58],"value":"Color:"}, 8 | {"hash":249486954,"name":"tfrmcolorstyles.label12.caption","sourcebytes":[66,97,99,107,103,114,111,117,110,100,58],"value":"Background:"}, 9 | {"hash":5929253,"name":"tfrmcolorstyles.label18.caption","sourcebytes":[84,97,98,108,101],"value":"Table"}, 10 | {"hash":76974786,"name":"tfrmcolorstyles.label4.caption","sourcebytes":[66,111,114,100,101,114],"value":"Border"}, 11 | {"hash":78001754,"name":"tfrmcolorstyles.label5.caption","sourcebytes":[67,111,108,111,114,58],"value":"Color:"}, 12 | {"hash":78001754,"name":"tfrmcolorstyles.label19.caption","sourcebytes":[67,111,108,111,114,58],"value":"Color:"}, 13 | {"hash":147653113,"name":"tfrmcolorstyles.label20.caption","sourcebytes":[80,114,105,109,97,114,121,32,107,101,121],"value":"Primary key"}, 14 | {"hash":78001754,"name":"tfrmcolorstyles.label21.caption","sourcebytes":[67,111,108,111,114,58],"value":"Color:"}, 15 | {"hash":340037,"name":"tfrmcolorstyles.label22.caption","sourcebytes":[76,105,110,101],"value":"Line"}, 16 | {"hash":782,"name":"tfrmcolorstyles.btnexkey.caption","sourcebytes":[46,46],"value":".."}, 17 | {"hash":782,"name":"tfrmcolorstyles.btntitle.caption","sourcebytes":[46,46],"value":".."}, 18 | {"hash":782,"name":"tfrmcolorstyles.btnfill.caption","sourcebytes":[46,46],"value":".."}, 19 | {"hash":782,"name":"tfrmcolorstyles.btnbordercolor.caption","sourcebytes":[46,46],"value":".."}, 20 | {"hash":782,"name":"tfrmcolorstyles.btnpk.caption","sourcebytes":[46,46],"value":".."}, 21 | {"hash":782,"name":"tfrmcolorstyles.btnlinkline.caption","sourcebytes":[46,46],"value":".."}, 22 | {"hash":113387512,"name":"tfrmcolorstyles.label24.caption","sourcebytes":[71,114,111,117,112,32,98,111,120],"value":"Group box"}, 23 | {"hash":116366122,"name":"tfrmcolorstyles.label25.caption","sourcebytes":[69,100,103,101,32,99,111,108,111,114,58],"value":"Edge color:"}, 24 | {"hash":782,"name":"tfrmcolorstyles.btngroupedge.caption","sourcebytes":[46,46],"value":".."}, 25 | {"hash":24255153,"name":"tfrmcolorstyles.tabsheet1.caption","sourcebytes":[87,111,114,107,105,110,103,32,65,114,101,97],"value":"Working Area"}, 26 | {"hash":78001754,"name":"tfrmcolorstyles.label14.caption","sourcebytes":[67,111,108,111,114,58],"value":"Color:"}, 27 | {"hash":45807518,"name":"tfrmcolorstyles.label13.caption","sourcebytes":[83,101,108,101,99,116,105,111,110],"value":"Selection"}, 28 | {"hash":98548410,"name":"tfrmcolorstyles.label1.caption","sourcebytes":[87,105,100,116,104,58],"value":"Width:"}, 29 | {"hash":247455546,"name":"tfrmcolorstyles.label2.caption","sourcebytes":[72,101,105,103,104,116,58],"value":"Height:"}, 30 | {"hash":78001754,"name":"tfrmcolorstyles.label11.caption","sourcebytes":[67,111,108,111,114,58],"value":"Color:"}, 31 | {"hash":32370148,"name":"tfrmcolorstyles.label17.caption","sourcebytes":[66,97,99,107,103,114,111,117,110,100],"value":"Background"}, 32 | {"hash":368901,"name":"tfrmcolorstyles.label6.caption","sourcebytes":[83,105,122,101],"value":"Size"}, 33 | {"hash":90893459,"name":"tfrmcolorstyles.label7.caption","sourcebytes":[79,116,104,101,114,115],"value":"Others"}, 34 | {"hash":782,"name":"tfrmcolorstyles.btnselect.caption","sourcebytes":[46,46],"value":".."}, 35 | {"hash":82916917,"name":"tfrmcolorstyles.chlshowfieldtype.caption","sourcebytes":[83,104,111,119,32,102,105,101,108,100,32,116,121,112,101],"value":"Show field type"}, 36 | {"hash":782,"name":"tfrmcolorstyles.btnbackground.caption","sourcebytes":[46,46],"value":".."}, 37 | {"hash":82866190,"name":"tfrmcolorstyles.chlshowfieldicon.caption","sourcebytes":[83,104,111,119,32,102,105,101,108,100,32,105,99,111,110],"value":"Show field icon"}, 38 | {"hash":51017077,"name":"tfrmcolorstyles.ckbindependposforoverviewmode.caption","sourcebytes":[73,110,100,101,112,101,110,100,101,110,116,32,112,111,115,105,116,105,111,110,32,102,111,114,32,111,118,101,114,118,105,101,119,45,109,111,100,101],"value":"Independent position for overview-mode"}, 39 | {"hash":145198133,"name":"tfrmcolorstyles.tabsheet3.caption","sourcebytes":[68,97,116,97,98,97,115,101],"value":"Database"}, 40 | {"hash":145198133,"name":"tfrmcolorstyles.label10.caption","sourcebytes":[68,97,116,97,98,97,115,101],"value":"Database"}, 41 | {"hash":6030986,"name":"tfrmcolorstyles.label8.caption","sourcebytes":[84,121,112,101,58],"value":"Type:"}, 42 | {"hash":1339,"name":"tfrmcolorstyles.btnok.caption","sourcebytes":[79,75],"value":"OK"}, 43 | {"hash":77089212,"name":"tfrmcolorstyles.btncancel.caption","sourcebytes":[67,97,110,99,101,108],"value":"Cancel"}, 44 | {"hash":32,"name":"tfrmcolorstyles.label23.caption","sourcebytes":[32],"value":" "} 45 | ]} 46 | -------------------------------------------------------------------------------- /DML/Graph/uFormAddTbLink.lfm: -------------------------------------------------------------------------------- 1 | object frmAddTbLink: TfrmAddTbLink 2 | Left = 418 3 | Height = 243 4 | Top = 252 5 | Width = 644 6 | BorderStyle = bsDialog 7 | Caption = 'Add Link' 8 | ClientHeight = 243 9 | ClientWidth = 644 10 | Color = clBtnFace 11 | OnCloseQuery = FormCloseQuery 12 | OnDestroy = FormDestroy 13 | Position = poMainFormCenter 14 | LCLVersion = '2.0.12.0' 15 | object edtNewFieldName: TEdit 16 | Left = 408 17 | Height = 25 18 | Top = 61 19 | Width = 194 20 | ParentFont = False 21 | TabOrder = 8 22 | Visible = False 23 | end 24 | object Label1: TLabel 25 | Left = 16 26 | Height = 17 27 | Top = 122 28 | Width = 55 29 | Caption = 'Link type:' 30 | ParentColor = False 31 | ParentFont = False 32 | end 33 | object Label4: TLabel 34 | Left = 16 35 | Height = 17 36 | Top = 62 37 | Width = 73 38 | Caption = 'Master field:' 39 | ParentColor = False 40 | ParentFont = False 41 | end 42 | object Label2: TLabel 43 | Left = 16 44 | Height = 17 45 | Top = 24 46 | Width = 77 47 | Caption = 'Master table:' 48 | ParentColor = False 49 | ParentFont = False 50 | end 51 | object Label3: TLabel 52 | Left = 325 53 | Height = 17 54 | Top = 63 55 | Width = 68 56 | Caption = 'Relate field:' 57 | ParentColor = False 58 | ParentFont = False 59 | end 60 | object Label5: TLabel 61 | Left = 325 62 | Height = 17 63 | Top = 25 64 | Width = 69 65 | Caption = 'Detail table:' 66 | ParentColor = False 67 | ParentFont = False 68 | end 69 | object combLinkType: TComboBox 70 | Left = 99 71 | Height = 25 72 | Top = 120 73 | Width = 210 74 | ItemHeight = 17 75 | Items.Strings = ( 76 | 'Foreign key' 77 | 'Line' 78 | 'Direct' 79 | 'Opposite direct' 80 | ) 81 | OnChange = combLinkTypeChange 82 | ParentFont = False 83 | Style = csDropDownList 84 | TabOrder = 0 85 | end 86 | object combMasterField: TComboBox 87 | Left = 99 88 | Height = 25 89 | Top = 60 90 | Width = 194 91 | DropDownCount = 48 92 | ItemHeight = 17 93 | ParentFont = False 94 | Style = csDropDownList 95 | TabOrder = 1 96 | end 97 | object btnOK: TButton 98 | Left = 256 99 | Height = 27 100 | Top = 188 101 | Width = 116 102 | Caption = 'OK' 103 | Default = True 104 | ModalResult = 1 105 | ParentFont = False 106 | TabOrder = 2 107 | end 108 | object btnCancel: TButton 109 | Left = 376 110 | Height = 27 111 | Top = 188 112 | Width = 64 113 | Cancel = True 114 | Caption = 'Cancel' 115 | ModalResult = 2 116 | ParentFont = False 117 | TabOrder = 3 118 | end 119 | object edtMasterTb: TEdit 120 | Left = 99 121 | Height = 25 122 | Top = 22 123 | Width = 194 124 | ParentColor = True 125 | ParentFont = False 126 | ReadOnly = True 127 | TabOrder = 4 128 | end 129 | object combRelateField: TComboBox 130 | Left = 408 131 | Height = 25 132 | Top = 60 133 | Width = 194 134 | DropDownCount = 48 135 | ItemHeight = 17 136 | OnChange = combRelateFieldChange 137 | ParentFont = False 138 | Style = csDropDownList 139 | TabOrder = 5 140 | end 141 | object edtDetailTb: TEdit 142 | Left = 408 143 | Height = 25 144 | Top = 22 145 | Width = 194 146 | ParentColor = True 147 | ParentFont = False 148 | ReadOnly = True 149 | TabOrder = 6 150 | end 151 | object lbLinkInfo: TLabel 152 | Left = 317 153 | Height = 17 154 | Top = 123 155 | Width = 23 156 | Caption = 'Link' 157 | ParentColor = False 158 | ParentFont = False 159 | end 160 | object ckbCreateNewField: TCheckBox 161 | Left = 410 162 | Height = 21 163 | Top = 94 164 | Width = 116 165 | Caption = 'Create new field' 166 | OnChange = ckbCreateNewFieldChange 167 | ParentFont = False 168 | TabOrder = 7 169 | Visible = False 170 | end 171 | object btnClose: TButton 172 | Left = 284 173 | Height = 27 174 | Top = 188 175 | Width = 108 176 | Caption = 'Close' 177 | ModalResult = 2 178 | ParentFont = False 179 | TabOrder = 9 180 | Visible = False 181 | end 182 | object ckbCreateM2MTb: TCheckBox 183 | Left = 99 184 | Height = 21 185 | Top = 152 186 | Width = 229 187 | Caption = 'Create many-to-many relation table' 188 | OnClick = ckbCreateM2MTbClick 189 | ParentFont = False 190 | TabOrder = 10 191 | end 192 | object btnMTbProp: TButton 193 | Left = 292 194 | Height = 27 195 | Hint = 'Show table properties' 196 | Top = 21 197 | Width = 19 198 | Caption = '~' 199 | OnClick = btnMTbPropClick 200 | ParentShowHint = False 201 | ShowHint = True 202 | TabOrder = 11 203 | end 204 | object btnSTbProp: TButton 205 | Left = 599 206 | Height = 27 207 | Hint = 'Show table properties' 208 | Top = 21 209 | Width = 19 210 | Caption = '~' 211 | OnClick = btnSTbPropClick 212 | ParentShowHint = False 213 | ShowHint = True 214 | TabOrder = 12 215 | end 216 | object btnMFieldProp: TButton 217 | Left = 292 218 | Height = 27 219 | Hint = 'Show field properties' 220 | Top = 59 221 | Width = 19 222 | Caption = '~' 223 | OnClick = btnMFieldPropClick 224 | ParentShowHint = False 225 | ShowHint = True 226 | TabOrder = 13 227 | end 228 | object btnSFieldProp: TButton 229 | Left = 599 230 | Height = 27 231 | Hint = 'Show field properties' 232 | Top = 59 233 | Width = 19 234 | Caption = '~' 235 | OnClick = btnSFieldPropClick 236 | ParentShowHint = False 237 | ShowHint = True 238 | TabOrder = 14 239 | end 240 | end 241 | -------------------------------------------------------------------------------- /DML/Graph/uFormAddTbLink.lrj: -------------------------------------------------------------------------------- 1 | {"version":1,"strings":[ 2 | {"hash":174402619,"name":"tfrmaddtblink.caption","sourcebytes":[65,100,100,32,76,105,110,107],"value":"Add Link"}, 3 | {"hash":226440906,"name":"tfrmaddtblink.label1.caption","sourcebytes":[76,105,110,107,32,116,121,112,101,58],"value":"Link type:"}, 4 | {"hash":88419946,"name":"tfrmaddtblink.label4.caption","sourcebytes":[77,97,115,116,101,114,32,102,105,101,108,100,58],"value":"Master field:"}, 5 | {"hash":70074010,"name":"tfrmaddtblink.label2.caption","sourcebytes":[77,97,115,116,101,114,32,116,97,98,108,101,58],"value":"Master table:"}, 6 | {"hash":235751514,"name":"tfrmaddtblink.label3.caption","sourcebytes":[82,101,108,97,116,101,32,102,105,101,108,100,58],"value":"Relate field:"}, 7 | {"hash":225316138,"name":"tfrmaddtblink.label5.caption","sourcebytes":[68,101,116,97,105,108,32,116,97,98,108,101,58],"value":"Detail table:"}, 8 | {"hash":1339,"name":"tfrmaddtblink.btnok.caption","sourcebytes":[79,75],"value":"OK"}, 9 | {"hash":77089212,"name":"tfrmaddtblink.btncancel.caption","sourcebytes":[67,97,110,99,101,108],"value":"Cancel"}, 10 | {"hash":340043,"name":"tfrmaddtblink.lblinkinfo.caption","sourcebytes":[76,105,110,107],"value":"Link"}, 11 | {"hash":30353492,"name":"tfrmaddtblink.ckbcreatenewfield.caption","sourcebytes":[67,114,101,97,116,101,32,110,101,119,32,102,105,101,108,100],"value":"Create new field"}, 12 | {"hash":4863637,"name":"tfrmaddtblink.btnclose.caption","sourcebytes":[67,108,111,115,101],"value":"Close"}, 13 | {"hash":103869717,"name":"tfrmaddtblink.ckbcreatem2mtb.caption","sourcebytes":[67,114,101,97,116,101,32,109,97,110,121,45,116,111,45,109,97,110,121,32,114,101,108,97,116,105,111,110,32,116,97,98,108,101],"value":"Create many-to-many relation table"}, 14 | {"hash":36251683,"name":"tfrmaddtblink.btnmtbprop.hint","sourcebytes":[83,104,111,119,32,116,97,98,108,101,32,112,114,111,112,101,114,116,105,101,115],"value":"Show table properties"}, 15 | {"hash":126,"name":"tfrmaddtblink.btnmtbprop.caption","sourcebytes":[126],"value":"~"}, 16 | {"hash":36251683,"name":"tfrmaddtblink.btnstbprop.hint","sourcebytes":[83,104,111,119,32,116,97,98,108,101,32,112,114,111,112,101,114,116,105,101,115],"value":"Show table properties"}, 17 | {"hash":126,"name":"tfrmaddtblink.btnstbprop.caption","sourcebytes":[126],"value":"~"}, 18 | {"hash":37241075,"name":"tfrmaddtblink.btnmfieldprop.hint","sourcebytes":[83,104,111,119,32,102,105,101,108,100,32,112,114,111,112,101,114,116,105,101,115],"value":"Show field properties"}, 19 | {"hash":126,"name":"tfrmaddtblink.btnmfieldprop.caption","sourcebytes":[126],"value":"~"}, 20 | {"hash":37241075,"name":"tfrmaddtblink.btnsfieldprop.hint","sourcebytes":[83,104,111,119,32,102,105,101,108,100,32,112,114,111,112,101,114,116,105,101,115],"value":"Show field properties"}, 21 | {"hash":126,"name":"tfrmaddtblink.btnsfieldprop.caption","sourcebytes":[126],"value":"~"} 22 | ]} 23 | -------------------------------------------------------------------------------- /DML/Graph/uFormCtDML.lfm: -------------------------------------------------------------------------------- 1 | object frmCtDML: TfrmCtDML 2 | Left = 274 3 | Height = 433 4 | Top = 135 5 | Width = 692 6 | BorderIcons = [biSystemMenu, biMaximize] 7 | Caption = 'Diagram' 8 | Color = clBtnFace 9 | OnClose = FormClose 10 | OnCloseQuery = FormCloseQuery 11 | OnCreate = FormCreate 12 | OnDestroy = FormDestroy 13 | ParentFont = True 14 | Position = poMainFormCenter 15 | LCLVersion = '2.0.12.0' 16 | end 17 | -------------------------------------------------------------------------------- /DML/Graph/uFormCtDML.lrj: -------------------------------------------------------------------------------- 1 | {"version":1,"strings":[ 2 | {"hash":184019005,"name":"tfrmctdml.caption","sourcebytes":[68,105,97,103,114,97,109],"value":"Diagram"} 3 | ]} 4 | -------------------------------------------------------------------------------- /DML/ImpExp/uFormGenSql.lrj: -------------------------------------------------------------------------------- 1 | {"version":1,"strings":[ 2 | {"hash":6306037,"name":"tfrmctgensql.caption","sourcebytes":[71,101,110,101,114,97,116,101,32,68,97,116,97,98,97,115,101],"value":"Generate Database"}, 3 | {"hash":93105204,"name":"tfrmctgensql.tbsressql.caption","sourcebytes":[82,101,115,117,108,116],"value":"Result"}, 4 | {"hash":216771813,"name":"tfrmctgensql.tbsexecsql.caption","sourcebytes":[69,120,101,99,117,116,101],"value":"Execute"}, 5 | {"hash":5020002,"name":"tfrmctgensql.tbsreserror.caption","sourcebytes":[69,114,114,111,114],"value":"Error"}, 6 | {"hash":182108274,"name":"tfrmctgensql.chkpause.caption","sourcebytes":[83,116,111,112,32,111,110,32,101,114,114,111,114],"value":"Stop on error"}, 7 | {"hash":11197765,"name":"tfrmctgensql.ckbrecreatetable.hint","sourcebytes":[119,105,108,108,32,114,101,110,97,109,101,32,111,108,100,32,116,97,98,108,101],"value":"will rename old table"}, 8 | {"hash":221011971,"name":"tfrmctgensql.ckbrecreatetable.caption","sourcebytes":[82,101,99,114,101,97,116,101,32,116,97,98,108,101,115],"value":"Recreate tables"}, 9 | {"hash":13088,"name":"tfrmctgensql.labelprog.caption","sourcebytes":[48,47,48],"value":"0/0"}, 10 | {"hash":157190611,"name":"tfrmctgensql.label4.caption","sourcebytes":[80,114,111,103,114,101,115,115],"value":"Progress"}, 11 | {"hash":4863637,"name":"tfrmctgensql.btncancel.caption","sourcebytes":[67,108,111,115,101],"value":"Close"}, 12 | {"hash":135490073,"name":"tfrmctgensql.btnbuildsql.caption","sourcebytes":[71,101,110,32,83,81,76,40,38,66,41],"value":"Gen SQL(&B)"}, 13 | {"hash":216772101,"name":"tfrmctgensql.btnexecsql.caption","sourcebytes":[38,69,120,101,99,117,116,101],"value":"&Execute"}, 14 | {"hash":184440485,"name":"tfrmctgensql.btnresum.caption","sourcebytes":[38,73,103,110,111,114,101],"value":"&Ignore"}, 15 | {"hash":174410724,"name":"tfrmctgensql.label1.caption","sourcebytes":[67,111,110,110,101,99,116],"value":"Connect"}, 16 | {"hash":379330,"name":"tfrmctgensql.label2.caption","sourcebytes":[85,115,101,114],"value":"User"}, 17 | {"hash":174410724,"name":"tfrmctgensql.btndblogon.hint","sourcebytes":[67,111,110,110,101,99,116],"value":"Connect"}, 18 | {"hash":12558,"name":"tfrmctgensql.btndblogon.caption","sourcebytes":[46,46,46],"value":"..."}, 19 | {"hash":245215123,"name":"tfrmctgensql.ckbprocoracleseqs.hint","sourcebytes":[67,114,101,97,116,101,32,115,101,113,117,101,110,99,101,32,102,111,114,32,101,97,99,104,32,116,97,98,108,101,44,32,111,114,32,99,104,101,99,107,32,99,117,114,114,101,110,116,45,118,97,108,117,101,32,119,105,116,104,32,112,114,105,109,97,114,121,45,107,101,121,32,102,105,101,108,100,32,32,102,111,114,32,101,120,105,115,116,115,32,115,101,113,117,101,110,99,101,115],"value":"Create sequence for each table, or check current-value with primary-key field for exists sequences"}, 20 | {"hash":71992723,"name":"tfrmctgensql.ckbprocoracleseqs.caption","sourcebytes":[80,114,111,99,101,115,115,32,83,101,113,117,101,110,99,101,115],"value":"Process Sequences"}, 21 | {"hash":95503971,"name":"tfrmctgensql.ckbsketchmode.hint","sourcebytes":[79,110,108,121,32,99,104,101,99,107,32,108,111,103,105,99,97,108,32,116,121,112,101,32,111,102,32,102,105,101,108,100,115,44,32,105,103,110,111,114,105,110,103,32,100,105,102,102,101,114,101,110,99,101,115,32,111,102,32,100,97,116,97,45,108,101,110,103,116,104,115,44,32,112,104,121,115,105,99,97,108,32,116,121,112,101,115,44,32,107,101,121,115,44,32,105,110,100,101,120,101,115,44,32,99,111,109,109,101,110,116,115,44,32,110,117,108,108,97,98,108,101,115,32,97,110,100,32,100,101,102,97,117,108,116,32,118,97,108,117,101,115],"value":"Only check logical type of fields, ignoring differences of data-lengths, physical types, keys, indexes, comments, nullables and default values"}, 22 | {"hash":167590149,"name":"tfrmctgensql.ckbsketchmode.caption","sourcebytes":[83,107,101,116,99,104,32,109,111,100,101],"value":"Sketch mode"}, 23 | {"hash":39591619,"name":"tfrmctgensql.ckbcreateforeignkeys.caption","sourcebytes":[67,114,101,97,116,101,32,102,111,114,101,105,103,110,32,107,101,121,115],"value":"Create foreign keys"}, 24 | {"hash":63275390,"name":"tfrmctgensql.btnlistmenu.hint","sourcebytes":[109,101,110,117,46,46,46],"value":"menu..."}, 25 | {"hash":156399001,"name":"tfrmctgensql.mn_checkselected.caption","sourcebytes":[67,104,101,99,107,47,117,110,99,104,101,99,107,32,40,115,101,108,101,99,116,101,100,41],"value":"Check/uncheck (selected)"}, 26 | {"hash":244062041,"name":"tfrmctgensql.mn_checkall.caption","sourcebytes":[67,104,101,99,107,47,117,110,99,104,101,99,107,32,40,97,108,108,41],"value":"Check/uncheck (all)"}, 27 | {"hash":39368660,"name":"tfrmctgensql.mn_inversesel.caption","sourcebytes":[73,110,118,101,114,115,101,32,115,101,108,101,99,116],"value":"Inverse select"}, 28 | {"hash":77247189,"name":"tfrmctgensql.mnshowphyname.caption","sourcebytes":[83,104,111,119,32,112,104,121,115,105,99,97,108,32,110,97,109,101],"value":"Show physical name"}, 29 | {"hash":143301241,"name":"tfrmctgensql.mn_modeltableinfo.caption","sourcebytes":[84,97,98,108,101,32,112,114,111,112,101,114,116,105,101,115,32,40,77,111,100,101,108,41],"value":"Table properties (Model)"}, 30 | {"hash":52001977,"name":"tfrmctgensql.mn_dbtableinfo.caption","sourcebytes":[84,97,98,108,101,32,112,114,111,112,101,114,116,105,101,115,32,40,68,66,41],"value":"Table properties (DB)"}, 31 | {"hash":171665052,"name":"tfrmctgensql.editselectall1.caption","sourcebytes":[83,101,108,101,99,116,32,38,65,108,108],"value":"Select &All"}, 32 | {"hash":182988884,"name":"tfrmctgensql.editselectall1.hint","sourcebytes":[83,101,108,101,99,116,32,65,108,108,124,83,101,108,101,99,116,115,32,116,104,101,32,101,110,116,105,114,101,32,100,111,99,117,109,101,110,116],"value":"Select All|Selects the entire document"}, 33 | {"hash":174410724,"name":"tfrmctgensql.menuitemdbconn.caption","sourcebytes":[67,111,110,110,101,99,116],"value":"Connect"}, 34 | {"hash":27608884,"name":"tfrmctgensql.menuitemdedicatedconn.caption","sourcebytes":[68,101,100,105,99,97,116,101,100,32,99,111,110,110,101,99,116],"value":"Dedicated connect"}, 35 | {"hash":51756197,"name":"tfrmctgensql.menuitem_virtualdbs.caption","sourcebytes":[86,105,114,116,117,97,108,32,68,97,116,97,98,97,115,101],"value":"Virtual Database"}, 36 | {"hash":140674020,"name":"tfrmctgensql.mn_defdbtype_standard.caption","sourcebytes":[83,84,65,78,68,65,82,68],"value":"STANDARD"} 37 | ]} 38 | -------------------------------------------------------------------------------- /DML/ImpExp/uFormImpTable.lfm: -------------------------------------------------------------------------------- 1 | object frmImportCtTable: TfrmImportCtTable 2 | Left = 366 3 | Height = 561 4 | Top = 167 5 | Width = 846 6 | BorderIcons = [biSystemMenu, biMaximize] 7 | Caption = 'Import Database' 8 | ClientHeight = 561 9 | ClientWidth = 846 10 | Color = clBtnFace 11 | OnCreate = FormCreate 12 | OnDestroy = FormDestroy 13 | OnShow = FormShow 14 | ParentFont = True 15 | Position = poMainFormCenter 16 | LCLVersion = '2.0.12.0' 17 | object Label1: TLabel 18 | Left = 22 19 | Height = 17 20 | Top = 22 21 | Width = 47 22 | Caption = 'Connect' 23 | ParentColor = False 24 | end 25 | object Label2: TLabel 26 | Left = 22 27 | Height = 17 28 | Top = 58 29 | Width = 93 30 | Caption = 'Choose Schema' 31 | ParentColor = False 32 | end 33 | object Label3: TLabel 34 | Left = 22 35 | Height = 17 36 | Top = 131 37 | Width = 47 38 | Caption = 'Objects:' 39 | ParentColor = False 40 | end 41 | object Label4: TLabel 42 | Left = 22 43 | Height = 17 44 | Top = 480 45 | Width = 55 46 | Anchors = [akLeft, akBottom] 47 | Caption = 'Progress:' 48 | ParentColor = False 49 | end 50 | object Label5: TLabel 51 | Left = 22 52 | Height = 17 53 | Top = 96 54 | Width = 28 55 | Caption = 'Filter' 56 | ParentColor = False 57 | end 58 | object LabelProg: TLabel 59 | Left = 128 60 | Height = 17 61 | Top = 515 62 | Width = 19 63 | Anchors = [akLeft, akBottom] 64 | Caption = '0/0' 65 | ParentColor = False 66 | end 67 | object btnOK: TButton 68 | Left = 631 69 | Height = 27 70 | Top = 515 71 | Width = 117 72 | Anchors = [akRight, akBottom] 73 | Caption = 'Start' 74 | OnClick = btnOKClick 75 | TabOrder = 0 76 | end 77 | object btnCancel: TButton 78 | Left = 752 79 | Height = 27 80 | Top = 515 81 | Width = 71 82 | Anchors = [akRight, akBottom] 83 | Cancel = True 84 | Caption = 'Close' 85 | OnClick = btnCancelClick 86 | TabOrder = 1 87 | end 88 | object edtDBLinkInfo: TEdit 89 | Left = 128 90 | Height = 25 91 | Top = 18 92 | Width = 662 93 | Anchors = [akTop, akLeft, akRight] 94 | ParentColor = True 95 | ReadOnly = True 96 | TabOrder = 2 97 | end 98 | object btnDBLogon: TButton 99 | Left = 798 100 | Height = 27 101 | Hint = 'Connect' 102 | Top = 17 103 | Width = 32 104 | Anchors = [akTop, akRight] 105 | AutoSize = True 106 | Caption = '..' 107 | OnClick = btnDBLogonClick 108 | ParentShowHint = False 109 | ShowHint = True 110 | TabOrder = 3 111 | end 112 | object combDBUser: TComboBox 113 | Left = 128 114 | Height = 25 115 | Top = 55 116 | Width = 702 117 | Anchors = [akTop, akLeft, akRight] 118 | DropDownCount = 48 119 | ItemHeight = 17 120 | OnChange = combDBUserChange 121 | TabOrder = 4 122 | end 123 | object cklbDbObjs: TCheckListBox 124 | Left = 128 125 | Height = 278 126 | Top = 132 127 | Width = 702 128 | Anchors = [akTop, akLeft, akRight, akBottom] 129 | Columns = 3 130 | ItemHeight = 0 131 | OnDblClick = cklbDbObjsDblClick 132 | PopupMenu = PopupMenu1 133 | TabOrder = 5 134 | end 135 | object ProgressBar1: TProgressBar 136 | Left = 128 137 | Height = 23 138 | Top = 480 139 | Width = 702 140 | Anchors = [akLeft, akRight, akBottom] 141 | TabOrder = 9 142 | end 143 | object combObjFilter: TComboBox 144 | Left = 128 145 | Height = 25 146 | Top = 93 147 | Width = 702 148 | Anchors = [akTop, akLeft, akRight] 149 | DropDownCount = 48 150 | ItemHeight = 17 151 | Items.Strings = ( 152 | '(Show all objects)' 153 | '(Objects not exist in DML)' 154 | '(Objects exist in DML)' 155 | ) 156 | OnChange = combObjFilterChange 157 | TabOrder = 10 158 | end 159 | object ckbAutoCapitalize: TCheckBox 160 | Left = 352 161 | Height = 21 162 | Top = 418 163 | Width = 107 164 | Anchors = [akLeft, akBottom] 165 | Caption = 'Auto capitalize' 166 | TabOrder = 6 167 | end 168 | object ckbComments2DisplayName: TCheckBox 169 | Left = 504 170 | Height = 21 171 | Top = 418 172 | Width = 176 173 | Anchors = [akLeft, akBottom] 174 | Caption = 'Comments as Logic-Name' 175 | Checked = True 176 | State = cbChecked 177 | TabOrder = 7 178 | end 179 | object ckbImportDbTypeNames: TCheckBox 180 | Left = 128 181 | Height = 21 182 | Top = 418 183 | Width = 164 184 | Anchors = [akLeft, akBottom] 185 | Caption = 'Import data-type names' 186 | TabOrder = 11 187 | end 188 | object ckbOverwriteExists: TCheckBox 189 | Left = 128 190 | Height = 21 191 | Top = 448 192 | Width = 147 193 | Anchors = [akLeft, akBottom] 194 | Caption = 'Overwrite exist tables' 195 | TabOrder = 8 196 | end 197 | object ckbCheckAll: TCheckBox 198 | Left = 24 199 | Height = 21 200 | Top = 184 201 | Width = 74 202 | Caption = 'Check all' 203 | Checked = True 204 | OnChange = ckbCheckAllChange 205 | State = cbChecked 206 | TabOrder = 12 207 | end 208 | object lbTbCount: TLabel 209 | Left = 28 210 | Height = 17 211 | Top = 156 212 | Width = 45 213 | Caption = '(0 total)' 214 | Font.Color = clGrayText 215 | ParentColor = False 216 | ParentFont = False 217 | ParentShowHint = False 218 | ShowHint = True 219 | end 220 | object PopupMenu1: TPopupMenu 221 | OnPopup = PopupMenu1Popup 222 | left = 176 223 | top = 165 224 | object MN_CheckSelected: TMenuItem 225 | AutoCheck = True 226 | Caption = 'Check/uncheck (selected)' 227 | OnClick = MN_CheckSelectedClick 228 | end 229 | object MN_CheckAll: TMenuItem 230 | AutoCheck = True 231 | Caption = 'Check/uncheck (all)' 232 | OnClick = MN_CheckAllClick 233 | end 234 | object MN_InverseSel: TMenuItem 235 | Caption = 'Inverse selection' 236 | OnClick = MN_InverseSelClick 237 | end 238 | object MenuItem2: TMenuItem 239 | Caption = '-' 240 | end 241 | object MN_TableProps: TMenuItem 242 | Caption = 'Table propperties' 243 | Default = True 244 | OnClick = MN_TablePropsClick 245 | end 246 | end 247 | object TimerInit: TTimer 248 | Interval = 500 249 | OnTimer = TimerInitTimer 250 | left = 208 251 | top = 232 252 | end 253 | object SaveDialog1: TSaveDialog 254 | DefaultExt = '.dbk' 255 | Filter = 'Database backup files(*.dbk)|*.dbk' 256 | Options = [ofOverwritePrompt, ofHideReadOnly, ofEnableSizing] 257 | left = 232 258 | top = 165 259 | end 260 | object PopupMenuDbConn: TPopupMenu 261 | left = 760 262 | top = 68 263 | object MenuItemDbConn: TMenuItem 264 | Caption = 'Connect' 265 | Default = True 266 | OnClick = MenuItemDbConnClick 267 | end 268 | object MenuItemDedicatedConn: TMenuItem 269 | Caption = 'Dedicated connect' 270 | OnClick = MenuItemDedicatedConnClick 271 | end 272 | end 273 | end 274 | -------------------------------------------------------------------------------- /DML/ImpExp/uFormImpTable.lrj: -------------------------------------------------------------------------------- 1 | {"version":1,"strings":[ 2 | {"hash":265206901,"name":"tfrmimportcttable.caption","sourcebytes":[73,109,112,111,114,116,32,68,97,116,97,98,97,115,101],"value":"Import Database"}, 3 | {"hash":174410724,"name":"tfrmimportcttable.label1.caption","sourcebytes":[67,111,110,110,101,99,116],"value":"Connect"}, 4 | {"hash":208634625,"name":"tfrmimportcttable.label2.caption","sourcebytes":[67,104,111,111,115,101,32,83,99,104,101,109,97],"value":"Choose Schema"}, 5 | {"hash":151760442,"name":"tfrmimportcttable.label3.caption","sourcebytes":[79,98,106,101,99,116,115,58],"value":"Objects:"}, 6 | {"hash":99130874,"name":"tfrmimportcttable.label4.caption","sourcebytes":[80,114,111,103,114,101,115,115,58],"value":"Progress:"}, 7 | {"hash":80755394,"name":"tfrmimportcttable.label5.caption","sourcebytes":[70,105,108,116,101,114],"value":"Filter"}, 8 | {"hash":13088,"name":"tfrmimportcttable.labelprog.caption","sourcebytes":[48,47,48],"value":"0/0"}, 9 | {"hash":5941396,"name":"tfrmimportcttable.btnok.caption","sourcebytes":[83,116,97,114,116],"value":"Start"}, 10 | {"hash":4863637,"name":"tfrmimportcttable.btncancel.caption","sourcebytes":[67,108,111,115,101],"value":"Close"}, 11 | {"hash":174410724,"name":"tfrmimportcttable.btndblogon.hint","sourcebytes":[67,111,110,110,101,99,116],"value":"Connect"}, 12 | {"hash":782,"name":"tfrmimportcttable.btndblogon.caption","sourcebytes":[46,46],"value":".."}, 13 | {"hash":196280757,"name":"tfrmimportcttable.ckbautocapitalize.caption","sourcebytes":[65,117,116,111,32,99,97,112,105,116,97,108,105,122,101],"value":"Auto capitalize"}, 14 | {"hash":81265349,"name":"tfrmimportcttable.ckbcomments2displayname.caption","sourcebytes":[67,111,109,109,101,110,116,115,32,97,115,32,76,111,103,105,99,45,78,97,109,101],"value":"Comments as Logic-Name"}, 15 | {"hash":199470419,"name":"tfrmimportcttable.ckbimportdbtypenames.caption","sourcebytes":[73,109,112,111,114,116,32,100,97,116,97,45,116,121,112,101,32,110,97,109,101,115],"value":"Import data-type names"}, 16 | {"hash":143064595,"name":"tfrmimportcttable.ckboverwriteexists.caption","sourcebytes":[79,118,101,114,119,114,105,116,101,32,101,120,105,115,116,32,116,97,98,108,101,115],"value":"Overwrite exist tables"}, 17 | {"hash":194850764,"name":"tfrmimportcttable.ckbcheckall.caption","sourcebytes":[67,104,101,99,107,32,97,108,108],"value":"Check all"}, 18 | {"hash":129404105,"name":"tfrmimportcttable.lbtbcount.caption","sourcebytes":[40,48,32,116,111,116,97,108,41],"value":"(0 total)"}, 19 | {"hash":156399001,"name":"tfrmimportcttable.mn_checkselected.caption","sourcebytes":[67,104,101,99,107,47,117,110,99,104,101,99,107,32,40,115,101,108,101,99,116,101,100,41],"value":"Check/uncheck (selected)"}, 20 | {"hash":244062041,"name":"tfrmimportcttable.mn_checkall.caption","sourcebytes":[67,104,101,99,107,47,117,110,99,104,101,99,107,32,40,97,108,108,41],"value":"Check/uncheck (all)"}, 21 | {"hash":192777182,"name":"tfrmimportcttable.mn_inversesel.caption","sourcebytes":[73,110,118,101,114,115,101,32,115,101,108,101,99,116,105,111,110],"value":"Inverse selection"}, 22 | {"hash":31957139,"name":"tfrmimportcttable.mn_tableprops.caption","sourcebytes":[84,97,98,108,101,32,112,114,111,112,112,101,114,116,105,101,115],"value":"Table propperties"}, 23 | {"hash":174410724,"name":"tfrmimportcttable.menuitemdbconn.caption","sourcebytes":[67,111,110,110,101,99,116],"value":"Connect"}, 24 | {"hash":27608884,"name":"tfrmimportcttable.menuitemdedicatedconn.caption","sourcebytes":[68,101,100,105,99,97,116,101,100,32,99,111,110,110,101,99,116],"value":"Dedicated connect"} 25 | ]} 26 | -------------------------------------------------------------------------------- /DML/Props/uFormAddCtFields.lfm: -------------------------------------------------------------------------------- 1 | object frmAddCtFields: TfrmAddCtFields 2 | Left = 335 3 | Height = 326 4 | Top = 265 5 | Width = 444 6 | BorderIcons = [biSystemMenu] 7 | BorderStyle = bsDialog 8 | Caption = 'Add system fields' 9 | ClientHeight = 326 10 | ClientWidth = 444 11 | Color = clBtnFace 12 | OnCloseQuery = FormCloseQuery 13 | OnCreate = FormCreate 14 | OnDestroy = FormDestroy 15 | OnShow = FormShow 16 | ParentFont = True 17 | Position = poMainFormCenter 18 | LCLVersion = '2.0.4.0' 19 | object Label2: TLabel 20 | Left = 17 21 | Height = 13 22 | Top = 11 23 | Width = 102 24 | Caption = 'Choose fields to add:' 25 | ParentColor = False 26 | end 27 | object btnOK: TButton 28 | Left = 280 29 | Height = 23 30 | Top = 283 31 | Width = 40 32 | AutoSize = True 33 | Caption = 'OK' 34 | Default = True 35 | ModalResult = 1 36 | TabOrder = 0 37 | end 38 | object btnCancel: TButton 39 | Left = 356 40 | Height = 23 41 | Top = 283 42 | Width = 58 43 | AutoSize = True 44 | Cancel = True 45 | Caption = 'Cancel' 46 | ModalResult = 2 47 | TabOrder = 1 48 | end 49 | object cklbFields: TCheckListBox 50 | Left = 17 51 | Height = 226 52 | Top = 39 53 | Width = 409 54 | Columns = 3 55 | ItemHeight = 0 56 | TabOrder = 2 57 | end 58 | object ckbSelAll: TCheckBox 59 | Left = 17 60 | Height = 21 61 | Top = 282 62 | Width = 64 63 | Caption = 'Select all' 64 | OnClick = ckbSelAllClick 65 | TabOrder = 3 66 | end 67 | object rdbFNameTp1: TRadioButton 68 | Left = 265 69 | Height = 21 70 | Top = 9 71 | Width = 55 72 | Caption = 'English' 73 | OnClick = rdgFNameTpClick 74 | TabOrder = 4 75 | end 76 | object rdbFNameTp2: TRadioButton 77 | Left = 352 78 | Height = 21 79 | Top = 9 80 | Width = 46 81 | Caption = 'Local' 82 | Checked = True 83 | OnClick = rdgFNameTpClick 84 | TabOrder = 5 85 | TabStop = True 86 | end 87 | end 88 | -------------------------------------------------------------------------------- /DML/Props/uFormAddCtFields.lrj: -------------------------------------------------------------------------------- 1 | {"version":1,"strings":[ 2 | {"hash":226676531,"name":"tfrmaddctfields.caption","sourcebytes":[65,100,100,32,115,121,115,116,101,109,32,102,105,101,108,100,115],"value":"Add system fields"}, 3 | {"hash":83750970,"name":"tfrmaddctfields.label2.caption","sourcebytes":[67,104,111,111,115,101,32,102,105,101,108,100,115,32,116,111,32,97,100,100,58],"value":"Choose fields to add:"}, 4 | {"hash":1339,"name":"tfrmaddctfields.btnok.caption","sourcebytes":[79,75],"value":"OK"}, 5 | {"hash":77089212,"name":"tfrmaddctfields.btncancel.caption","sourcebytes":[67,97,110,99,101,108],"value":"Cancel"}, 6 | {"hash":195296268,"name":"tfrmaddctfields.ckbselall.caption","sourcebytes":[83,101,108,101,99,116,32,97,108,108],"value":"Select all"}, 7 | {"hash":206450904,"name":"tfrmaddctfields.rdbfnametp1.caption","sourcebytes":[69,110,103,108,105,115,104],"value":"English"}, 8 | {"hash":5462396,"name":"tfrmaddctfields.rdbfnametp2.caption","sourcebytes":[76,111,99,97,108],"value":"Local"} 9 | ]} 10 | -------------------------------------------------------------------------------- /DML/Props/uFormAddCtFields.pas: -------------------------------------------------------------------------------- 1 | unit uFormAddCtFields; 2 | 3 | {$MODE Delphi} 4 | 5 | interface 6 | 7 | uses 8 | LCLIntf, LCLType, LMessages, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, 9 | Dialogs, StdCtrls, ExtCtrls, CheckLst, 10 | CtMetaTable; 11 | 12 | type 13 | 14 | { TfrmAddCtFields } 15 | 16 | TfrmAddCtFields = class(TForm) 17 | btnOK: TButton; 18 | btnCancel: TButton; 19 | Label2: TLabel; 20 | cklbFields: TCheckListBox; 21 | ckbSelAll: TCheckBox; 22 | rdbFNameTp1: TRadioButton; 23 | rdbFNameTp2: TRadioButton; 24 | procedure FormDestroy(Sender: TObject); 25 | procedure FormShow(Sender: TObject); 26 | procedure rdgFNameTpClick(Sender: TObject); 27 | procedure ckbSelAllClick(Sender: TObject); 28 | procedure FormCloseQuery(Sender: TObject; var CanClose: Boolean); 29 | procedure FormCreate(Sender: TObject); 30 | private 31 | { Private declarations } 32 | FOrginalCaption: string; 33 | FTemplateTb: TCtMetaTable; 34 | public 35 | { Public declarations } 36 | procedure LoadFromTb(tb: TCtMetaTable); 37 | procedure SaveToTb(tb: TCtMetaTable); 38 | end; 39 | 40 | implementation 41 | 42 | uses CTMetaData, WindowFuncs; 43 | 44 | {$R *.lfm} 45 | 46 | 47 | procedure TfrmAddCtFields.rdgFNameTpClick(Sender: TObject); 48 | var 49 | K: Integer; 50 | S: string; 51 | fd: TCtMetaField; 52 | begin 53 | for K := 0 to FTemplateTb.MetaFields.Count - 1 do 54 | begin 55 | fd := FTemplateTb.MetaFields.Items[K]; 56 | if rdbFNameTp1.Checked then 57 | S := fd.Name 58 | else 59 | begin 60 | S := fd.DisplayName; 61 | if S = '' then 62 | S := fd.Name; 63 | end; 64 | cklbFields.Items.Strings[K] := S; 65 | end; 66 | end; 67 | 68 | procedure TfrmAddCtFields.ckbSelAllClick(Sender: TObject); 69 | var 70 | I: Integer; 71 | begin 72 | for I := 0 to cklbFields.Items.Count - 1 do 73 | cklbFields.Checked[I] := ckbSelAll.Checked; 74 | end; 75 | 76 | procedure TfrmAddCtFields.LoadFromTb(tb: TCtMetaTable); 77 | begin 78 | Caption := FOrginalCaption + ' - ' + tb.DisplayText; 79 | end; 80 | 81 | procedure TfrmAddCtFields.SaveToTb(tb: TCtMetaTable); 82 | var 83 | I, K: Integer; 84 | S: string; 85 | fd: TCtMetaField; 86 | begin 87 | if not Assigned(tb) then 88 | Exit; 89 | for I := 0 to cklbFields.Items.Count - 1 do 90 | if cklbFields.Checked[I] then 91 | begin 92 | S := cklbFields.Items[I]; 93 | if tb.MetaFields.FieldByName(S) <> nil then 94 | Continue; 95 | K := Integer(cklbFields.Items.Objects[i]); 96 | fd := FTemplateTb.MetaFields.Items[K]; 97 | with tb.MetaFields.NewMetaField do 98 | begin 99 | Name := fd.Name; 100 | DisplayName := fd.DisplayName; 101 | if rdbFNameTp2.Checked then 102 | if fd.DisplayName <> '' then 103 | begin 104 | Name := fd.DisplayName; 105 | DisplayName := fd.Name; 106 | end; 107 | KeyFieldType := fd.KeyFieldType; 108 | DataType := fd.DataType; 109 | DataLength := fd.DataLength; 110 | DataScale := fd.DataScale; 111 | Nullable := fd.Nullable; 112 | IndexType := fd.IndexType; 113 | DefaultValue := fd.DefaultValue; 114 | S := fd.Memo; 115 | if Pos('[DefSelected]', S) > 0 then 116 | S := StringReplace(S, '[DefSelected]', '', []); 117 | Memo := S; 118 | end; 119 | end; 120 | end; 121 | 122 | procedure TfrmAddCtFields.FormCloseQuery(Sender: TObject; 123 | var CanClose: Boolean); 124 | var 125 | I: Integer; 126 | begin 127 | if ModalResult = mrOk then 128 | begin 129 | CanClose := False; 130 | for I := 0 to cklbFields.Items.Count - 1 do 131 | if cklbFields.Checked[I] then 132 | CanClose := True; 133 | end; 134 | end; 135 | 136 | procedure TfrmAddCtFields.FormCreate(Sender: TObject); 137 | const 138 | DEF_SELECTED_FIELD: array[0..7] of TCtKeyFieldType = ( 139 | cfktId, 140 | cfktRid, 141 | cfktCaption, 142 | cfktComment, 143 | cfktOrgId, 144 | cfktCreatorId, 145 | cfktCreateDate, 146 | cfktDataLevel); 147 | function KeyDefSelected(K: TCtKeyFieldType): Boolean; 148 | var 149 | x: Integer; 150 | begin 151 | for x := 0 to 7 do 152 | if K = DEF_SELECTED_FIELD[x] then 153 | begin 154 | Result := True; 155 | Exit; 156 | end; 157 | Result := False; 158 | end; 159 | var 160 | I: TCtKeyFieldType; 161 | K, V: Integer; 162 | fn, S: string; 163 | ss: TStrings; 164 | fd: TCtMetaField; 165 | begin 166 | FTemplateTb := TCtMetaTable.Create; 167 | fn := GetFolderPathOfAppExe('Templates'); 168 | fn := FolderAddFileName(fn, 'add_system_fields.txt'); 169 | fn := GetConfigFile_OfLang(fn); 170 | if FileExists(fn) then 171 | begin 172 | ss := TStringList.Create; 173 | try 174 | ss.LoadFromFile(fn); 175 | S := ss.Text; 176 | if Copy(S, 1, 2) = #$FE#$FF then 177 | Delete(S, 1, 2) 178 | else if Copy(S, 1, 2) = #$FE#$FE then 179 | Delete(S, 1, 2) 180 | else if Copy(S, 1, 3) = #$EF#$BB#$BF then 181 | Delete(S, 1, 3); 182 | FTemplateTb.Describe := S; 183 | finally 184 | ss.Free; 185 | end; 186 | end; 187 | 188 | if FTemplateTb.MetaFields.Count = 0 then 189 | begin 190 | for I := cfktId to cfktOrderNo do 191 | begin 192 | fd := FTemplateTb.MetaFields.NewMetaField; 193 | fd.Name := DEF_CTMETAFIELD_KEYFIELD_NAMES_ENG[I]; 194 | fd.DisplayName := DEF_CTMETAFIELD_KEYFIELD_NAMES_CHN[I]; 195 | fd.KeyFieldType := I; 196 | fd.DataType := DEF_CTMETAFIELD_KEYFIELD_TYPES[I]; 197 | if KeyDefSelected(I) then 198 | fd.Memo := '[DefSelected]'; 199 | end; 200 | 201 | end; 202 | 203 | FOrginalCaption := Caption; 204 | cklbFields.Items.Clear; 205 | for K := 0 to FTemplateTb.MetaFields.Count - 1 do 206 | begin 207 | fd := FTemplateTb.MetaFields.Items[K]; 208 | if rdbFNameTp1.Checked then 209 | V := cklbFields.Items.AddObject(fd.Name, TObject(K)) 210 | else 211 | begin 212 | S := fd.DisplayName; 213 | if S = '' then 214 | S := fd.Name; 215 | V := cklbFields.Items.AddObject(S, TObject(K)); 216 | end; 217 | if Pos('[DefSelected]', fd.Memo) > 0 then 218 | cklbFields.Checked[V] := True 219 | else 220 | cklbFields.Checked[V] := False; 221 | end; 222 | rdbFNameTp1.Checked := True; 223 | end; 224 | 225 | procedure TfrmAddCtFields.FormDestroy(Sender: TObject); 226 | begin 227 | FTemplateTb.Free; 228 | end; 229 | 230 | procedure TfrmAddCtFields.FormShow(Sender: TObject); 231 | begin 232 | btnOk.Left:= btnCancel.Left - btnOk.Width - 10; 233 | end; 234 | 235 | end. 236 | 237 | -------------------------------------------------------------------------------- /DML/Props/uFormCtFieldProp.lfm: -------------------------------------------------------------------------------- 1 | object frmCtMetaFieldProp: TfrmCtMetaFieldProp 2 | Left = 535 3 | Height = 606 4 | Top = 158 5 | Width = 614 6 | BorderIcons = [biSystemMenu, biMaximize] 7 | Caption = 'Field properties' 8 | ClientHeight = 606 9 | ClientWidth = 614 10 | Constraints.MinHeight = 543 11 | Constraints.MinWidth = 524 12 | OnCloseQuery = FormCloseQuery 13 | OnCreate = FormCreate 14 | OnDestroy = FormDestroy 15 | OnShow = FormShow 16 | ParentFont = True 17 | Position = poMainFormCenter 18 | LCLVersion = '2.0.12.0' 19 | object Panel1: TPanel 20 | Left = 0 21 | Height = 36 22 | Top = 562 23 | Width = 614 24 | Align = alBottom 25 | AutoSize = True 26 | BevelOuter = bvNone 27 | BorderWidth = 4 28 | ClientHeight = 36 29 | ClientWidth = 614 30 | TabOrder = 0 31 | object btnOk: TButton 32 | Left = 403 33 | Height = 27 34 | Top = 4 35 | Width = 108 36 | Anchors = [akTop, akRight] 37 | Caption = 'OK' 38 | OnClick = btnOkClick 39 | TabOrder = 0 40 | end 41 | object btnCancel: TButton 42 | Left = 539 43 | Height = 27 44 | Top = 4 45 | Width = 64 46 | Anchors = [akTop, akRight] 47 | Cancel = True 48 | Caption = 'Cancel' 49 | ModalResult = 2 50 | OnClick = btnCancelClick 51 | TabOrder = 1 52 | end 53 | object Label1: TLabel 54 | Left = 4 55 | Height = 17 56 | Top = 15 57 | Width = 4 58 | Caption = ' ' 59 | ParentColor = False 60 | end 61 | end 62 | object Panel2: TPanel 63 | Left = 0 64 | Height = 8 65 | Top = 598 66 | Width = 614 67 | Align = alBottom 68 | BevelOuter = bvNone 69 | TabOrder = 1 70 | end 71 | object ActionList1: TActionList 72 | left = 16 73 | top = 28 74 | object EditSelectAll1: TEditSelectAll 75 | Category = 'Edit' 76 | Caption = 'Select &All' 77 | Hint = 'Select All|Selects the entire document' 78 | ShortCut = 16449 79 | end 80 | end 81 | end 82 | -------------------------------------------------------------------------------- /DML/Props/uFormCtFieldProp.lrj: -------------------------------------------------------------------------------- 1 | {"version":1,"strings":[ 2 | {"hash":78255971,"name":"tfrmctmetafieldprop.caption","sourcebytes":[70,105,101,108,100,32,112,114,111,112,101,114,116,105,101,115],"value":"Field properties"}, 3 | {"hash":1339,"name":"tfrmctmetafieldprop.btnok.caption","sourcebytes":[79,75],"value":"OK"}, 4 | {"hash":77089212,"name":"tfrmctmetafieldprop.btncancel.caption","sourcebytes":[67,97,110,99,101,108],"value":"Cancel"}, 5 | {"hash":32,"name":"tfrmctmetafieldprop.label1.caption","sourcebytes":[32],"value":" "}, 6 | {"hash":171665052,"name":"tfrmctmetafieldprop.editselectall1.caption","sourcebytes":[83,101,108,101,99,116,32,38,65,108,108],"value":"Select &All"}, 7 | {"hash":182988884,"name":"tfrmctmetafieldprop.editselectall1.hint","sourcebytes":[83,101,108,101,99,116,32,65,108,108,124,83,101,108,101,99,116,115,32,116,104,101,32,101,110,116,105,114,101,32,100,111,99,117,109,101,110,116],"value":"Select All|Selects the entire document"} 8 | ]} 9 | -------------------------------------------------------------------------------- /DML/Props/uFormCtTableProp.lfm: -------------------------------------------------------------------------------- 1 | object frmCtTableProp: TfrmCtTableProp 2 | Left = 405 3 | Height = 678 4 | Top = 140 5 | Width = 1037 6 | BorderIcons = [biSystemMenu, biMaximize] 7 | Caption = 'Table properties' 8 | ClientHeight = 678 9 | ClientWidth = 1037 10 | OnClose = FormClose 11 | OnCloseQuery = FormCloseQuery 12 | OnCreate = FormCreate 13 | OnDeactivate = FormDeactivate 14 | OnDestroy = FormDestroy 15 | OnShow = FormShow 16 | LCLVersion = '2.0.12.0' 17 | object Panel1: TPanel 18 | Left = 0 19 | Height = 35 20 | Top = 635 21 | Width = 1037 22 | Align = alBottom 23 | AutoSize = True 24 | BevelOuter = bvNone 25 | BorderWidth = 4 26 | ClientHeight = 35 27 | ClientWidth = 1037 28 | ParentFont = False 29 | TabOrder = 0 30 | object btnOk: TButton 31 | Left = 772 32 | Height = 27 33 | Top = 4 34 | Width = 132 35 | Anchors = [akTop, akRight] 36 | Caption = 'OK' 37 | OnClick = btnOkClick 38 | ParentFont = False 39 | TabOrder = 0 40 | end 41 | object btnCancel: TButton 42 | Left = 916 43 | Height = 27 44 | Top = 4 45 | Width = 64 46 | Anchors = [akTop, akRight] 47 | Caption = 'Cancel' 48 | OnClick = btnCancelClick 49 | ParentFont = False 50 | TabOrder = 1 51 | end 52 | object btnCapitalize: TButton 53 | Left = 12 54 | Height = 27 55 | Top = 4 56 | Width = 102 57 | Caption = 'Capitalize' 58 | OnClick = btnCapitalizeClick 59 | ParentFont = False 60 | TabOrder = 2 61 | end 62 | object Label1: TLabel 63 | Left = 4 64 | Height = 17 65 | Top = 10 66 | Width = 4 67 | Caption = ' ' 68 | ParentColor = False 69 | ParentFont = False 70 | end 71 | object btnNewTbTemplate: TButton 72 | Left = 128 73 | Height = 27 74 | Top = 4 75 | Width = 102 76 | Caption = 'Template...' 77 | OnClick = btnNewTbTemplateClick 78 | ParentFont = False 79 | TabOrder = 3 80 | Visible = False 81 | end 82 | end 83 | object Panel2: TPanel 84 | Left = 0 85 | Height = 8 86 | Top = 670 87 | Width = 1037 88 | Align = alBottom 89 | BevelOuter = bvNone 90 | ParentFont = False 91 | TabOrder = 1 92 | end 93 | object bbtnView: TBitBtn 94 | Left = 1000 95 | Height = 21 96 | Hint = 'Switch to Multi-View mode' 97 | Top = 9 98 | Width = 24 99 | Anchors = [akTop, akRight] 100 | Glyph.Data = { 101 | 6A010000424D6A010000000000003600000028000000070000000B0000000100 102 | 2000000000003401000064000000640000000000000000000000FFFFFF00FFFF 103 | FF00FFFFFF007F7F7FFFFFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF 104 | FF007F7F7FFFFFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF007F7F 105 | 7FFFFFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF007F7F7FFFFFFF 106 | FF00FFFFFF00FFFFFF007F7F7FFF7F7F7FFF7F7F7FFF7F7F7FFF7F7F7FFF7F7F 107 | 7FFF7F7F7FFFFFFFFF007F7F7FFFFCFCFCFFFCFCFCFF7F7F7FFF7F7F7FFFFFFF 108 | FF00FFFFFF007F7F7FFFFCFCFCFFFCFCFCFF7F7F7FFF7F7F7FFFFFFFFF00FFFF 109 | FF007F7F7FFFFCFCFCFFFCFCFCFF7F7F7FFF7F7F7FFFFFFFFF00FFFFFF007F7F 110 | 7FFFFCFCFCFFFCFCFCFF7F7F7FFF7F7F7FFFFFFFFF00FFFFFF007F7F7FFF7F7F 111 | 7FFF7F7F7FFF7F7F7FFF7F7F7FFFFFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF 112 | FF00FFFFFF00FFFFFF00FFFFFF00 113 | } 114 | Layout = blGlyphBottom 115 | OnClick = bbtnViewClick 116 | ParentFont = False 117 | ParentShowHint = False 118 | ShowHint = True 119 | TabOrder = 2 120 | end 121 | object ActionList1: TActionList 122 | left = 36 123 | top = 56 124 | object EditSelectAll1: TEditSelectAll 125 | Category = 'Edit' 126 | Caption = 'Select &All' 127 | Hint = 'Select All|Selects the entire document' 128 | ShortCut = 16449 129 | end 130 | object actCapUppercase: TAction 131 | Caption = 'All Upper Case' 132 | OnExecute = actCapUppercaseExecute 133 | end 134 | object actCapLowercase: TAction 135 | Caption = 'All Lower Case' 136 | OnExecute = actCapLowercaseExecute 137 | end 138 | object actAutoCapitalize: TAction 139 | Caption = 'Auto Capitalize' 140 | OnExecute = actAutoCapitalizeExecute 141 | end 142 | object actExchangeDispComm: TAction 143 | Caption = 'Comments to Logic-Name' 144 | OnExecute = actExchangeDispCommExecute 145 | end 146 | object actExchangeNameDisp: TAction 147 | Caption = 'Name to Logic-Name' 148 | OnExecute = actExchangeNameDispExecute 149 | end 150 | object actCheckWithMyDict: TAction 151 | Caption = 'Check with MyDict.txt' 152 | OnExecute = actCheckWithMyDictExecute 153 | end 154 | object actConvertChnToPy: TAction 155 | Caption = 'Convert Chinese to PinYin' 156 | OnExecute = actConvertChnToPyExecute 157 | end 158 | object actCameCaselToUnderline: TAction 159 | Caption = 'Camel-Case to Underline' 160 | OnExecute = actCameCaselToUnderlineExecute 161 | end 162 | object actUnderlineToCamelCase: TAction 163 | Caption = 'Underline to Camel-Case' 164 | OnExecute = actUnderlineToCamelCaseExecute 165 | end 166 | object actCnWordSegment: TAction 167 | Caption = 'Chinese word segment' 168 | OnExecute = actCnWordSegmentExecute 169 | end 170 | end 171 | object PopupMenu1: TPopupMenu 172 | left = 36 173 | top = 88 174 | object AutoCapitalize1: TMenuItem 175 | Action = actAutoCapitalize 176 | end 177 | object AllUpperCase1: TMenuItem 178 | Action = actCapUppercase 179 | end 180 | object AllLowerCase1: TMenuItem 181 | Action = actCapLowercase 182 | end 183 | object MenuItem1: TMenuItem 184 | Action = actCameCaselToUnderline 185 | end 186 | object MenuItem2: TMenuItem 187 | Action = actUnderlineToCamelCase 188 | end 189 | object MNCnWordSegment: TMenuItem 190 | Action = actCnWordSegment 191 | end 192 | object ConvertChinesetoPinYin1: TMenuItem 193 | Action = actConvertChnToPy 194 | end 195 | object CheckwithMyDicttxt1: TMenuItem 196 | Action = actCheckWithMyDict 197 | end 198 | object N1: TMenuItem 199 | Caption = '-' 200 | end 201 | object CommentstoDisplayName1: TMenuItem 202 | Action = actExchangeDispComm 203 | end 204 | object NametoDisplayName1: TMenuItem 205 | Action = actExchangeNameDisp 206 | end 207 | end 208 | object TimerDelayCmd: TTimer 209 | Enabled = False 210 | Interval = 100 211 | OnTimer = TimerDelayCmdTimer 212 | left = 107 213 | top = 203 214 | end 215 | object PopupMenuNewTbTmpls: TPopupMenu 216 | left = 126 217 | top = 326 218 | end 219 | end 220 | -------------------------------------------------------------------------------- /DML/Props/uFormCtTableProp.lrj: -------------------------------------------------------------------------------- 1 | {"version":1,"strings":[ 2 | {"hash":79384371,"name":"tfrmcttableprop.caption","sourcebytes":[84,97,98,108,101,32,112,114,111,112,101,114,116,105,101,115],"value":"Table properties"}, 3 | {"hash":1339,"name":"tfrmcttableprop.btnok.caption","sourcebytes":[79,75],"value":"OK"}, 4 | {"hash":77089212,"name":"tfrmcttableprop.btncancel.caption","sourcebytes":[67,97,110,99,101,108],"value":"Cancel"}, 5 | {"hash":10799477,"name":"tfrmcttableprop.btncapitalize.caption","sourcebytes":[67,97,112,105,116,97,108,105,122,101],"value":"Capitalize"}, 6 | {"hash":32,"name":"tfrmcttableprop.label1.caption","sourcebytes":[32],"value":" "}, 7 | {"hash":47236478,"name":"tfrmcttableprop.btnnewtbtemplate.caption","sourcebytes":[84,101,109,112,108,97,116,101,46,46,46],"value":"Template..."}, 8 | {"hash":40825861,"name":"tfrmcttableprop.bbtnview.hint","sourcebytes":[83,119,105,116,99,104,32,116,111,32,77,117,108,116,105,45,86,105,101,119,32,109,111,100,101],"value":"Switch to Multi-View mode"}, 9 | {"hash":171665052,"name":"tfrmcttableprop.editselectall1.caption","sourcebytes":[83,101,108,101,99,116,32,38,65,108,108],"value":"Select &All"}, 10 | {"hash":182988884,"name":"tfrmcttableprop.editselectall1.hint","sourcebytes":[83,101,108,101,99,116,32,65,108,108,124,83,101,108,101,99,116,115,32,116,104,101,32,101,110,116,105,114,101,32,100,111,99,117,109,101,110,116],"value":"Select All|Selects the entire document"}, 11 | {"hash":245455733,"name":"tfrmcttableprop.actcapuppercase.caption","sourcebytes":[65,108,108,32,85,112,112,101,114,32,67,97,115,101],"value":"All Upper Case"}, 12 | {"hash":245476037,"name":"tfrmcttableprop.actcaplowercase.caption","sourcebytes":[65,108,108,32,76,111,119,101,114,32,67,97,115,101],"value":"All Lower Case"}, 13 | {"hash":196411829,"name":"tfrmcttableprop.actautocapitalize.caption","sourcebytes":[65,117,116,111,32,67,97,112,105,116,97,108,105,122,101],"value":"Auto Capitalize"}, 14 | {"hash":93848277,"name":"tfrmcttableprop.actexchangedispcomm.caption","sourcebytes":[67,111,109,109,101,110,116,115,32,116,111,32,76,111,103,105,99,45,78,97,109,101],"value":"Comments to Logic-Name"}, 15 | {"hash":253584997,"name":"tfrmcttableprop.actexchangenamedisp.caption","sourcebytes":[78,97,109,101,32,116,111,32,76,111,103,105,99,45,78,97,109,101],"value":"Name to Logic-Name"}, 16 | {"hash":245179316,"name":"tfrmcttableprop.actcheckwithmydict.caption","sourcebytes":[67,104,101,99,107,32,119,105,116,104,32,77,121,68,105,99,116,46,116,120,116],"value":"Check with MyDict.txt"}, 17 | {"hash":97869950,"name":"tfrmcttableprop.actconvertchntopy.caption","sourcebytes":[67,111,110,118,101,114,116,32,67,104,105,110,101,115,101,32,116,111,32,80,105,110,89,105,110],"value":"Convert Chinese to PinYin"}, 18 | {"hash":63602373,"name":"tfrmcttableprop.actcamecaseltounderline.caption","sourcebytes":[67,97,109,101,108,45,67,97,115,101,32,116,111,32,85,110,100,101,114,108,105,110,101],"value":"Camel-Case to Underline"}, 19 | {"hash":261161749,"name":"tfrmcttableprop.actunderlinetocamelcase.caption","sourcebytes":[85,110,100,101,114,108,105,110,101,32,116,111,32,67,97,109,101,108,45,67,97,115,101],"value":"Underline to Camel-Case"}, 20 | {"hash":23097796,"name":"tfrmcttableprop.actcnwordsegment.caption","sourcebytes":[67,104,105,110,101,115,101,32,119,111,114,100,32,115,101,103,109,101,110,116],"value":"Chinese word segment"} 21 | ]} 22 | -------------------------------------------------------------------------------- /DML/Props/uFormGenTabCust.lfm: -------------------------------------------------------------------------------- 1 | object frmGenTabCust: TfrmGenTabCust 2 | Left = 763 3 | Height = 444 4 | Top = 380 5 | Width = 424 6 | Caption = 'Tabs' 7 | ClientHeight = 444 8 | ClientWidth = 424 9 | LCLVersion = '2.0.12.0' 10 | object ckblsTabs: TCheckListBox 11 | Left = 24 12 | Height = 304 13 | Top = 40 14 | Width = 272 15 | ItemHeight = 0 16 | TabOrder = 0 17 | end 18 | object btnOk: TButton 19 | Left = 136 20 | Height = 25 21 | Top = 384 22 | Width = 75 23 | Caption = 'OK' 24 | ModalResult = 1 25 | TabOrder = 1 26 | end 27 | object btnCancel: TButton 28 | Left = 232 29 | Height = 25 30 | Top = 384 31 | Width = 75 32 | Cancel = True 33 | Caption = 'Cancel' 34 | ModalResult = 2 35 | TabOrder = 2 36 | end 37 | object Label1: TLabel 38 | Left = 24 39 | Height = 17 40 | Top = 14 41 | Width = 45 42 | Caption = 'Tab list:' 43 | ParentColor = False 44 | end 45 | object btnUp: TButton 46 | Left = 318 47 | Height = 25 48 | Top = 140 49 | Width = 70 50 | Caption = 'Up' 51 | OnClick = btnUpClick 52 | TabOrder = 3 53 | end 54 | object btnDown: TButton 55 | Left = 318 56 | Height = 25 57 | Top = 176 58 | Width = 70 59 | Caption = 'Down' 60 | OnClick = btnDownClick 61 | TabOrder = 4 62 | end 63 | object btnTop: TButton 64 | Left = 318 65 | Height = 25 66 | Top = 104 67 | Width = 70 68 | Caption = 'Top' 69 | OnClick = btnTopClick 70 | TabOrder = 5 71 | end 72 | object btnBottom: TButton 73 | Left = 318 74 | Height = 25 75 | Top = 213 76 | Width = 70 77 | Caption = 'Bottom' 78 | OnClick = btnBottomClick 79 | TabOrder = 6 80 | end 81 | object ckbSelectAll: TCheckBox 82 | Left = 25 83 | Height = 21 84 | Top = 356 85 | Width = 73 86 | Caption = 'Select all' 87 | OnChange = ckbSelectAllChange 88 | TabOrder = 7 89 | end 90 | end 91 | -------------------------------------------------------------------------------- /DML/Props/uFormGenTabCust.lrj: -------------------------------------------------------------------------------- 1 | {"version":1,"strings":[ 2 | {"hash":370579,"name":"tfrmgentabcust.caption","sourcebytes":[84,97,98,115],"value":"Tabs"}, 3 | {"hash":1339,"name":"tfrmgentabcust.btnok.caption","sourcebytes":[79,75],"value":"OK"}, 4 | {"hash":77089212,"name":"tfrmgentabcust.btncancel.caption","sourcebytes":[67,97,110,99,101,108],"value":"Cancel"}, 5 | {"hash":74665994,"name":"tfrmgentabcust.label1.caption","sourcebytes":[84,97,98,32,108,105,115,116,58],"value":"Tab list:"}, 6 | {"hash":1472,"name":"tfrmgentabcust.btnup.caption","sourcebytes":[85,112],"value":"Up"}, 7 | {"hash":308958,"name":"tfrmgentabcust.btndown.caption","sourcebytes":[68,111,119,110],"value":"Down"}, 8 | {"hash":23392,"name":"tfrmgentabcust.btntop.caption","sourcebytes":[84,111,112],"value":"Top"}, 9 | {"hash":76987229,"name":"tfrmgentabcust.btnbottom.caption","sourcebytes":[66,111,116,116,111,109],"value":"Bottom"}, 10 | {"hash":195296268,"name":"tfrmgentabcust.ckbselectall.caption","sourcebytes":[83,101,108,101,99,116,32,97,108,108],"value":"Select all"} 11 | ]} 12 | -------------------------------------------------------------------------------- /DML/Props/uFormGenTabCust.pas: -------------------------------------------------------------------------------- 1 | unit uFormGenTabCust; 2 | 3 | {$mode delphi} 4 | 5 | interface 6 | 7 | uses 8 | Classes, SysUtils, Forms, Controls, Graphics, Dialogs, StdCtrls, CheckLst; 9 | 10 | type 11 | 12 | { TfrmGenTabCust } 13 | 14 | TfrmGenTabCust = class(TForm) 15 | btnOk: TButton; 16 | btnCancel: TButton; 17 | btnUp: TButton; 18 | btnDown: TButton; 19 | btnTop: TButton; 20 | btnBottom: TButton; 21 | ckbSelectAll: TCheckBox; 22 | ckblsTabs: TCheckListBox; 23 | Label1: TLabel; 24 | procedure btnBottomClick(Sender: TObject); 25 | procedure btnDownClick(Sender: TObject); 26 | procedure btnTopClick(Sender: TObject); 27 | procedure btnUpClick(Sender: TObject); 28 | procedure ckbSelectAllChange(Sender: TObject); 29 | private 30 | procedure MoveSelected(step: Integer); 31 | public 32 | procedure Init(conf, def: TStrings); 33 | procedure GetConfigResult(conf: TStrings); 34 | end; 35 | 36 | implementation 37 | 38 | {$R *.lfm} 39 | 40 | { TfrmGenTabCust } 41 | 42 | procedure TfrmGenTabCust.ckbSelectAllChange(Sender: TObject); 43 | var 44 | I: Integer; 45 | begin 46 | for I:=0 to ckblsTabs.Items.Count - 1 do 47 | ckblsTabs.Checked[I] := ckbSelectAll.Checked; 48 | end; 49 | 50 | procedure TfrmGenTabCust.MoveSelected(step: Integer); 51 | var 52 | idx, tidx: Integer; 53 | ck1, ck2: Boolean; 54 | begin 55 | idx := ckblsTabs.ItemIndex; 56 | if idx < 0 then 57 | Exit; 58 | tidx :=idx+step; 59 | if tidx<0 then 60 | tidx := 0 61 | else if tidx > ckblsTabs.Count - 1 then 62 | tidx := ckblsTabs.Count - 1; 63 | if idx=tidx then 64 | Exit; 65 | ck1 := ckblsTabs.Checked[idx]; 66 | ck2 := ckblsTabs.Checked[tidx]; 67 | ckblsTabs.Items.Exchange(idx, tidx); 68 | ckblsTabs.Checked[idx] := ck2; 69 | ckblsTabs.Checked[tidx] := ck1; 70 | ckblsTabs.ItemIndex := tidx; 71 | end; 72 | 73 | procedure TfrmGenTabCust.btnUpClick(Sender: TObject); 74 | begin 75 | MoveSelected(-1); 76 | end; 77 | 78 | procedure TfrmGenTabCust.btnDownClick(Sender: TObject); 79 | begin 80 | MoveSelected(1); 81 | end; 82 | 83 | procedure TfrmGenTabCust.btnTopClick(Sender: TObject); 84 | begin 85 | MoveSelected(-99999); 86 | end; 87 | 88 | procedure TfrmGenTabCust.btnBottomClick(Sender: TObject); 89 | begin 90 | MoveSelected(99999); 91 | end; 92 | 93 | procedure TfrmGenTabCust.Init(conf, def: TStrings); 94 | var 95 | I: Integer; 96 | bDef: Boolean; 97 | begin 98 | ckblsTabs.Items.Clear; 99 | for I:=0 to conf.Count - 1 do 100 | begin 101 | if Trim(conf[I])='' then 102 | Continue; 103 | ckblsTabs.Items.Add(conf[I]); 104 | end; 105 | for I:=0 to ckblsTabs.Items.Count - 1 do 106 | begin 107 | ckblsTabs.Checked[I] := True; 108 | end; 109 | 110 | bDef := (ckblsTabs.Items.Count = 0); 111 | 112 | for I:=0 to def.Count - 1 do 113 | begin 114 | if Trim(def[I])='' then 115 | Continue; 116 | if ckblsTabs.Items.IndexOf(def[I])>=0 then 117 | Continue; 118 | ckblsTabs.Items.Add(def[I]); 119 | end; 120 | 121 | if bDef then 122 | begin 123 | ckbSelectAll.Checked := True; 124 | for I:=0 to ckblsTabs.Items.Count - 1 do 125 | ckblsTabs.Checked[I] := ckbSelectAll.Checked; 126 | end; 127 | end; 128 | 129 | procedure TfrmGenTabCust.GetConfigResult(conf: TStrings); 130 | var 131 | I: Integer; 132 | begin 133 | conf.Clear; 134 | for I:=0 to ckblsTabs.Items.Count - 1 do 135 | if ckblsTabs.Checked[I] then 136 | begin 137 | conf.Add(ckblsTabs.Items[I]); 138 | end; 139 | end; 140 | 141 | end. 142 | 143 | -------------------------------------------------------------------------------- /DML/Props/uFormSelectFields.lfm: -------------------------------------------------------------------------------- 1 | object frmSelectFields: TfrmSelectFields 2 | Left = 324 3 | Height = 575 4 | Top = 269 5 | Width = 789 6 | BorderIcons = [biSystemMenu, biMaximize] 7 | Caption = 'Select fields' 8 | ClientHeight = 575 9 | ClientWidth = 789 10 | Color = clBtnFace 11 | DesignTimePPI = 120 12 | Font.Color = clWindowText 13 | Font.Height = -14 14 | Font.Name = 'Tahoma' 15 | OnCloseQuery = FormCloseQuery 16 | OnCreate = FormCreate 17 | OnDestroy = FormDestroy 18 | Position = poMainFormCenter 19 | LCLVersion = '2.0.12.0' 20 | object Label2: TLabel 21 | Left = 21 22 | Height = 17 23 | Top = 14 24 | Width = 84 25 | Caption = 'Choose fields:' 26 | Font.Color = clWindowText 27 | Font.Height = -14 28 | Font.Name = 'Tahoma' 29 | ParentColor = False 30 | ParentFont = False 31 | end 32 | object btnOK: TButton 33 | Left = 539 34 | Height = 29 35 | Top = 521 36 | Width = 108 37 | Anchors = [akRight, akBottom] 38 | Caption = 'OK' 39 | Default = True 40 | Font.Color = clWindowText 41 | Font.Height = -14 42 | Font.Name = 'Tahoma' 43 | ModalResult = 1 44 | ParentFont = False 45 | TabOrder = 0 46 | end 47 | object btnCancel: TButton 48 | Left = 658 49 | Height = 29 50 | Top = 521 51 | Width = 109 52 | Anchors = [akRight, akBottom] 53 | Cancel = True 54 | Caption = 'Cancel' 55 | Font.Color = clWindowText 56 | Font.Height = -14 57 | Font.Name = 'Tahoma' 58 | ModalResult = 2 59 | ParentFont = False 60 | TabOrder = 1 61 | end 62 | object cklbFields: TCheckListBox 63 | Left = 21 64 | Height = 450 65 | Top = 49 66 | Width = 746 67 | Anchors = [akTop, akLeft, akRight, akBottom] 68 | Columns = 3 69 | Font.Color = clWindowText 70 | Font.Height = -14 71 | Font.Name = 'Tahoma' 72 | ItemHeight = 0 73 | MultiSelect = True 74 | OnClick = cklbFieldsClick 75 | ParentFont = False 76 | TabOrder = 2 77 | end 78 | object ckbSelAll: TCheckBox 79 | Left = 21 80 | Height = 23 81 | Top = 520 82 | Width = 75 83 | Anchors = [akLeft, akBottom] 84 | Caption = 'Select all' 85 | Font.Color = clWindowText 86 | Font.Height = -14 87 | Font.Name = 'Tahoma' 88 | OnClick = ckbSelAllClick 89 | ParentFont = False 90 | TabOrder = 3 91 | Visible = False 92 | end 93 | end 94 | -------------------------------------------------------------------------------- /DML/Props/uFormSelectFields.lrj: -------------------------------------------------------------------------------- 1 | {"version":1,"strings":[ 2 | {"hash":252516483,"name":"tfrmselectfields.caption","sourcebytes":[83,101,108,101,99,116,32,102,105,101,108,100,115],"value":"Select fields"}, 3 | {"hash":60733594,"name":"tfrmselectfields.label2.caption","sourcebytes":[67,104,111,111,115,101,32,102,105,101,108,100,115,58],"value":"Choose fields:"}, 4 | {"hash":1339,"name":"tfrmselectfields.btnok.caption","sourcebytes":[79,75],"value":"OK"}, 5 | {"hash":77089212,"name":"tfrmselectfields.btncancel.caption","sourcebytes":[67,97,110,99,101,108],"value":"Cancel"}, 6 | {"hash":195296268,"name":"tfrmselectfields.ckbselall.caption","sourcebytes":[83,101,108,101,99,116,32,97,108,108],"value":"Select all"} 7 | ]} 8 | -------------------------------------------------------------------------------- /DML/Props/uFormSelectFields.pas: -------------------------------------------------------------------------------- 1 | unit uFormSelectFields; 2 | 3 | {$MODE Delphi} 4 | 5 | interface 6 | 7 | uses 8 | LCLIntf, LCLType, LMessages, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, 9 | Dialogs, StdCtrls, ExtCtrls, CheckLst, 10 | CtMetaTable; 11 | 12 | type 13 | 14 | { TfrmSelectFields } 15 | 16 | TfrmSelectFields = class(TForm) 17 | btnOK: TButton; 18 | btnCancel: TButton; 19 | Label2: TLabel; 20 | cklbFields: TCheckListBox; 21 | ckbSelAll: TCheckBox; 22 | procedure cklbFieldsClick(Sender: TObject); 23 | procedure FormDestroy(Sender: TObject); 24 | procedure ckbSelAllClick(Sender: TObject); 25 | procedure FormCloseQuery(Sender: TObject; var CanClose: Boolean); 26 | procedure FormCreate(Sender: TObject); 27 | private 28 | { Private declarations } 29 | FOrginalCaption: string; 30 | FTemplateTb: TCtMetaTable; 31 | FSelectedData: TStringList; 32 | public 33 | { Public declarations } 34 | procedure Init(ADesc, ASelected, opt: string); 35 | function SelectedResult: string; 36 | end; 37 | 38 | function CtSelectFields(desc, defs, opt: string): string; 39 | 40 | implementation 41 | 42 | uses CTMetaData; 43 | 44 | {$R *.lfm} 45 | 46 | function CtSelectFields(desc, defs, opt: string): string; 47 | begin 48 | with TfrmSelectFields.Create(Application) do 49 | try 50 | Init(desc, defs, opt); 51 | if ShowModal = mrOk then 52 | Result := SelectedResult 53 | else 54 | Result := ''; 55 | finally 56 | Free; 57 | end; 58 | end; 59 | 60 | 61 | procedure TfrmSelectFields.ckbSelAllClick(Sender: TObject); 62 | var 63 | I, C: Integer; 64 | begin 65 | C := 0; 66 | for I := 0 to cklbFields.Items.Count - 1 do 67 | if cklbFields.Selected[I] then 68 | Inc(C); 69 | if C > 1 then 70 | begin 71 | for I := 0 to cklbFields.Items.Count - 1 do 72 | if cklbFields.Selected[I] then 73 | cklbFields.Checked[I] := ckbSelAll.Checked; 74 | end 75 | else 76 | for I := 0 to cklbFields.Items.Count - 1 do 77 | cklbFields.Checked[I] := ckbSelAll.Checked; 78 | end; 79 | 80 | procedure TfrmSelectFields.FormCloseQuery(Sender: TObject; 81 | var CanClose: Boolean); 82 | var 83 | I: Integer; 84 | begin 85 | if ModalResult = mrOk then 86 | begin 87 | CanClose := False; 88 | for I := 0 to cklbFields.Items.Count - 1 do 89 | if cklbFields.Checked[I] then 90 | CanClose := True; 91 | end; 92 | end; 93 | 94 | procedure TfrmSelectFields.FormCreate(Sender: TObject); 95 | begin 96 | FSelectedData:=TStringList.Create; 97 | FOrginalCaption := Caption; 98 | cklbFields.Items.Clear; 99 | end; 100 | 101 | procedure TfrmSelectFields.FormDestroy(Sender: TObject); 102 | begin 103 | if FTemplateTb <> nil then 104 | FreeAndNil(FTemplateTb); 105 | FSelectedData.Free; 106 | end; 107 | 108 | procedure TfrmSelectFields.cklbFieldsClick(Sender: TObject); 109 | begin 110 | SelectedResult; 111 | end; 112 | 113 | procedure TfrmSelectFields.Init(ADesc, ASelected, opt: string); 114 | function IsSelected(fdn: string): Boolean; 115 | begin 116 | if Pos(',' + UpperCase(fdn) + ',', ',' + UpperCase(ASelected) + ',') > 0 then 117 | Result := True 118 | else 119 | Result := False; 120 | end; 121 | var 122 | I: TCtKeyFieldType; 123 | K, V: Integer; 124 | fd: TCtMetaField; 125 | begin 126 | if FTemplateTb = nil then 127 | FTemplateTb := TCtMetaTable.Create; 128 | FTemplateTb.Describe := ADesc; 129 | 130 | if Pos('[CAN_SELECT_ALL]', opt)>0 then 131 | ckbSelAll.Visible := True; 132 | 133 | if FTemplateTb.MetaFields.Count = 0 then 134 | begin 135 | for I := cfktId to cfktOrderNo do 136 | begin 137 | fd := FTemplateTb.MetaFields.NewMetaField; 138 | fd.Name := DEF_CTMETAFIELD_KEYFIELD_NAMES_ENG[I]; 139 | fd.DisplayName := DEF_CTMETAFIELD_KEYFIELD_NAMES_CHN[I]; 140 | fd.KeyFieldType := I; 141 | fd.DataType := DEF_CTMETAFIELD_KEYFIELD_TYPES[I]; 142 | end; 143 | end; 144 | 145 | FOrginalCaption := Caption; 146 | cklbFields.Items.Clear; 147 | for K := 0 to FTemplateTb.MetaFields.Count - 1 do 148 | begin 149 | fd := FTemplateTb.MetaFields.Items[K]; 150 | V := cklbFields.Items.AddObject(fd.NameCaption, fd); 151 | if IsSelected(fd.Name) then 152 | cklbFields.Checked[V] := True 153 | else 154 | cklbFields.Checked[V] := False; 155 | end; 156 | end; 157 | 158 | function TfrmSelectFields.SelectedResult: string; 159 | var 160 | I: Integer; 161 | S: String; 162 | fd: TCtMetaField; 163 | begin 164 | Result := ''; 165 | for I := 0 to cklbFields.Items.Count - 1 do 166 | begin 167 | fd := TCtMetaField(cklbFields.Items.Objects[I]); 168 | S := fd.Name; 169 | if cklbFields.Checked[I] then 170 | begin 171 | if FSelectedData.IndexOf(S) < 0 then 172 | FSelectedData.Add(S); 173 | end 174 | else if FSelectedData.IndexOf(S) >= 0 then 175 | FSelectedData.Delete(FSelectedData.IndexOf(S)); 176 | end; 177 | 178 | Result := Trim(FSelectedData.CommaText); 179 | end; 180 | 181 | end. 182 | 183 | -------------------------------------------------------------------------------- /DML/Props/uFrameCtTableDef.lfm: -------------------------------------------------------------------------------- 1 | object FrameCtTableDef: TFrameCtTableDef 2 | Left = 0 3 | Height = 446 4 | Top = 0 5 | Width = 629 6 | ClientHeight = 446 7 | ClientWidth = 629 8 | TabOrder = 0 9 | TabStop = True 10 | DesignLeft = 15 11 | DesignTop = 149 12 | object SplitterCttbTree: TSplitter 13 | Left = 173 14 | Height = 446 15 | Top = 0 16 | Width = 5 17 | end 18 | object PanelCttbTree: TPanel 19 | Left = 0 20 | Height = 446 21 | Top = 0 22 | Width = 173 23 | Align = alLeft 24 | BevelOuter = bvNone 25 | Caption = 'List' 26 | TabOrder = 0 27 | end 28 | object PanelTableProp: TPanel 29 | Left = 200 30 | Height = 137 31 | Top = 4 32 | Width = 213 33 | BevelOuter = bvNone 34 | Caption = 'Table properties' 35 | TabOrder = 1 36 | end 37 | object PanelFieldProp: TPanel 38 | Left = 256 39 | Height = 117 40 | Top = 184 41 | Width = 245 42 | BevelOuter = bvNone 43 | Caption = 'Field properties' 44 | TabOrder = 2 45 | end 46 | object PanelDMLGraph: TPanel 47 | Left = 372 48 | Height = 137 49 | Top = 264 50 | Width = 213 51 | BevelOuter = bvLowered 52 | Caption = 'Diagram' 53 | TabOrder = 3 54 | Visible = False 55 | end 56 | end 57 | -------------------------------------------------------------------------------- /DML/Props/uFrameCtTableDef.lrj: -------------------------------------------------------------------------------- 1 | {"version":1,"strings":[ 2 | {"hash":340132,"name":"tframecttabledef.panelcttbtree.caption","sourcebytes":[76,105,115,116],"value":"List"}, 3 | {"hash":79384371,"name":"tframecttabledef.paneltableprop.caption","sourcebytes":[84,97,98,108,101,32,112,114,111,112,101,114,116,105,101,115],"value":"Table properties"}, 4 | {"hash":78255971,"name":"tframecttabledef.panelfieldprop.caption","sourcebytes":[70,105,101,108,100,32,112,114,111,112,101,114,116,105,101,115],"value":"Field properties"}, 5 | {"hash":184019005,"name":"tframecttabledef.paneldmlgraph.caption","sourcebytes":[68,105,97,103,114,97,109],"value":"Diagram"} 6 | ]} 7 | -------------------------------------------------------------------------------- /DML/Props/uFrameCtTableList.lrj: -------------------------------------------------------------------------------- 1 | {"version":1,"strings":[ 2 | {"hash":4732660,"name":"tframecttablelist.edttbfilter.hint","sourcebytes":[65,108,116,43,68],"value":"Alt+D"}, 3 | {"hash":80755394,"name":"tframecttablelist.edttbfilter.text","sourcebytes":[70,105,108,116,101,114],"value":"Filter"}, 4 | {"hash":120,"name":"tframecttablelist.btnclearfilter.caption","sourcebytes":[120],"value":"x"}, 5 | {"hash":178463005,"name":"tframecttablelist.actnewmodel.caption","sourcebytes":[78,101,119,32,100,105,97,103,114,97,109],"value":"New diagram"}, 6 | {"hash":159002085,"name":"tframecttablelist.actnewtable.caption","sourcebytes":[78,101,119,32,116,97,98,108,101],"value":"New table"}, 7 | {"hash":107789700,"name":"tframecttablelist.actnewfield.caption","sourcebytes":[65,100,100,32,102,105,101,108,100],"value":"Add field"}, 8 | {"hash":80701508,"name":"tframecttablelist.actexpand.caption","sourcebytes":[69,120,112,97,110,100],"value":"Expand"}, 9 | {"hash":255682821,"name":"tframecttablelist.actexpand.hint","sourcebytes":[69,120,112,97,110,100,32,99,117,114,114,101,110,116,32,110,111,100,101],"value":"Expand current node"}, 10 | {"hash":78392485,"name":"tframecttablelist.actdelete.caption","sourcebytes":[68,101,108,101,116,101],"value":"Delete"}, 11 | {"hash":78392485,"name":"tframecttablelist.actdelete.hint","sourcebytes":[68,101,108,101,116,101],"value":"Delete"}, 12 | {"hash":93079605,"name":"tframecttablelist.actrename.caption","sourcebytes":[82,101,110,97,109,101],"value":"Rename"}, 13 | {"hash":114087587,"name":"tframecttablelist.actproperty.caption","sourcebytes":[80,114,111,112,101,114,116,105,101,115],"value":"Properties"}, 14 | {"hash":146640072,"name":"tframecttablelist.actrefresh.caption","sourcebytes":[82,101,102,114,101,115,104],"value":"Refresh"}, 15 | {"hash":146640072,"name":"tframecttablelist.actrefresh.hint","sourcebytes":[82,101,102,114,101,115,104],"value":"Refresh"}, 16 | {"hash":195296268,"name":"tframecttablelist.actselall.caption","sourcebytes":[83,101,108,101,99,116,32,97,108,108],"value":"Select all"}, 17 | {"hash":304761,"name":"tframecttablelist.actcopytb.caption","sourcebytes":[67,111,112,121],"value":"Copy"}, 18 | {"hash":5671589,"name":"tframecttablelist.actpastetb.caption","sourcebytes":[80,97,115,116,101],"value":"Paste"}, 19 | {"hash":245455733,"name":"tframecttablelist.actcapuppercase.caption","sourcebytes":[65,108,108,32,85,112,112,101,114,32,67,97,115,101],"value":"All Upper Case"}, 20 | {"hash":245476037,"name":"tframecttablelist.actcaplowercase.caption","sourcebytes":[65,108,108,32,76,111,119,101,114,32,67,97,115,101],"value":"All Lower Case"}, 21 | {"hash":196411829,"name":"tframecttablelist.actautocapitalize.caption","sourcebytes":[65,117,116,111,32,67,97,112,105,116,97,108,105,122,101],"value":"Auto Capitalize"}, 22 | {"hash":93848277,"name":"tframecttablelist.actexchangedispcomm.caption","sourcebytes":[67,111,109,109,101,110,116,115,32,116,111,32,76,111,103,105,99,45,78,97,109,101],"value":"Comments to Logic-Name"}, 23 | {"hash":253584997,"name":"tframecttablelist.actexchangenamedisp.caption","sourcebytes":[78,97,109,101,32,116,111,32,76,111,103,105,99,45,78,97,109,101],"value":"Name to Logic-Name"}, 24 | {"hash":245179316,"name":"tframecttablelist.actcheckwithmydict.caption","sourcebytes":[67,104,101,99,107,32,119,105,116,104,32,77,121,68,105,99,116,46,116,120,116],"value":"Check with MyDict.txt"}, 25 | {"hash":97869950,"name":"tframecttablelist.actconvertchntopy.caption","sourcebytes":[67,111,110,118,101,114,116,32,67,104,105,110,101,115,101,32,116,111,32,80,105,110,89,105,110],"value":"Convert Chinese to PinYin"}, 26 | {"hash":129361556,"name":"tframecttablelist.actcopytext.caption","sourcebytes":[67,111,112,121,32,84,101,120,116],"value":"Copy Text"}, 27 | {"hash":72279717,"name":"tframecttablelist.actsorttablesbyname.caption","sourcebytes":[83,111,114,116,32,116,97,98,108,101,115,32,98,121,32,110,97,109,101],"value":"Sort tables by name"}, 28 | {"hash":225111720,"name":"tframecttablelist.actfindingraph.caption","sourcebytes":[70,105,110,100,32,105,110,32,103,114,97,112,104],"value":"Find in graph"}, 29 | {"hash":63602373,"name":"tframecttablelist.actcamelcasetounderline.caption","sourcebytes":[67,97,109,101,108,45,67,97,115,101,32,116,111,32,85,110,100,101,114,108,105,110,101],"value":"Camel-Case to Underline"}, 30 | {"hash":261161749,"name":"tframecttablelist.actunderlinetocamelcase.caption","sourcebytes":[85,110,100,101,114,108,105,110,101,32,116,111,32,67,97,109,101,108,45,67,97,115,101],"value":"Underline to Camel-Case"}, 31 | {"hash":249315657,"name":"tframecttablelist.actpasteascopy.caption","sourcebytes":[80,97,115,116,101,32,97,115,32,99,111,112,121],"value":"Paste as copy"}, 32 | {"hash":23097796,"name":"tframecttablelist.actcnwordsegment.caption","sourcebytes":[67,104,105,110,101,115,101,32,119,111,114,100,32,115,101,103,109,101,110,116],"value":"Chinese word segment"}, 33 | {"hash":128450513,"name":"tframecttablelist.mn_reserved1.caption","sourcebytes":[82,69,83,69,82,86,69,68,49],"value":"RESERVED1"}, 34 | {"hash":128450514,"name":"tframecttablelist.mn_reserved2.caption","sourcebytes":[82,69,83,69,82,86,69,68,50],"value":"RESERVED2"}, 35 | {"hash":128450515,"name":"tframecttablelist.mn_reserved3.caption","sourcebytes":[82,69,83,69,82,86,69,68,51],"value":"RESERVED3"}, 36 | {"hash":128450516,"name":"tframecttablelist.mn_reserved4.caption","sourcebytes":[82,69,83,69,82,86,69,68,52],"value":"RESERVED4"}, 37 | {"hash":128450517,"name":"tframecttablelist.mn_reserved5.caption","sourcebytes":[82,69,83,69,82,86,69,68,53],"value":"RESERVED5"}, 38 | {"hash":10799477,"name":"tframecttablelist.mn_capitalize.caption","sourcebytes":[67,97,112,105,116,97,108,105,122,101],"value":"Capitalize"} 39 | ]} 40 | -------------------------------------------------------------------------------- /DML/Scripts/DmlGlobalPasScriptLite.pas: -------------------------------------------------------------------------------- 1 | unit DmlGlobalPasScriptLite; 2 | 3 | {$mode delphi} 4 | 5 | interface 6 | 7 | uses 8 | Classes, SysUtils, CtMetaTable; 9 | 10 | type 11 | 12 | { TDmlGlobalPasScriptLite } 13 | //EZDML Global Event Scripts (Only support Pascal-Script) Ver20191006 14 | //EZDML全局事件脚本(注:只支持Pascal脚本) 15 | 16 | TDmlGlobalPasScriptLite = class 17 | protected 18 | public 19 | { Public declarations } 20 | constructor Create; virtual; 21 | destructor Destroy; override; 22 | 23 | procedure TakeGlobalEvents; 24 | 25 | //Generate SQL for a single Table. defRes is the default result. 26 | //生成单个表的SQL,传入表对象、是否生成创建表SQL、是否生成创建约束SQL、默认生成的SQL结果、数据库类型、选项,返回自定义结果SQL 27 | function _OnEzdmlGenTbSqlEvent(tb: TCtMetaTable; 28 | bCreateTb, bCreateConstrains: boolean; defRes, dbType, options: string): string; 29 | 30 | //Generate upgrade SQL for an exists Table in a database. defRes is the default result. 31 | //生成数据库的更新SQL,传入新旧表对象、默认生成的SQL结果、数据库类型、选项,返回自定义结果SQL 32 | function _OnEzdmlGenDbSqlEvent(designTb, dbTable: TCtMetaTable; 33 | defRes, dbType, options: string): string; 34 | 35 | //Generate SQL for a single Field. defRes is the default result. 36 | //生成单个字段的类型(varchar(255) nullable),传入表对象、字段对象、默认生成的结果、数据库类型、选项,返回自定义结果 37 | function _OnEzdmlGenFieldTypeDescEvent(tb: TCtMetaTable; fd: TCtMetaField; 38 | defRes, dbType, options: string): string; 39 | 40 | //Generate upgrade SQL for an exists database-Field of a Table. defRes is the default result. 41 | //生成增删改单个字段的SQL(alter table add xxx),传入要执行的操作(alter/add/drop)、表对象、新旧字段对象、默认生成的结果、数据库类型、选项,返回自定义结果 42 | function _OnEzdmlGenAlterFieldEvent(action: string; tb: TCtMetaTable; 43 | designField, dbField: TCtMetaField; defRes, dbType, options: string): string; 44 | 45 | //Generate test Data Insert SQL for an exists database-table. defRes is the default result. 46 | //生成插入测试数据的SQL,传入表对象、SQL类型(insert select_max_key select_random_key update_fk)、默认生成的结果、参数1、参数2、数据库类型、选项,返回自定义结果 47 | function _OnEzdmlGenDataSqlEvent(tb: TCtMetaTable; 48 | sqlType, defRes, param1, param2, dbType, options: string): string; 49 | 50 | //Reserved custom events 51 | //自定义命令事件 52 | function _OnEzdmlCmdEvent(cmd, param1, param2: string; 53 | parobj1, parobj2: TObject): string; 54 | end; 55 | 56 | 57 | implementation 58 | 59 | uses 60 | ezdmlstrs; 61 | 62 | { TDmlGlobalPasScriptLite } 63 | 64 | 65 | constructor TDmlGlobalPasScriptLite.Create; 66 | begin 67 | end; 68 | 69 | destructor TDmlGlobalPasScriptLite.Destroy; 70 | begin 71 | inherited Destroy; 72 | end; 73 | 74 | procedure TDmlGlobalPasScriptLite.TakeGlobalEvents; 75 | begin 76 | GProc_OnEzdmlGenTbSqlEvent := _OnEzdmlGenTbSqlEvent; 77 | GProc_OnEzdmlGenDbSqlEvent := _OnEzdmlGenDbSqlEvent; 78 | GProc_OnEzdmlGenFieldTypeDescEvent := _OnEzdmlGenFieldTypeDescEvent; 79 | GProc_OnEzdmlGenAlterFieldEvent := _OnEzdmlGenAlterFieldEvent; 80 | GProc_OnEzdmlGenDataSqlEvent := _OnEzdmlGenDataSqlEvent; 81 | GProc_OnEzdmlCmdEvent := _OnEzdmlCmdEvent; 82 | end; 83 | 84 | //Generate SQL for a single Table. defRes is the default result. 85 | //生成单个表的SQL,传入表对象、是否生成创建表SQL、是否生成创建约束SQL、默认生成的SQL结果、数据库类型、选项,返回自定义结果SQL 86 | function TDmlGlobalPasScriptLite._OnEzdmlGenTbSqlEvent(tb: TCtMetaTable; bCreateTb, 87 | bCreateConstrains: boolean; defRes, dbType, options: string): string; 88 | begin 89 | Result := defRes; 90 | end; 91 | 92 | //Generate upgrade SQL for an exists Table in a database. defRes is the default result. 93 | //生成数据库的更新SQL,传入新旧表对象、默认生成的SQL结果、数据库类型、选项,返回自定义结果SQL 94 | function TDmlGlobalPasScriptLite._OnEzdmlGenDbSqlEvent(designTb, 95 | dbTable: TCtMetaTable; defRes, dbType, options: string): string; 96 | begin 97 | Result := defRes; 98 | end; 99 | 100 | //Generate SQL for a single Field. defRes is the default result. 101 | //生成单个字段的类型(varchar(255) nullable),传入表对象、字段对象、默认生成的结果、数据库类型、选项,返回自定义结果 102 | function TDmlGlobalPasScriptLite._OnEzdmlGenFieldTypeDescEvent(tb: TCtMetaTable; 103 | fd: TCtMetaField; defRes, dbType, options: string): string; 104 | begin 105 | Result := defRes; 106 | end; 107 | 108 | //Generate upgrade SQL for an exists database-Field of a Table. defRes is the default result. 109 | //生成增删改单个字段的SQL(alter table add xxx),传入要执行的操作(alter/add/drop)、表对象、新旧字段对象、默认生成的结果、数据库类型、选项,返回自定义结果 110 | function TDmlGlobalPasScriptLite._OnEzdmlGenAlterFieldEvent(action: string; 111 | tb: TCtMetaTable; designField, dbField: TCtMetaField; defRes, dbType, 112 | options: string): string; 113 | begin 114 | Result := defRes; 115 | end; 116 | 117 | 118 | //Generate test Data Insert SQL for an exists database-table. defRes is the default result. 119 | //生成插入测试数据的SQL,传入表对象、SQL类型(DQL_DML_SQL TEST_DATA_INSERT_SQL GET_MAX_KEY_SQL TEST_DATA_UPDATE_FK_SQL)、默认生成的结果、数据库类型、参数1、参数2、选项,返回自定义结果 120 | function TDmlGlobalPasScriptLite._OnEzdmlGenDataSqlEvent(tb: TCtMetaTable; sqlType, 121 | defRes, param1, param2, dbType, options: string): string; 122 | begin 123 | Result := defRes; 124 | end; 125 | 126 | //Reserved custom events 127 | //自定义命令事件 128 | function TDmlGlobalPasScriptLite._OnEzdmlCmdEvent(cmd, param1, param2: string; 129 | parobj1, parobj2: TObject): string; 130 | begin 131 | Result := ''; 132 | end; 133 | 134 | end. 135 | -------------------------------------------------------------------------------- /DML/Scripts/DmlPasScriptLite.pas: -------------------------------------------------------------------------------- 1 | unit DmlPasScriptLite; 2 | 3 | interface 4 | 5 | uses 6 | LCLIntf, LCLType, LMessages, Messages, SysUtils, Classes, Graphics, Controls, 7 | Forms, Dialogs, ExtDlgs, Variants, DB, Menus, 8 | CtMetaTable, CTMetaData, CtObjSerialer, DmlScriptPublic; 9 | 10 | type 11 | 12 | { TDmlPasScriptorLite } 13 | 14 | TDmlPasScriptorLite = class(TDmlBaseScriptor) 15 | protected 16 | { Private declarations } 17 | AllModels: TCtDataModelGraphList; 18 | CurModel: TCtDataModelGraph; 19 | public 20 | { Public declarations } 21 | constructor Create; override; 22 | destructor Destroy; override; 23 | 24 | function GetParamValueDef(AName,ADef: string): string; 25 | procedure AbortOut; 26 | procedure Alert(const Msg: Variant); 27 | 28 | function GetSettingPanelText: string; virtual; 29 | 30 | procedure Init(const ARule: string; ACtObj: TCtMetaObject; 31 | AResout: TStrings; ACtrlList: TObject); override; 32 | procedure Exec(ARule, AScript: string); override; 33 | end; 34 | 35 | TDmlPasScriptorLiteClass = class of TDmlPasScriptorLite; 36 | 37 | TCtPasLiteReg = record 38 | Name: string; 39 | PsClass: TDmlPasScriptorLiteClass; 40 | Cat: string; 41 | end; 42 | 43 | procedure RegisterPasLite(Name: string; PsClass: TDmlPasScriptorLiteClass; Cat: String); 44 | function CreatePsLiteScriptor(Name: string; Cat: String=''): TDmlPasScriptorLite; 45 | 46 | var 47 | CtPsLiteRegs: array of TCtPasLiteReg; 48 | 49 | implementation 50 | 51 | uses 52 | PvtInput, 53 | WindowFuncs, 54 | AutoNameCapitalize, 55 | dmlstrs, 56 | TypInfo, lclproc, 57 | CtObjJsonSerial, 58 | NetUtil, 59 | PasGen_Cpp, PasGen_Excel, PasGen_Word, PasGen_Test, PasGen_AddAllTables, 60 | PasGen_JDBCServer, PasGen_RandColor; 61 | 62 | procedure RegisterPasLite(Name: string; PsClass: TDmlPasScriptorLiteClass; Cat: String); 63 | var 64 | L: Integer; 65 | begin 66 | L := Length(CtPsLiteRegs); 67 | SetLength(CtPsLiteRegs, L+1); 68 | CtPsLiteRegs[L].Name := Name; 69 | CtPsLiteRegs[L].PsClass:=PsClass; 70 | CtPsLiteRegs[L].Cat:=Cat; 71 | end; 72 | 73 | function CreatePsLiteScriptor(Name: string; Cat: String=''): TDmlPasScriptorLite; 74 | var 75 | I: Integer; 76 | begin 77 | Result := nil; 78 | for I:=0 to High(CtPsLiteRegs) do 79 | begin 80 | if Name= CtPsLiteRegs[I].Name then 81 | if (Cat='') or (Cat=CtPsLiteRegs[I].Cat) then 82 | begin 83 | Result := CtPsLiteRegs[I].PsClass.Create; 84 | Exit; 85 | end; 86 | end; 87 | end; 88 | 89 | constructor TDmlPasScriptorLite.Create; 90 | begin 91 | inherited; 92 | FScriptType := 'paslt'; 93 | end; 94 | 95 | destructor TDmlPasScriptorLite.Destroy; 96 | begin 97 | inherited Destroy; 98 | end; 99 | 100 | function TDmlPasScriptorLite.GetParamValueDef(AName, ADef: string): string; 101 | begin 102 | Result := ADef; 103 | end; 104 | 105 | procedure TDmlPasScriptorLite.AbortOut; 106 | begin 107 | CtScript_AbortOut; 108 | end; 109 | 110 | procedure TDmlPasScriptorLite.Alert(const Msg: Variant); 111 | begin 112 | MsgBox(Msg); 113 | end; 114 | 115 | function TDmlPasScriptorLite.GetSettingPanelText: string; 116 | begin 117 | Result := ''; 118 | end; 119 | 120 | procedure TDmlPasScriptorLite.Init(const ARule: string; ACtObj: TCtMetaObject; 121 | AResout: TStrings; ACtrlList: TObject); 122 | begin 123 | inherited Init(ARule, ACtObj, AResout, ACtrlList); 124 | AllModels := FGlobeDataModelList; 125 | CurModel := FGlobeDataModelList.CurDataModel; 126 | end; 127 | 128 | 129 | procedure TDmlPasScriptorLite.Exec(ARule, AScript: string); 130 | begin 131 | end; 132 | 133 | 134 | 135 | initialization 136 | DmlPasScriptorClass := TDmlPasScriptorLite; 137 | 138 | end. 139 | 140 | -------------------------------------------------------------------------------- /DML/Scripts/PasGen_AddAllTables.pas: -------------------------------------------------------------------------------- 1 | unit PasGen_AddAllTables; 2 | 3 | {$mode delphi} 4 | 5 | interface 6 | 7 | uses 8 | LCLIntf, LCLType, LMessages, Messages, SysUtils, Classes, Graphics, Controls, 9 | Forms, Dialogs, ExtDlgs, Variants, DB, Menus, ActnList, 10 | CtMetaTable, CTMetaData, CtObjSerialer, DmlScriptPublic, DmlPasScriptLite; 11 | 12 | type 13 | 14 | { TDmlPasScriptorLite_AddAllTables } 15 | 16 | TDmlPasScriptorLite_AddAllTables=class(TDmlPasScriptorLite) 17 | public 18 | { Public declarations } 19 | procedure Exec(ARule, AScript: string); override; 20 | end; 21 | 22 | implementation 23 | 24 | { TDmlPasScriptorLite_AddAllTables } 25 | 26 | 27 | procedure TDmlPasScriptorLite_AddAllTables.Exec(ARule, AScript: string); 28 | 29 | // 以下代码来源于EZDML自定义工具脚本模板Add all tables.pas 30 | 31 | //本脚本将当前文件中所有其它模型中的表都添加到当前模型中来(重复表名的除外) 32 | var 33 | I, J, C: Integer; 34 | md, curMd: TCtDataModelGraph; 35 | tb, ntb: TCtMetaTable; 36 | comp, comp2: TComponent; 37 | S: string; 38 | begin 39 | curMd := CurModel; 40 | if curMd=nil then 41 | begin 42 | alert('No model'); 43 | Exit; 44 | end; 45 | if Application.MessageBox('Add all tables from other models to current model?', 46 | PChar(Application.title), MB_OKCANCEL or MB_ICONQUESTION)<>IDOK then 47 | Exit; 48 | 49 | for I:=0 to AllModels.Count-1 do //遍历所有模型图 50 | if AllModels.Items[I] <> curMd then //排除当前模型图 51 | begin 52 | md := AllModels.Items[I]; 53 | 54 | for J:=0 to md.Tables.Count-1 do //遍历所有表 55 | begin 56 | tb := md.Tables.Items[J]; 57 | if curMd.Tables.ItemByName(tb.Name, False)=nil then //当前模型找不到同名表? 58 | begin 59 | ntb := curMd.Tables.NewTableItem; 60 | ntb.AssignFrom(tb); 61 | C := C+1; 62 | end; 63 | end; 64 | end; 65 | 66 | if C>0 then 67 | begin 68 | comp:=FindChildComp(Application.MainForm,'FrameCtTableDef'); 69 | comp:=FindChildComp(comp,'FrameDMLGraph'); 70 | comp:=FindChildComp(comp,'FrameCtDML'); 71 | comp2:=FindChildComp(comp,'actRefresh'); 72 | TAction(comp2).Execute; 73 | comp2:=FindChildComp(comp,'actRearrange'); 74 | TAction(comp2).Execute; 75 | end; 76 | alert(Format('%d tables added',[C])); 77 | 78 | end; 79 | 80 | initialization 81 | RegisterPasLite('Add all tables', TDmlPasScriptorLite_AddAllTables, 'Tool'); 82 | 83 | end. 84 | 85 | -------------------------------------------------------------------------------- /DML/Scripts/PasGen_Excel.pas: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/huzgd/ezdml/5fbf534685b0e38f3d634eaba6f6ffe96999f3b8/DML/Scripts/PasGen_Excel.pas -------------------------------------------------------------------------------- /DML/Scripts/PasGen_JDBCServer.pas: -------------------------------------------------------------------------------- 1 | unit PasGen_JDBCServer; 2 | 3 | {$mode delphi} 4 | 5 | interface 6 | 7 | uses 8 | LCLIntf, LCLType, LMessages, Messages, SysUtils, Classes, Graphics, Controls, 9 | Forms, Dialogs, ExtDlgs, Variants, DB, Menus, 10 | CtMetaTable, CTMetaData, CtObjSerialer, DmlScriptPublic, DmlPasScriptLite; 11 | 12 | type 13 | 14 | { TDmlPasScriptorLite_JDBCServer } 15 | 16 | TDmlPasScriptorLite_JDBCServer=class(TDmlPasScriptorLite) 17 | public 18 | { Public declarations } 19 | procedure Exec(ARule, AScript: string); override; 20 | end; 21 | 22 | implementation 23 | 24 | uses 25 | StdCtrls, WindowFuncs; 26 | 27 | { TDmlPasScriptorLite_JDBCServer } 28 | 29 | 30 | procedure TDmlPasScriptorLite_JDBCServer.Exec(ARule, AScript: string); 31 | // 以下代码来源于EZDML自定义工具脚本模板Add all tables.pas 32 | 33 | function ShowConfigForm(fn: String): Boolean; //执行窗体代码 34 | var 35 | frm: TForm; 36 | fx, fy, fw, dy: Integer; 37 | lang, S, res: String; 38 | bIsChn: Boolean; 39 | begin 40 | Result := False; 41 | res := ''; 42 | lang := GetEnv('LANGUAGE'); 43 | if (lang='ch') or (lang='zh') or (lang='CHS') then 44 | bIsChn:=True 45 | else 46 | bIsChn:=False; 47 | 48 | frm:=TForm.Create(nil); //创建窗体 49 | try 50 | with frm do //设置窗体属性 51 | begin 52 | BorderStyle := bsDialog; //默认为bsSizeable 53 | Position := poMainFormCenter; 54 | Font.Assign(Application.MainForm.Font); 55 | Caption := 'HTTP_JDBC Configure'; 56 | if bIsChn then 57 | Caption := 'HTTP_JDBC配置'; 58 | Width := 700; 59 | Height := 500; 60 | end; 61 | 62 | fx := 20; 63 | fy := 20; 64 | fw := 650; 65 | dy := 10; 66 | 67 | with TLabel.Create(frm) do //名字 68 | begin 69 | Parent := frm; 70 | Left := fx; 71 | Top := fy; 72 | Caption := 'Please edit and confirm following configures:'; 73 | if bIsChn then 74 | Caption := '请编辑确认以下配置信息:'; 75 | fy := fy + Height + dy; 76 | end; 77 | 78 | with TMemo.Create(frm) do 79 | begin 80 | Parent := frm; 81 | Name := 'memoConfig'; 82 | Lines.Text := ''; 83 | Left := fx; 84 | Top := fy; 85 | Width := fw; 86 | Height := 300; 87 | Lines.LoadFromFile(fn); 88 | res := Lines.Text; 89 | ScrollBars := ssBoth; 90 | 91 | fy := fy + Height + dy; 92 | end; 93 | 94 | with TLabel.Create(frm) do //名字 95 | begin 96 | Parent := frm; 97 | Left := fx; 98 | Top := fy; 99 | Caption := 'Config-file location:'; 100 | if bIsChn then 101 | Caption := '配置文件路径:'; 102 | fy := fy + Height + dy; 103 | end; 104 | 105 | with TEdit.Create(frm) do //文件位置 106 | begin 107 | Parent := frm; 108 | Left := fx; 109 | Top := fy; 110 | Width := fw; 111 | Text :=fn; 112 | ReadOnly := True; 113 | ParentColor := True; 114 | fy := fy + Height + dy; 115 | end; 116 | 117 | fy := fy + 10 + dy; 118 | 119 | with TButton.Create(frm) do //确定 120 | begin 121 | Parent := frm; 122 | //Name := 'btnOK'; 123 | Caption := 'Run'; 124 | if bIsChn then 125 | Caption := '运行'; 126 | ModalResult := mrOk; //点此按钮将关闭窗口并返回mrOk 127 | Left := (frm.Width -150) div 2; 128 | Top := fy; 129 | Width := 70; 130 | //fy := fy + Height + dy; 131 | end; 132 | 133 | with TButton.Create(frm) do //取消 134 | begin 135 | Parent := frm; 136 | //Name := 'btnCancel'; 137 | Caption := 'Cancel'; 138 | if bIsChn then 139 | Caption := '取消'; 140 | Cancel := True; //表示按ESC时执行此按钮 141 | ModalResult := mrCancel; //点此按钮将关闭窗口并返回mrCancel 142 | Left := (frm.Width -150) div 2+80; 143 | Top := fy; 144 | Width := 70; 145 | //fy := fy + Height + dy; 146 | end; 147 | 148 | 149 | if frm.ShowModal = mrOk then 150 | begin 151 | S := TMemo(FindChildComp(frm, 'memoConfig')).Lines.Text; 152 | if Trim(res) <> Trim(S) then 153 | TMemo(FindChildComp(frm, 'memoConfig')).Lines.SaveToFile(fn); 154 | Result :=True; //返回结果 155 | end; 156 | finally 157 | frm.Free; 158 | end; 159 | end; 160 | var 161 | sys, cmd, conf, pth, cmdline: String; 162 | begin 163 | pth := GetEnv('APPFOLDER'); 164 | if pth <> '' then 165 | if (pth[Length(pth)] = '\') or (pth[Length(pth)] = '/') then 166 | Delete(pth, Length(pth), 1); 167 | 168 | sys := GetEnv('SYSTEMTYPE'); 169 | if (sys='DARWIN') or (sys='UNIX') then 170 | begin 171 | cmd := '/jdbc/ezjdbc.sh'; 172 | conf := '/jdbc/conf.sh'; 173 | SetCurrentDir(pth+'/jdbc'); 174 | if (sys='DARWIN') then 175 | cmdline := 'open -a Terminal "'+pth+cmd+'"' 176 | else 177 | cmdline := 'xterm -e bash -c '''+pth+cmd+''' &'; 178 | end 179 | else 180 | begin 181 | cmd := '\jdbc\ezjdbc.bat'; 182 | conf := '\jdbc\conf.bat'; 183 | SetCurrentDir(pth+'\jdbc'); 184 | cmdline := pth+cmd; 185 | end; 186 | 187 | if not FileExists(pth+cmd) then 188 | begin 189 | alert('Command file not found: '+pth+cmd); 190 | Exit; 191 | end; 192 | if not FileExists(pth+conf) then 193 | begin 194 | alert('Config file not found: '+pth+conf); 195 | Exit; 196 | end; 197 | if ShowConfigForm(pth+conf) then 198 | begin 199 | if (sys='DARWIN') or (sys='UNIX') then 200 | RunCmd(cmdline, 1) 201 | else 202 | ShellOpen(cmdline, '', ''); 203 | end; 204 | 205 | end; 206 | 207 | initialization 208 | RegisterPasLite('JDBC server', TDmlPasScriptorLite_JDBCServer, 'Tool'); 209 | 210 | end. 211 | 212 | -------------------------------------------------------------------------------- /DML/Scripts/PasGen_RandColor.pas: -------------------------------------------------------------------------------- 1 | unit PasGen_RandColor; 2 | 3 | {$mode delphi} 4 | 5 | interface 6 | 7 | uses 8 | LCLIntf, LCLType, LMessages, Messages, SysUtils, Classes, Graphics, Controls, 9 | Forms, Dialogs, ExtDlgs, Variants, DB, Menus, 10 | CtMetaTable, CTMetaData, CtObjSerialer, DmlScriptPublic, DmlPasScriptLite; 11 | 12 | type 13 | 14 | { TDmlPasScriptorLite_RandColor } 15 | 16 | TDmlPasScriptorLite_RandColor=class(TDmlPasScriptorLite) 17 | public 18 | { Public declarations } 19 | procedure Exec(ARule, AScript: string); override; 20 | end; 21 | 22 | implementation 23 | 24 | uses 25 | StdCtrls, WindowFuncs, ActnList; 26 | 27 | { TDmlPasScriptorLite_RandColor } 28 | 29 | 30 | procedure TDmlPasScriptorLite_RandColor.Exec(ARule, AScript: string); 31 | // 以下代码来源于EZDML自定义工具脚本模板RandColor.pas 32 | 33 | function GetLinkCount(tb: TCtMetaTable): Integer; 34 | var 35 | S: string; 36 | ss: TStringList; 37 | K: Integer; 38 | fd: TCtMetaField; 39 | begin 40 | Result := 0; 41 | for K:=0 to tb.MetaFields.Count -1 do 42 | begin 43 | fd := tb.MetaFields.Items[K]; 44 | if (fd.RelateTable <> '') and (fd.RelateField <> '') then 45 | Inc(Result); 46 | end; 47 | s:=tb.getOneToManyInfo(false); 48 | if Trim(s)='' then 49 | Exit; 50 | ss := TStringList.Create; 51 | try 52 | ss.Text := Trim(S); 53 | Result := Result + ss.Count; 54 | finally 55 | ss.Free; 56 | end; 57 | end; 58 | 59 | function GetRandColor(lkC: Integer): Integer; 60 | var 61 | r, g, b, lk: Integer; 62 | begin 63 | lk := lkC+1; 64 | lk := lk*lk; 65 | if lk>48 then 66 | lk := 48; 67 | if lk<10 then 68 | lk := 10; 69 | 70 | r := 245-Random(lk); 71 | g := 245-Random(lk); 72 | b := 245-Random(lk); 73 | Result := r+(g shl 8) + (b shl 16); 74 | end; 75 | 76 | var 77 | I, J, K, C: Integer; 78 | md: TCtDataModelGraph; 79 | tb: TCtMetaTable; 80 | fd: TCtMetaField; 81 | begin 82 | if not Confirm('此操作将对选中的对象设置设置随机颜色(按连接数量决定颜色深浅,将忽略少于两个连接的对象),确定要继续吗?') then 83 | Exit; 84 | Randomize; 85 | C := 0; 86 | for I:=0 to AllModels.Count-1 do 87 | if AllModels.Items[I] = AllModels.CurDataModel then 88 | begin 89 | md := AllModels.Items[I]; 90 | CurOut.Add('Model'+IntToStr(I)+': '+md.NameCaption); 91 | 92 | for J:=0 to md.Tables.Count-1 do 93 | if md.Tables.Items[J].IsSelected then 94 | //if CurTable <> nil then if md.Tables.Items[J].Name = CurTable.Name then 95 | begin 96 | tb := md.Tables.Items[J]; 97 | if (tb.BgColor<>0) and (tb.BgColor<>$ffffff) then 98 | ;// Continue; 99 | K := GetLinkCount(tb); 100 | if K>=2 then 101 | begin 102 | tb.BgColor := GetRandColor(K); 103 | DoTablePropsChanged(Tb); 104 | CurOut.Add(' '+IntToStr(K)+': '+tb.NameCaption+' - '+IntToStr(tb.BgColor)); 105 | Inc(C); 106 | end; 107 | end; 108 | end; 109 | if C>0 then 110 | begin 111 | TAction(FindChildComp(Application.MainForm,'actRefresh')).Execute; 112 | end; 113 | end; 114 | 115 | initialization 116 | RegisterPasLite('RandColor', TDmlPasScriptorLite_RandColor, 'Tool'); 117 | 118 | end. 119 | 120 | -------------------------------------------------------------------------------- /DML/Scripts/PasGen_Test.pas: -------------------------------------------------------------------------------- 1 | unit PasGen_Test; 2 | 3 | {$mode delphi} 4 | 5 | interface 6 | 7 | uses 8 | LCLIntf, LCLType, LMessages, Messages, SysUtils, Classes, Graphics, Controls, 9 | Forms, Dialogs, ExtDlgs, Variants, DB, Menus, 10 | CtMetaTable, CTMetaData, CtObjSerialer, DmlScriptPublic, DmlPasScriptLite; 11 | 12 | type 13 | 14 | { TDmlPasScriptorLite_Test } 15 | 16 | TDmlPasScriptorLite_Test=class(TDmlPasScriptorLite) 17 | public 18 | { Public declarations } 19 | procedure Exec(ARule, AScript: string); override; 20 | end; 21 | 22 | implementation 23 | 24 | { TDmlPasScriptorLite_Test } 25 | 26 | 27 | procedure TDmlPasScriptorLite_Test.Exec(ARule, AScript: string); 28 | begin 29 | CurOut.Add('Hello world!'); 30 | end; 31 | 32 | initialization 33 | RegisterPasLite('Hello world', TDmlPasScriptorLite_Test, 'Table'); 34 | 35 | end. 36 | 37 | -------------------------------------------------------------------------------- /DML/SqlEditor/uDMLSqlEditor.lrj: -------------------------------------------------------------------------------- 1 | {"version":1,"strings":[ 2 | {"hash":98939356,"name":"tfrmdmlsqleditor.caption","sourcebytes":[83,81,76,32,84,111,111,108],"value":"SQL Tool"}, 3 | {"hash":147505610,"name":"tfrmdmlsqleditor.label1.caption","sourcebytes":[38,82,101,115,117,108,116,58],"value":"&Result:"}, 4 | {"hash":5617146,"name":"tfrmdmlsqleditor.labelsql.caption","sourcebytes":[83,38,81,76,58],"value":"S&QL:"}, 5 | {"hash":1021,"name":"tfrmdmlsqleditor.sbtnsqlprev.caption","sourcebytes":[60,61],"value":"<="}, 6 | {"hash":1038,"name":"tfrmdmlsqleditor.sbtnsqlnext.caption","sourcebytes":[61,62],"value":"=>"}, 7 | {"hash":35238690,"name":"tfrmdmlsqleditor.sbtnclearall.hint","sourcebytes":[67,108,101,97,114,32,101,100,105,116,111,114],"value":"Clear editor"}, 8 | {"hash":4860802,"name":"tfrmdmlsqleditor.sbtnclearall.caption","sourcebytes":[67,108,101,97,114],"value":"Clear"}, 9 | {"hash":202983525,"name":"tfrmdmlsqleditor.sbtnconnectdb.hint","sourcebytes":[67,111,110,110,101,99,116,32,100,97,116,97,98,97,115,101],"value":"Connect database"}, 10 | {"hash":174410724,"name":"tfrmdmlsqleditor.sbtnconnectdb.caption","sourcebytes":[67,111,110,110,101,99,116],"value":"Connect"}, 11 | {"hash":155277061,"name":"tfrmdmlsqleditor.lbstatus.caption","sourcebytes":[83,116,97,116,117,115,32,109,101,115,115,97,103,101],"value":"Status message"}, 12 | {"hash":124578900,"name":"tfrmdmlsqleditor.sbtntoggletblist.hint","sourcebytes":[83,104,111,119,47,104,105,100,101,32,116,97,98,108,101,32,108,105,115,116],"value":"Show/hide table list"}, 13 | {"hash":41195316,"name":"tfrmdmlsqleditor.sbtntoggletblist.caption","sourcebytes":[84,97,98,108,101,32,108,105,115,116],"value":"Table list"}, 14 | {"hash":238329164,"name":"tfrmdmlsqleditor.acteditselall.caption","sourcebytes":[97,99,116,69,100,105,116,83,101,108,97,108,108],"value":"actEditSelall"}, 15 | {"hash":216736265,"name":"tfrmdmlsqleditor.actexec.caption","sourcebytes":[69,120,101,99,117,116,101,40,70,56,41],"value":"Execute(F8)"}, 16 | {"hash":130154804,"name":"tfrmdmlsqleditor.actcopyrec.caption","sourcebytes":[67,111,112,121,32,114,101,99,111,114,100],"value":"Copy record"}, 17 | {"hash":108749964,"name":"tfrmdmlsqleditor.actcopyall.caption","sourcebytes":[67,111,112,121,32,97,108,108],"value":"Copy all"}, 18 | {"hash":103972875,"name":"tfrmdmlsqleditor.actrollback.caption","sourcebytes":[114,111,108,108,98,97,99,107],"value":"rollback"}, 19 | {"hash":111559684,"name":"tfrmdmlsqleditor.actcommit.caption","sourcebytes":[99,111,109,109,105,116],"value":"commit"}, 20 | {"hash":108752636,"name":"tfrmdmlsqleditor.actcopycol.caption","sourcebytes":[67,111,112,121,32,99,111,108],"value":"Copy col"}, 21 | {"hash":79384371,"name":"tfrmdmlsqleditor.mn_showtableprops.caption","sourcebytes":[84,97,98,108,101,32,112,114,111,112,101,114,116,105,101,115],"value":"Table properties"}, 22 | {"hash":197428465,"name":"tfrmdmlsqleditor.mn_querytabledata.caption","sourcebytes":[81,117,101,114,121,32,116,97,98,108,101,32,100,97,116,97],"value":"Query table data"}, 23 | {"hash":129437269,"name":"tfrmdmlsqleditor.mn_copytbname.caption","sourcebytes":[67,111,112,121,32,110,97,109,101],"value":"Copy name"}, 24 | {"hash":146640072,"name":"tfrmdmlsqleditor.mn_tbsrefresh.caption","sourcebytes":[82,101,102,114,101,115,104],"value":"Refresh"} 25 | ]} 26 | -------------------------------------------------------------------------------- /DML/SqlEditor/uDMLSqlEditor.pas: -------------------------------------------------------------------------------- 1 | unit uDMLSqlEditor; 2 | 3 | {$mode delphi} 4 | 5 | interface 6 | 7 | uses 8 | Classes, SysUtils, Forms, Controls 9 | {$ifndef EZDML_LITE}, uDMLSqlEditorNew, uDMLSqlTabs{$else}, uDMLSqlEditorO{$endif}; 10 | 11 | type 12 | {$ifndef EZDML_LITE} 13 | TfrmDmlSqlEditorN = TfrmDmlSqlEditor; 14 | {$else} 15 | TfrmDmlSqlEditorN = TfrmDmlSqlEditorO; 16 | {$endif} 17 | 18 | procedure ShowSqlEditor(initSql: string=''); 19 | 20 | implementation 21 | 22 | procedure ShowSqlEditor(initSql: string); 23 | var 24 | vDmlSqlEditorForm: TfrmDmlSqlEditorN; 25 | {$ifndef EZDML_LITE} 26 | bRect: TRect; 27 | bModal: Boolean; 28 | {$endif} 29 | begin 30 | {$ifdef EZDML_LITE} 31 | vDmlSqlEditorForm := TfrmDmlSqlEditorN.Create(Application); 32 | vDmlSqlEditorForm.PanelTbs.Tag := 1; 33 | if initSql <> '' then 34 | begin 35 | vDmlSqlEditorForm.MemoSql.Text := initSql; 36 | vDmlSqlEditorForm.AutoExecSql := initSql; 37 | end; 38 | vDmlSqlEditorForm.ShowModal; 39 | {$else} 40 | bModal := Application.ModalLevel>0; 41 | if bModal then 42 | begin 43 | vDmlSqlEditorForm := TfrmDmlSqlEditorN.Create(Application); 44 | vDmlSqlEditorForm.PanelTbs.Tag := 1; 45 | if initSql <> '' then 46 | begin 47 | vDmlSqlEditorForm.MemoSql.Text := initSql; 48 | vDmlSqlEditorForm.AutoExecSql := initSql; 49 | end; 50 | vDmlSqlEditorForm.ShowModal; 51 | //if frmSqlTabs.FSwitchToViewMode then 52 | //begin 53 | // frmSqlTabs.FSwitchToViewMode := False; 54 | // frmSqlTabs.bbtnView.Visible:=False; 55 | // frmSqlTabs.bbtnView.Tag:=1; 56 | // frmSqlTabs.Position:=poDesigned; 57 | // //frmSqlTabs.FormStyle:=fsStayOnTop; 58 | // frmSqlTabs.ShowInTaskBar := stAlways; 59 | // frmSqlTabs.Show; 60 | //end; 61 | Exit; 62 | end; 63 | 64 | if frmSqlTabs = nil then 65 | begin 66 | frmSqlTabs := TfrmSqlTabs.Create(Application); 67 | vDmlSqlEditorForm := frmSqlTabs.frmDmlSqlEditorMain; 68 | frmSqlTabs.LoadIniFile; 69 | if initSql = '' then 70 | vDmlSqlEditorForm.CheckLoadLast; 71 | end 72 | else 73 | begin 74 | vDmlSqlEditorForm := frmSqlTabs.CreateNewSqlEditor(nil); 75 | end; 76 | vDmlSqlEditorForm.PanelTbs.Tag := 1; 77 | if initSql <> '' then 78 | begin 79 | vDmlSqlEditorForm.MemoSql.Text := initSql; 80 | vDmlSqlEditorForm.AutoExecSql := initSql; 81 | vDmlSqlEditorForm.RefreshTitle(initSql); 82 | end; 83 | if frmSqlTabs.Showing then 84 | begin 85 | frmSqlTabs.BringToFront; 86 | Exit; 87 | end; 88 | frmSqlTabs.FormStyle := fsStayOnTop; 89 | frmSqlTabs.Show; 90 | 91 | {$endif} 92 | end; 93 | 94 | end. 95 | 96 | -------------------------------------------------------------------------------- /DML/SqlEditor/udmlsqleditoro.lrj: -------------------------------------------------------------------------------- 1 | {"version":1,"strings":[ 2 | {"hash":98939356,"name":"tfrmdmlsqleditoro.caption","sourcebytes":[83,81,76,32,84,111,111,108],"value":"SQL Tool"}, 3 | {"hash":147505610,"name":"tfrmdmlsqleditoro.label1.caption","sourcebytes":[38,82,101,115,117,108,116,58],"value":"&Result:"}, 4 | {"hash":5617146,"name":"tfrmdmlsqleditoro.labelsql.caption","sourcebytes":[83,38,81,76,58],"value":"S&QL:"}, 5 | {"hash":1021,"name":"tfrmdmlsqleditoro.sbtnsqlprev.caption","sourcebytes":[60,61],"value":"<="}, 6 | {"hash":1038,"name":"tfrmdmlsqleditoro.sbtnsqlnext.caption","sourcebytes":[61,62],"value":"=>"}, 7 | {"hash":35238690,"name":"tfrmdmlsqleditoro.sbtnclearall.hint","sourcebytes":[67,108,101,97,114,32,101,100,105,116,111,114],"value":"Clear editor"}, 8 | {"hash":4860802,"name":"tfrmdmlsqleditoro.sbtnclearall.caption","sourcebytes":[67,108,101,97,114],"value":"Clear"}, 9 | {"hash":202983525,"name":"tfrmdmlsqleditoro.sbtnconnectdb.hint","sourcebytes":[67,111,110,110,101,99,116,32,100,97,116,97,98,97,115,101],"value":"Connect database"}, 10 | {"hash":174410724,"name":"tfrmdmlsqleditoro.sbtnconnectdb.caption","sourcebytes":[67,111,110,110,101,99,116],"value":"Connect"}, 11 | {"hash":155277061,"name":"tfrmdmlsqleditoro.lbstatus.caption","sourcebytes":[83,116,97,116,117,115,32,109,101,115,115,97,103,101],"value":"Status message"}, 12 | {"hash":124578900,"name":"tfrmdmlsqleditoro.sbtntoggletblist.hint","sourcebytes":[83,104,111,119,47,104,105,100,101,32,116,97,98,108,101,32,108,105,115,116],"value":"Show/hide table list"}, 13 | {"hash":41195316,"name":"tfrmdmlsqleditoro.sbtntoggletblist.caption","sourcebytes":[84,97,98,108,101,32,108,105,115,116],"value":"Table list"}, 14 | {"hash":238329164,"name":"tfrmdmlsqleditoro.acteditselall.caption","sourcebytes":[97,99,116,69,100,105,116,83,101,108,97,108,108],"value":"actEditSelall"}, 15 | {"hash":216736265,"name":"tfrmdmlsqleditoro.actexec.caption","sourcebytes":[69,120,101,99,117,116,101,40,70,56,41],"value":"Execute(F8)"}, 16 | {"hash":130154804,"name":"tfrmdmlsqleditoro.actcopyrec.caption","sourcebytes":[67,111,112,121,32,114,101,99,111,114,100],"value":"Copy record"}, 17 | {"hash":108749964,"name":"tfrmdmlsqleditoro.actcopyall.caption","sourcebytes":[67,111,112,121,32,97,108,108],"value":"Copy all"}, 18 | {"hash":103972875,"name":"tfrmdmlsqleditoro.actrollback.caption","sourcebytes":[114,111,108,108,98,97,99,107],"value":"rollback"}, 19 | {"hash":111559684,"name":"tfrmdmlsqleditoro.actcommit.caption","sourcebytes":[99,111,109,109,105,116],"value":"commit"}, 20 | {"hash":108752636,"name":"tfrmdmlsqleditoro.actcopycol.caption","sourcebytes":[67,111,112,121,32,99,111,108],"value":"Copy col"}, 21 | {"hash":79384371,"name":"tfrmdmlsqleditoro.mn_showtableprops.caption","sourcebytes":[84,97,98,108,101,32,112,114,111,112,101,114,116,105,101,115],"value":"Table properties"}, 22 | {"hash":197428465,"name":"tfrmdmlsqleditoro.mn_querytabledata.caption","sourcebytes":[81,117,101,114,121,32,116,97,98,108,101,32,100,97,116,97],"value":"Query table data"}, 23 | {"hash":129437269,"name":"tfrmdmlsqleditoro.mn_copytbname.caption","sourcebytes":[67,111,112,121,32,110,97,109,101],"value":"Copy name"}, 24 | {"hash":146640072,"name":"tfrmdmlsqleditoro.mn_tbsrefresh.caption","sourcebytes":[82,101,102,114,101,115,104],"value":"Refresh"}, 25 | {"hash":174410724,"name":"tfrmdmlsqleditoro.menuitemdbconn.caption","sourcebytes":[67,111,110,110,101,99,116],"value":"Connect"}, 26 | {"hash":27608884,"name":"tfrmdmlsqleditoro.menuitemdedicatedconn.caption","sourcebytes":[68,101,100,105,99,97,116,101,100,32,99,111,110,110,101,99,116],"value":"Dedicated connect"} 27 | ]} 28 | -------------------------------------------------------------------------------- /Settings/uFrameCustPhyFieldTypes.lfm: -------------------------------------------------------------------------------- 1 | object FrameCustPhyFieldTypes: TFrameCustPhyFieldTypes 2 | Left = 0 3 | Height = 202 4 | Top = 0 5 | Width = 511 6 | ClientHeight = 202 7 | ClientWidth = 511 8 | TabOrder = 0 9 | DesignLeft = 625 10 | DesignTop = 521 11 | object StringGridPT: TStringGrid 12 | Left = 0 13 | Height = 202 14 | Top = 0 15 | Width = 511 16 | Align = alClient 17 | DefaultColWidth = 81 18 | Options = [goFixedVertLine, goFixedHorzLine, goVertLine, goHorzLine, goColSizing, goEditing, goAlwaysShowEditor, goThumbTracking, goSmoothScroll] 19 | TabOrder = 0 20 | OnPrepareCanvas = StringGridPTPrepareCanvas 21 | end 22 | end 23 | -------------------------------------------------------------------------------- /Settings/uFrameCustPhyFieldTypes.pas: -------------------------------------------------------------------------------- 1 | unit uFrameCustPhyFieldTypes; 2 | 3 | {$mode delphi} 4 | 5 | interface 6 | 7 | uses 8 | Classes, SysUtils, Forms, Controls, Graphics, Grids, CtMetaTable; 9 | 10 | type 11 | 12 | { TFrameCustPhyFieldTypes } 13 | 14 | TFrameCustPhyFieldTypes = class(TFrame) 15 | StringGridPT: TStringGrid; 16 | procedure StringGridPTPrepareCanvas(sender: TObject; aCol, aRow: Integer; 17 | aState: TGridDrawState); 18 | private 19 | FOrigCell: array[1..7,1..7] of string; 20 | public 21 | procedure Load(src: TStrings); 22 | procedure Save(src: TStrings); 23 | end; 24 | 25 | 26 | implementation 27 | 28 | {$R *.lfm} 29 | 30 | uses 31 | ezdmlstrs; 32 | 33 | const 34 | FCPField_dbNames: array[0..7] of String=('','Default','ORACLE','MYSQL','SQLSERVER','SQLITE','POSTGRESQL','HIVE'); 35 | 36 | { TFrameCustPhyFieldTypes } 37 | 38 | procedure TFrameCustPhyFieldTypes.StringGridPTPrepareCanvas(sender: TObject; 39 | aCol, aRow: Integer; aState: TGridDrawState); 40 | var 41 | S: String; 42 | begin 43 | if gdSelected in aState then 44 | Exit; 45 | 46 | if aCol >= 1 then 47 | if aRow >= 1 then 48 | begin 49 | S := StringGridPT.Cells[aCol, aRow]; 50 | if S <> '' then 51 | if FOrigCell[aCol][aRow] <> S then 52 | begin 53 | StringGridPT.Canvas.Brush.Color := clYellow; 54 | end; 55 | end; 56 | end; 57 | 58 | procedure TFrameCustPhyFieldTypes.Load(src: TStrings); 59 | function GetCustFieldTp(tp: TCtFieldDataType; db: Integer; ft: String): String; 60 | var 61 | dbType, fk, S, V: string; 62 | I, po: Integer; 63 | begin 64 | Result := ft; 65 | dbType := ''; 66 | if db>1 then 67 | dbType := FCPField_dbNames[db]; 68 | fk := DEF_CTMETAFIELD_DATATYPE_NAMES_ENG[tp]; 69 | if dbType <> '' then 70 | fk := fk+'_'+dbType; 71 | for I := 0 to src.Count-1 do 72 | begin 73 | po := Pos(':', src[I]); 74 | S := Copy(src[I], 1, po - 1); 75 | V := Trim(Copy(src[I], po + 1, Length(src[I]))); 76 | if UpperCase(fk) = UpperCase(S) then 77 | begin 78 | if V <> '' then 79 | Result := V; 80 | Exit; 81 | end; 82 | end; 83 | end; 84 | var 85 | AllCtFieldDataTypeNames: array[0..7] of TCtFieldDataTypeNames; 86 | t: TCtFieldDataType; 87 | X,Y: integer; 88 | ft: string; 89 | begin 90 | AllCtFieldDataTypeNames[0] := DEF_CTMETAFIELD_DATATYPE_NAMES_ENG; 91 | AllCtFieldDataTypeNames[1] := DEF_CTMETAFIELD_DATATYPE_NAMES_STD; 92 | AllCtFieldDataTypeNames[2] := DEF_CTMETAFIELD_DATATYPE_NAMES_ORACLE; 93 | AllCtFieldDataTypeNames[3] := DEF_CTMETAFIELD_DATATYPE_NAMES_MYSQL; 94 | AllCtFieldDataTypeNames[4] := DEF_CTMETAFIELD_DATATYPE_NAMES_SQLSERVER; 95 | AllCtFieldDataTypeNames[5] := DEF_CTMETAFIELD_DATATYPE_NAMES_SQLITE; 96 | AllCtFieldDataTypeNames[6] := DEF_CTMETAFIELD_DATATYPE_NAMES_POSTGRESQL; 97 | AllCtFieldDataTypeNames[7] := DEF_CTMETAFIELD_DATATYPE_NAMES_HIVE; 98 | 99 | StringGridPT.ColCount:= Length(AllCtFieldDataTypeNames); 100 | StringGridPT.RowCount:= 8; 101 | for X := 0 to High(AllCtFieldDataTypeNames) do 102 | begin 103 | StringGridPT.Cells[X, 0] := FCPField_dbNames[X]; 104 | for t := cfdtString to cfdtBlob do 105 | begin 106 | Y := Integer(T); 107 | ft := AllCtFieldDataTypeNames[X][t]; 108 | if X=0 then 109 | if ft <> DEF_CTMETAFIELD_DATATYPE_NAMES_CHN[t] then 110 | ft := DEF_CTMETAFIELD_DATATYPE_NAMES_CHN[t] + '('+ft+')'; 111 | 112 | if X = 1 then 113 | ft := '' 114 | else if t=cfdtString then 115 | begin 116 | if (X>1) and (X<=4) then 117 | ft := ft+'(4000)'; 118 | end 119 | else if t = cfdtInteger then 120 | begin 121 | if X = 2 then 122 | ft := ft + '(10)'; 123 | end; 124 | 125 | if X > 0 then 126 | begin 127 | FOrigCell[X][Y] := ft; 128 | ft := GetCustFieldTp(t, X, ft); 129 | end; 130 | StringGridPT.Cells[X, Y] := ft; 131 | end; 132 | end; 133 | StringGridPT.Cells[1, 0] := srEzdmlDefault; 134 | StringGridPT.AutoSizeColumns; 135 | 136 | if StringGridPT.ColWidths[1] < 80 then 137 | StringGridPT.ColWidths[1] := 80; 138 | end; 139 | 140 | procedure TFrameCustPhyFieldTypes.Save(src: TStrings); 141 | procedure AddCustTp(tp: TCtFieldDataType; db: Integer; ft: String); 142 | var 143 | dbType, fk, S: string; 144 | begin 145 | dbType := ''; 146 | if db>1 then 147 | dbType := FCPField_dbNames[db]; 148 | fk := DEF_CTMETAFIELD_DATATYPE_NAMES_ENG[tp]; 149 | if dbType <> '' then 150 | fk := fk+'_'+dbType; 151 | S := fk+':'+ft; 152 | src.ADD(S); 153 | end; 154 | var 155 | t: TCtFieldDataType; 156 | X,Y: integer; 157 | ft, V: string; 158 | begin 159 | src.Clear; 160 | for X := 1 to High(FCPField_dbNames) do 161 | begin 162 | for t := cfdtString to cfdtBlob do 163 | begin 164 | Y := Integer(T); 165 | ft :=FOrigCell[X][Y]; 166 | V := StringGridPT.Cells[X, Y]; 167 | if V <> '' then 168 | if V <> ft then 169 | AddCustTp(T, X, V); 170 | end; 171 | end; 172 | end; 173 | 174 | end. 175 | 176 | -------------------------------------------------------------------------------- /SubForms/uFormDmlSearch.lrj: -------------------------------------------------------------------------------- 1 | {"version":1,"strings":[ 2 | {"hash":123221859,"name":"tfrmdmlsearch.caption","sourcebytes":[83,101,97,114,99,104,32,84,97,98,108,101,115,32,97,110,100,32,70,105,101,108,100,115],"value":"Search Tables and Fields"}, 3 | {"hash":1339,"name":"tfrmdmlsearch.btnok.caption","sourcebytes":[79,75],"value":"OK"}, 4 | {"hash":77089212,"name":"tfrmdmlsearch.btncancel.caption","sourcebytes":[67,97,110,99,101,108],"value":"Cancel"}, 5 | {"hash":163088874,"name":"tfrmdmlsearch.lbsearchcap.caption","sourcebytes":[83,101,97,114,99,104,58],"value":"Search:"}, 6 | {"hash":200686654,"name":"tfrmdmlsearch.lbsearchtip.caption","sourcebytes":[69,110,116,101,114,32,102,117,108,108,32,111,114,32,112,97,114,116,32,111,102,32,111,98,106,101,99,116,32,110,97,109,101,46,32,85,115,101,32,83,80,65,67,69,32,116,111,32,115,101,114,112,101,114,97,116,101,32,107,101,121,119,111,114,100,115,46],"value":"Enter full or part of object name. Use SPACE to serperate keywords."}, 7 | {"hash":92818826,"name":"tfrmdmlsearch.lbrangecap.caption","sourcebytes":[82,97,110,103,101,58],"value":"Range:"}, 8 | {"hash":4294967295,"name":"tfrmdmlsearch.stringgridsearchres.columns[0].title.caption","sourcebytes":[],"value":""}, 9 | {"hash":346165,"name":"tfrmdmlsearch.stringgridsearchres.columns[1].title.caption","sourcebytes":[78,97,109,101],"value":"Name"}, 10 | {"hash":159887390,"name":"tfrmdmlsearch.stringgridsearchres.columns[2].title.caption","sourcebytes":[67,97,112,116,105,111,110],"value":"Caption"}, 11 | {"hash":145147077,"name":"tfrmdmlsearch.stringgridsearchres.columns[3].title.caption","sourcebytes":[68,97,116,97,84,121,112,101],"value":"DataType"}, 12 | {"hash":103867912,"name":"tfrmdmlsearch.stringgridsearchres.columns[4].title.caption","sourcebytes":[68,97,116,97,76,101,110,103,116,104],"value":"DataLength"}, 13 | {"hash":181268517,"name":"tfrmdmlsearch.stringgridsearchres.columns[5].title.caption","sourcebytes":[73,110,100,101,120,84,121,112,101],"value":"IndexType"}, 14 | {"hash":343103,"name":"tfrmdmlsearch.stringgridsearchres.columns[6].title.caption","sourcebytes":[77,101,109,111],"value":"Memo"}, 15 | {"hash":171665052,"name":"tfrmdmlsearch.editselectall1.caption","sourcebytes":[83,101,108,101,99,116,32,38,65,108,108],"value":"Select &All"}, 16 | {"hash":182988884,"name":"tfrmdmlsearch.editselectall1.hint","sourcebytes":[83,101,108,101,99,116,32,65,108,108,124,83,101,108,101,99,116,115,32,116,104,101,32,101,110,116,105,114,101,32,100,111,99,117,109,101,110,116],"value":"Select All|Selects the entire document"}, 17 | {"hash":173967955,"name":"tfrmdmlsearch.actviewprop.caption","sourcebytes":[86,105,101,119,32,112,114,111,112,101,114,116,105,101,115],"value":"View properties"} 18 | ]} 19 | -------------------------------------------------------------------------------- /SubForms/uFormDmlSearch.pas: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/huzgd/ezdml/5fbf534685b0e38f3d634eaba6f6ffe96999f3b8/SubForms/uFormDmlSearch.pas -------------------------------------------------------------------------------- /SubForms/uFormEzdmlDbFile.lrj: -------------------------------------------------------------------------------- 1 | {"version":1,"strings":[ 2 | {"hash":66894053,"name":"tfrmezdmldbfile.caption","sourcebytes":[68,97,116,97,98,97,115,101,32,102,105,108,101],"value":"Database file"}, 3 | {"hash":174410724,"name":"tfrmezdmldbfile.label1.caption","sourcebytes":[67,111,110,110,101,99,116],"value":"Connect"}, 4 | {"hash":208634625,"name":"tfrmezdmldbfile.label2.caption","sourcebytes":[67,104,111,111,115,101,32,83,99,104,101,109,97],"value":"Choose Schema"}, 5 | {"hash":5046979,"name":"tfrmezdmldbfile.label3.caption","sourcebytes":[70,105,108,101,115],"value":"Files"}, 6 | {"hash":80755394,"name":"tfrmezdmldbfile.label5.caption","sourcebytes":[70,105,108,116,101,114],"value":"Filter"}, 7 | {"hash":1339,"name":"tfrmezdmldbfile.btnok.caption","sourcebytes":[79,75],"value":"OK"}, 8 | {"hash":77089212,"name":"tfrmezdmldbfile.btncancel.caption","sourcebytes":[67,97,110,99,101,108],"value":"Cancel"}, 9 | {"hash":174410724,"name":"tfrmezdmldbfile.btndblogon.hint","sourcebytes":[67,111,110,110,101,99,116],"value":"Connect"}, 10 | {"hash":782,"name":"tfrmezdmldbfile.btndblogon.caption","sourcebytes":[46,46],"value":".."}, 11 | {"hash":41356085,"name":"tfrmezdmldbfile.label4.caption","sourcebytes":[70,105,108,101,32,110,97,109,101],"value":"File name"}, 12 | {"hash":346165,"name":"tfrmezdmldbfile.listviewfiles.columns[0].caption","sourcebytes":[78,97,109,101],"value":"Name"}, 13 | {"hash":368901,"name":"tfrmezdmldbfile.listviewfiles.columns[1].caption","sourcebytes":[83,105,122,101],"value":"Size"}, 14 | {"hash":255611909,"name":"tfrmezdmldbfile.listviewfiles.columns[2].caption","sourcebytes":[77,111,100,105,102,105,101,100,32,100,97,116,101],"value":"Modified date"}, 15 | {"hash":95406722,"name":"tfrmezdmldbfile.listviewfiles.columns[3].caption","sourcebytes":[77,111,100,105,102,105,101,114],"value":"Modifier"}, 16 | {"hash":343103,"name":"tfrmezdmldbfile.listviewfiles.columns[4].caption","sourcebytes":[77,101,109,111],"value":"Memo"}, 17 | {"hash":218264724,"name":"tfrmezdmldbfile.listviewfiles.columns[5].caption","sourcebytes":[70,105,108,101,32,73,68],"value":"File ID"}, 18 | {"hash":214540302,"name":"tfrmezdmldbfile.listviewfiles.columns[6].caption","sourcebytes":[86,101,114,115,105,111,110],"value":"Version"}, 19 | {"hash":63447566,"name":"tfrmezdmldbfile.label6.caption","sourcebytes":[69,90,68,77,76,32,115,117,112,112,111,114,116,115,32,115,97,118,105,110,103,32,109,111,100,101,108,32,102,105,108,101,115,32,116,111,32,116,104,101,32,100,97,116,97,98,97,115,101,46,32,65,115,32,108,111,110,103,32,97,115,32,121,111,117,32,99,97,110,32,97,99,99,101,115,115,32,116,104,101,32,100,97,116,97,98,97,115,101,44,32,121,111,117,32,99,97,110,32,108,111,97,100,32,116,104,101,32,109,111,100,101,108,32,97,116,32,97,110,121,32,116,105,109,101,44,32,97,110,100,32,110,111,116,105,102,121,32,111,116,104,101,114,32,117,115,101,114,115,32,111,102,32,117,112,100,97,116,101,115,32,105,110,32,114,101,97,108,32,116,105,109,101,32,97,102,116,101,114,32,115,97,118,105,110,103,32,99,104,97,110,103,101,115,44,32,115,111,32,97,115,32,116,111,32,114,101,97,108,105,122,101,32,109,111,100,101,108,32,115,104,97,114,105,110,103,32,97,110,100,32,115,105,109,112,108,101,32,99,111,108,108,97,98,111,114,97,116,105,111,110,46,32,80,108,101,97,115,101,32,110,111,116,101,32,116,104,97,116,32,115,97,118,105,110,103,32,116,104,101,32,100,97,116,97,98,97,115,101,32,109,111,100,101,108,32,102,105,108,101,32,119,105,108,108,32,110,111,116,32,99,104,97,110,103,101,32,97,110,121,32,101,120,105,115,116,105,110,103,32,100,97,116,97,98,97,115,101,32,116,97,98,108,101,32,115,116,114,117,99,116,117,114,101,46,32,89,111,117,32,115,116,105,108,108,32,110,101,101,100,32,116,111,32,112,101,114,102,111,114,109,32,116,104,101,32,100,97,116,97,98,97,115,101,32,103,101,110,101,114,97,116,105,111,110,32,111,112,101,114,97,116,105,111,110,32,116,111,32,109,97,107,101,32,116,104,101,32,109,111,100,101,108,32,100,101,115,105,103,110,32,114,101,115,117,108,116,115,32,101,102,102,101,99,116,105,118,101,46],"value":"EZDML supports saving model files to the database. As long as you can access the database, you can load the model at any time, and notify other users of updates in real time after saving changes, so as to realize model sharing and simple collaboration. Please note that saving the database model file will not change any existing database table structure. You still need to perform the database generation operation to make the model design results effective."}, 20 | {"hash":341403,"name":"tfrmezdmldbfile.rdblock.caption","sourcebytes":[76,111,99,107],"value":"Lock"}, 21 | {"hash":96810395,"name":"tfrmezdmldbfile.rdbunlock.caption","sourcebytes":[85,110,108,111,99,107],"value":"Unlock"}, 22 | {"hash":265439796,"name":"tfrmezdmldbfile.rdbcurlock.caption","sourcebytes":[75,101,101,112,32,99,117,114,114,101,110,116],"value":"Keep current"}, 23 | {"hash":22925706,"name":"tfrmezdmldbfile.label8.caption","sourcebytes":[76,111,99,107,32,111,112,101,114,97,116,105,111,110,58],"value":"Lock operation:"}, 24 | {"hash":133774643,"name":"tfrmezdmldbfile.mn_showhist.caption","sourcebytes":[83,104,111,119,32,104,105,115,116,111,114,121,32,102,105,108,101,115],"value":"Show history files"}, 25 | {"hash":147304590,"name":"tfrmezdmldbfile.mn_lock.caption","sourcebytes":[76,111,99,107,47,85,110,108,111,99,107,46,46,46],"value":"Lock/Unlock..."}, 26 | {"hash":6779279,"name":"tfrmezdmldbfile.mn_memo.caption","sourcebytes":[69,100,105,116,32,109,101,109,111],"value":"Edit memo"}, 27 | {"hash":93079605,"name":"tfrmezdmldbfile.mn_rename.caption","sourcebytes":[82,101,110,97,109,101],"value":"Rename"}, 28 | {"hash":78392485,"name":"tfrmezdmldbfile.mn_delete.caption","sourcebytes":[68,101,108,101,116,101],"value":"Delete"}, 29 | {"hash":41339343,"name":"tfrmezdmldbfile.mn_info.caption","sourcebytes":[70,105,108,101,32,105,110,102,111],"value":"File info"}, 30 | {"hash":146640072,"name":"tfrmezdmldbfile.mn_refresh.caption","sourcebytes":[82,101,102,114,101,115,104],"value":"Refresh"}, 31 | {"hash":174410724,"name":"tfrmezdmldbfile.menuitemdbconn.caption","sourcebytes":[67,111,110,110,101,99,116],"value":"Connect"}, 32 | {"hash":27608884,"name":"tfrmezdmldbfile.menuitemdedicatedconn.caption","sourcebytes":[68,101,100,105,99,97,116,101,100,32,99,111,110,110,101,99,116],"value":"Dedicated connect"} 33 | ]} 34 | -------------------------------------------------------------------------------- /SubForms/uFormOnlineFile.lrj: -------------------------------------------------------------------------------- 1 | {"version":1,"strings":[ 2 | {"hash":67632229,"name":"tfrmonlinefile.caption","sourcebytes":[79,112,101,110,32,111,110,108,105,110,101,32,102,105,108,101],"value":"Open online file"}, 3 | {"hash":1339,"name":"tfrmonlinefile.btnok.caption","sourcebytes":[79,75],"value":"OK"}, 4 | {"hash":77089212,"name":"tfrmonlinefile.btncancel.caption","sourcebytes":[67,97,110,99,101,108],"value":"Cancel"}, 5 | {"hash":2580156,"name":"tfrmonlinefile.label4.caption","sourcebytes":[70,105,108,101,32,85,82,76],"value":"File URL"}, 6 | {"hash":346165,"name":"tfrmonlinefile.listviewfiles.columns[0].caption","sourcebytes":[78,97,109,101],"value":"Name"}, 7 | {"hash":368901,"name":"tfrmonlinefile.listviewfiles.columns[1].caption","sourcebytes":[83,105,122,101],"value":"Size"}, 8 | {"hash":305317,"name":"tfrmonlinefile.listviewfiles.columns[2].caption","sourcebytes":[68,97,116,101],"value":"Date"}, 9 | {"hash":323763,"name":"tfrmonlinefile.listviewfiles.columns[3].caption","sourcebytes":[72,105,116,115],"value":"Hits"}, 10 | {"hash":343103,"name":"tfrmonlinefile.listviewfiles.columns[4].caption","sourcebytes":[77,101,109,111],"value":"Memo"}, 11 | {"hash":218264724,"name":"tfrmonlinefile.listviewfiles.columns[5].caption","sourcebytes":[70,105,108,101,32,73,68],"value":"File ID"}, 12 | {"hash":2580156,"name":"tfrmonlinefile.listviewfiles.columns[6].caption","sourcebytes":[70,105,108,101,32,85,82,76],"value":"File URL"} 13 | ]} 14 | -------------------------------------------------------------------------------- /SubForms/wDmlHelp.lfm: -------------------------------------------------------------------------------- 1 | object frmHelpAbout: TfrmHelpAbout 2 | Left = 414 3 | Height = 488 4 | Top = 108 5 | Width = 731 6 | BorderIcons = [biSystemMenu, biMaximize] 7 | Caption = 'Help' 8 | ClientHeight = 488 9 | ClientWidth = 731 10 | Color = clBtnFace 11 | OnShow = FormShow 12 | ParentFont = True 13 | Position = poScreenCenter 14 | LCLVersion = '2.0.4.0' 15 | object Button1: TButton 16 | Left = 642 17 | Height = 26 18 | Top = 471 19 | Width = 76 20 | Anchors = [akRight, akBottom] 21 | Cancel = True 22 | Caption = 'OK' 23 | Default = True 24 | OnClick = Button1Click 25 | TabOrder = 1 26 | TabStop = False 27 | end 28 | object Memo1: TMemo 29 | Cursor = crArrow 30 | Left = 0 31 | Height = 488 32 | Top = 0 33 | Width = 731 34 | Align = alClient 35 | Color = clInfoBk 36 | ReadOnly = True 37 | ScrollBars = ssVertical 38 | TabOrder = 0 39 | WantReturns = False 40 | WordWrap = False 41 | end 42 | object ActionList1: TActionList 43 | left = 92 44 | top = 240 45 | object EditSelectAll1: TEditSelectAll 46 | Category = 'Edit' 47 | Caption = 'Select &All' 48 | Hint = 'Select All|Selects the entire document' 49 | ShortCut = 16449 50 | end 51 | end 52 | end 53 | -------------------------------------------------------------------------------- /SubForms/wDmlHelp.lrj: -------------------------------------------------------------------------------- 1 | {"version":1,"strings":[ 2 | {"hash":322608,"name":"tfrmhelpabout.caption","sourcebytes":[72,101,108,112],"value":"Help"}, 3 | {"hash":1339,"name":"tfrmhelpabout.button1.caption","sourcebytes":[79,75],"value":"OK"}, 4 | {"hash":171665052,"name":"tfrmhelpabout.editselectall1.caption","sourcebytes":[83,101,108,101,99,116,32,38,65,108,108],"value":"Select &All"}, 5 | {"hash":182988884,"name":"tfrmhelpabout.editselectall1.hint","sourcebytes":[83,101,108,101,99,116,32,65,108,108,124,83,101,108,101,99,116,115,32,116,104,101,32,101,110,116,105,114,101,32,100,111,99,117,109,101,110,116],"value":"Select All|Selects the entire document"} 6 | ]} 7 | -------------------------------------------------------------------------------- /SubForms/wDmlHelp.pas: -------------------------------------------------------------------------------- 1 | unit wDmlHelp; 2 | 3 | {$MODE Delphi} 4 | 5 | interface 6 | 7 | uses 8 | LCLIntf, LCLType, LMessages, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, 9 | Dialogs, StdCtrls, ActnList, StdActns; 10 | 11 | type 12 | TfrmHelpAbout = class(TForm) 13 | Memo1: TMemo; 14 | Button1: TButton; 15 | ActionList1: TActionList; 16 | EditSelectAll1: TEditSelectAll; 17 | procedure FormShow(Sender: TObject); 18 | procedure Button1Click(Sender: TObject); 19 | private 20 | { Private declarations } 21 | public 22 | { Public declarations } 23 | procedure LoadFile(fn: string); 24 | end; 25 | 26 | var 27 | frmHelpAbout: TfrmHelpAbout; 28 | 29 | implementation 30 | 31 | uses ezdmlstrs, dmlstrs, CtMetaTable, WindowFuncs; 32 | 33 | {$R *.lfm} 34 | 35 | procedure TfrmHelpAbout.FormShow(Sender: TObject); 36 | begin 37 | Memo1.WordWrap := True; 38 | end; 39 | 40 | procedure TfrmHelpAbout.LoadFile(fn: string); 41 | begin 42 | if fn = '' then 43 | begin 44 | fn := GetFolderPathOfAppExe; 45 | fn := FolderAddFileName(fn, 'readme.txt'); 46 | fn := GetConfigFile_OfLang(fn); 47 | end; 48 | //Memo1.Lines[0] := Format(Memo1.Lines[0], [srEzdmlVersionNum]); 49 | if FileExists(fn) then 50 | Memo1.Lines.LoadFromFile(fn) 51 | else 52 | Memo1.Lines.Text := 'Help file not found:'#10+fn; 53 | end; 54 | 55 | procedure TfrmHelpAbout.Button1Click(Sender: TObject); 56 | begin 57 | Close; 58 | end; 59 | 60 | end. 61 | 62 | -------------------------------------------------------------------------------- /SubForms/wShareFile.lfm: -------------------------------------------------------------------------------- 1 | object frmShareFile: TfrmShareFile 2 | Left = 612 3 | Height = 480 4 | Top = 320 5 | Width = 601 6 | BorderStyle = bsDialog 7 | Caption = 'Share' 8 | ClientHeight = 480 9 | ClientWidth = 601 10 | LCLVersion = '2.0.12.0' 11 | object Panel1: TPanel 12 | Left = 16 13 | Height = 464 14 | Top = 4 15 | Width = 565 16 | BevelOuter = bvNone 17 | ClientHeight = 464 18 | ClientWidth = 565 19 | TabOrder = 0 20 | object Label1: TLabel 21 | Left = 8 22 | Height = 17 23 | Top = 12 24 | Width = 47 25 | Caption = 'Models:' 26 | ParentColor = False 27 | end 28 | object CheckListBox1: TCheckListBox 29 | Left = 76 30 | Height = 132 31 | Top = 16 32 | Width = 480 33 | Columns = 3 34 | ItemHeight = 0 35 | TabOrder = 0 36 | end 37 | object ckbCheckAll: TCheckBox 38 | Left = 76 39 | Height = 21 40 | Top = 160 41 | Width = 74 42 | Caption = 'Check all' 43 | OnChange = ckbCheckAllChange 44 | TabOrder = 1 45 | end 46 | object LabelTitle: TLabel 47 | Left = 8 48 | Height = 17 49 | Top = 192 50 | Width = 27 51 | Caption = 'Title:' 52 | ParentColor = False 53 | end 54 | object edtTitle: TEdit 55 | Left = 76 56 | Height = 25 57 | Top = 192 58 | Width = 480 59 | TabOrder = 2 60 | end 61 | object Label2: TLabel 62 | Left = 8 63 | Height = 17 64 | Top = 236 65 | Width = 59 66 | Caption = 'Password:' 67 | ParentColor = False 68 | end 69 | object edtPassword: TEdit 70 | Left = 76 71 | Height = 25 72 | Top = 236 73 | Width = 480 74 | TabOrder = 3 75 | TextHint = 'Share plain text if empty' 76 | end 77 | object Label4: TLabel 78 | Left = 76 79 | Height = 72 80 | Top = 272 81 | Width = 480 82 | AutoSize = False 83 | Caption = 'With password specified, the data will be encrypted before transmission and sharing. The system will not store any information related to the password, and you need to inform the recipient of the password yourself' 84 | ParentColor = False 85 | WordWrap = True 86 | end 87 | object btnCancel: TButton 88 | Left = 368 89 | Height = 25 90 | Top = 424 91 | Width = 75 92 | Cancel = True 93 | Caption = 'Cancel' 94 | ModalResult = 2 95 | TabOrder = 4 96 | end 97 | object btnPreview: TButton 98 | Left = 450 99 | Height = 25 100 | Top = 424 101 | Width = 99 102 | Caption = 'Preview' 103 | OnClick = btnPreviewClick 104 | TabOrder = 5 105 | end 106 | end 107 | object Panel2: TPanel 108 | Left = 12 109 | Height = 468 110 | Top = 4 111 | Width = 569 112 | BevelOuter = bvNone 113 | ClientHeight = 468 114 | ClientWidth = 569 115 | TabOrder = 1 116 | Visible = False 117 | object LabelTitle1: TLabel 118 | Left = 8 119 | Height = 17 120 | Top = 20 121 | Width = 27 122 | Caption = 'Title:' 123 | ParentColor = False 124 | end 125 | object edtTitle2: TEdit 126 | Left = 76 127 | Height = 25 128 | Top = 20 129 | Width = 480 130 | ParentColor = True 131 | ReadOnly = True 132 | TabOrder = 0 133 | end 134 | object Label5: TLabel 135 | Left = 8 136 | Height = 17 137 | Top = 60 138 | Width = 62 139 | Caption = 'Expired at:' 140 | ParentColor = False 141 | end 142 | object DateEdit_Expired: TDateEdit 143 | Left = 76 144 | Height = 25 145 | Top = 60 146 | Width = 147 147 | CalendarDisplaySettings = [dsShowHeadings, dsShowDayNames] 148 | OnAcceptDate = DateEdit_ExpiredAcceptDate 149 | DateOrder = doNone 150 | ButtonWidth = 23 151 | NumGlyphs = 1 152 | MaxLength = 0 153 | OnChange = DateEdit_ExpiredChange 154 | TabOrder = 1 155 | TextHint = 'Never for empty' 156 | end 157 | object TimeEdit_Expired: TTimeEdit 158 | Left = 236 159 | Height = 25 160 | Top = 60 161 | Width = 108 162 | ButtonWidth = 23 163 | NumGlyphs = 1 164 | MaxLength = 0 165 | TabOrder = 2 166 | Visible = False 167 | end 168 | object Label3: TLabel 169 | Left = 8 170 | Height = 17 171 | Top = 100 172 | Width = 47 173 | Caption = 'Preview:' 174 | ParentColor = False 175 | end 176 | object MemoPrev: TMemo 177 | Left = 76 178 | Height = 221 179 | Top = 100 180 | Width = 480 181 | ScrollBars = ssBoth 182 | TabOrder = 3 183 | WordWrap = False 184 | end 185 | object edtUrl: TEdit 186 | Left = 76 187 | Height = 25 188 | Top = 364 189 | Width = 480 190 | ParentColor = True 191 | ReadOnly = True 192 | TabOrder = 4 193 | Visible = False 194 | end 195 | object LabelUrl: TLabel 196 | Left = 8 197 | Height = 17 198 | Top = 364 199 | Width = 63 200 | Caption = 'Share URL:' 201 | ParentColor = False 202 | Visible = False 203 | end 204 | object btnBack: TButton 205 | Left = 236 206 | Height = 25 207 | Top = 436 208 | Width = 75 209 | Caption = 'Back' 210 | OnClick = btnBackClick 211 | TabOrder = 5 212 | end 213 | object btnGenShareUrl: TButton 214 | Left = 410 215 | Height = 25 216 | Top = 436 217 | Width = 143 218 | Caption = 'Generate Share URL' 219 | OnClick = btnGenShareUrlClick 220 | TabOrder = 6 221 | end 222 | object btnCopyPrev: TButton 223 | Left = 76 224 | Height = 25 225 | Top = 323 226 | Width = 75 227 | Caption = 'Copy' 228 | OnClick = btnCopyPrevClick 229 | TabOrder = 7 230 | end 231 | object btnEncHelp: TButton 232 | Left = 520 233 | Height = 25 234 | Hint = 'Encryption instructions' 235 | Top = 323 236 | Width = 36 237 | Caption = '?' 238 | OnClick = btnEncHelpClick 239 | ParentShowHint = False 240 | ShowHint = True 241 | TabOrder = 8 242 | end 243 | object btnCopyUrl: TButton 244 | Left = 76 245 | Height = 25 246 | Top = 392 247 | Width = 75 248 | Caption = 'Copy' 249 | OnClick = btnCopyUrlClick 250 | TabOrder = 9 251 | Visible = False 252 | end 253 | object btnSaveToFile: TButton 254 | Left = 316 255 | Height = 25 256 | Top = 436 257 | Width = 91 258 | Caption = 'Save to file' 259 | OnClick = btnSaveToFileClick 260 | TabOrder = 10 261 | end 262 | object StaticTextEncTip: TStaticText 263 | Left = 144 264 | Height = 83 265 | Top = 232 266 | Width = 404 267 | Caption = 'Encryption algorithm: AES; Mode: CBC; Key: Password (32 bytes, repeated if insufficient); Initial vector: MD5 of Shared-title (UTF-8); Fill mode: ZeroFill; Result encoding: Base64' 268 | TabOrder = 11 269 | Visible = False 270 | end 271 | object btnClose: TButton 272 | Left = 232 273 | Height = 25 274 | Top = 436 275 | Width = 75 276 | Caption = 'Close' 277 | ModalResult = 11 278 | OnClick = btnBackClick 279 | TabOrder = 12 280 | Visible = False 281 | end 282 | end 283 | object SaveDialog1: TSaveDialog 284 | DefaultExt = '.dmj' 285 | left = 237 286 | top = 324 287 | end 288 | end 289 | -------------------------------------------------------------------------------- /SubForms/wShareFile.lrj: -------------------------------------------------------------------------------- 1 | {"version":1,"strings":[ 2 | {"hash":5892229,"name":"tfrmsharefile.caption","sourcebytes":[83,104,97,114,101],"value":"Share"}, 3 | {"hash":73057082,"name":"tfrmsharefile.label1.caption","sourcebytes":[77,111,100,101,108,115,58],"value":"Models:"}, 4 | {"hash":194850764,"name":"tfrmsharefile.ckbcheckall.caption","sourcebytes":[67,104,101,99,107,32,97,108,108],"value":"Check all"}, 5 | {"hash":95466122,"name":"tfrmsharefile.labeltitle.caption","sourcebytes":[84,105,116,108,101,58],"value":"Title:"}, 6 | {"hash":179191546,"name":"tfrmsharefile.label2.caption","sourcebytes":[80,97,115,115,119,111,114,100,58],"value":"Password:"}, 7 | {"hash":40674825,"name":"tfrmsharefile.edtpassword.texthint","sourcebytes":[83,104,97,114,101,32,112,108,97,105,110,32,116,101,120,116,32,105,102,32,101,109,112,116,121],"value":"Share plain text if empty"}, 8 | {"hash":166547718,"name":"tfrmsharefile.label4.caption","sourcebytes":[87,105,116,104,32,112,97,115,115,119,111,114,100,32,115,112,101,99,105,102,105,101,100,44,32,116,104,101,32,100,97,116,97,32,119,105,108,108,32,98,101,32,101,110,99,114,121,112,116,101,100,32,98,101,102,111,114,101,32,116,114,97,110,115,109,105,115,115,105,111,110,32,97,110,100,32,115,104,97,114,105,110,103,46,32,84,104,101,32,115,121,115,116,101,109,32,119,105,108,108,32,110,111,116,32,115,116,111,114,101,32,97,110,121,32,105,110,102,111,114,109,97,116,105,111,110,32,114,101,108,97,116,101,100,32,116,111,32,116,104,101,32,112,97,115,115,119,111,114,100,44,32,97,110,100,32,121,111,117,32,110,101,101,100,32,116,111,32,105,110,102,111,114,109,32,116,104,101,32,114,101,99,105,112,105,101,110,116,32,111,102,32,116,104,101,32,112,97,115,115,119,111,114,100,32,121,111,117,114,115,101,108,102],"value":"With password specified, the data will be encrypted before transmission and sharing. The system will not store any information related to the password, and you need to inform the recipient of the password yourself"}, 9 | {"hash":77089212,"name":"tfrmsharefile.btncancel.caption","sourcebytes":[67,97,110,99,101,108],"value":"Cancel"}, 10 | {"hash":126668695,"name":"tfrmsharefile.btnpreview.caption","sourcebytes":[80,114,101,118,105,101,119],"value":"Preview"}, 11 | {"hash":95466122,"name":"tfrmsharefile.labeltitle1.caption","sourcebytes":[84,105,116,108,101,58],"value":"Title:"}, 12 | {"hash":150642554,"name":"tfrmsharefile.label5.caption","sourcebytes":[69,120,112,105,114,101,100,32,97,116,58],"value":"Expired at:"}, 13 | {"hash":145784345,"name":"tfrmsharefile.dateedit_expired.texthint","sourcebytes":[78,101,118,101,114,32,102,111,114,32,101,109,112,116,121],"value":"Never for empty"}, 14 | {"hash":147651034,"name":"tfrmsharefile.label3.caption","sourcebytes":[80,114,101,118,105,101,119,58],"value":"Preview:"}, 15 | {"hash":141572218,"name":"tfrmsharefile.labelurl.caption","sourcebytes":[83,104,97,114,101,32,85,82,76,58],"value":"Share URL:"}, 16 | {"hash":296859,"name":"tfrmsharefile.btnback.caption","sourcebytes":[66,97,99,107],"value":"Back"}, 17 | {"hash":83644172,"name":"tfrmsharefile.btngenshareurl.caption","sourcebytes":[71,101,110,101,114,97,116,101,32,83,104,97,114,101,32,85,82,76],"value":"Generate Share URL"}, 18 | {"hash":304761,"name":"tfrmsharefile.btncopyprev.caption","sourcebytes":[67,111,112,121],"value":"Copy"}, 19 | {"hash":226074467,"name":"tfrmsharefile.btnenchelp.hint","sourcebytes":[69,110,99,114,121,112,116,105,111,110,32,105,110,115,116,114,117,99,116,105,111,110,115],"value":"Encryption instructions"}, 20 | {"hash":63,"name":"tfrmsharefile.btnenchelp.caption","sourcebytes":[63],"value":"?"}, 21 | {"hash":304761,"name":"tfrmsharefile.btncopyurl.caption","sourcebytes":[67,111,112,121],"value":"Copy"}, 22 | {"hash":9308581,"name":"tfrmsharefile.btnsavetofile.caption","sourcebytes":[83,97,118,101,32,116,111,32,102,105,108,101],"value":"Save to file"}, 23 | {"hash":246290708,"name":"tfrmsharefile.statictextenctip.caption","sourcebytes":[69,110,99,114,121,112,116,105,111,110,32,97,108,103,111,114,105,116,104,109,58,32,65,69,83,59,32,77,111,100,101,58,32,67,66,67,59,32,75,101,121,58,32,80,97,115,115,119,111,114,100,32,40,51,50,32,98,121,116,101,115,44,32,114,101,112,101,97,116,101,100,32,105,102,32,105,110,115,117,102,102,105,99,105,101,110,116,41,59,32,73,110,105,116,105,97,108,32,118,101,99,116,111,114,58,32,77,68,53,32,111,102,32,83,104,97,114,101,100,45,116,105,116,108,101,32,40,85,84,70,45,56,41,59,32,70,105,108,108,32,109,111,100,101,58,32,90,101,114,111,70,105,108,108,59,32,82,101,115,117,108,116,32,101,110,99,111,100,105,110,103,58,32,66,97,115,101,54,52],"value":"Encryption algorithm: AES; Mode: CBC; Key: Password (32 bytes, repeated if insufficient); Initial vector: MD5 of Shared-title (UTF-8); Fill mode: ZeroFill; Result encoding: Base64"}, 24 | {"hash":4863637,"name":"tfrmsharefile.btnclose.caption","sourcebytes":[67,108,111,115,101],"value":"Close"} 25 | ]} 26 | -------------------------------------------------------------------------------- /SubForms/wabout.lrj: -------------------------------------------------------------------------------- 1 | {"version":1,"strings":[ 2 | {"hash":4691652,"name":"tfrmabout.caption","sourcebytes":[65,98,111,117,116],"value":"About"}, 3 | {"hash":152973684,"name":"tfrmabout.lbtitle.caption","sourcebytes":[69,90,68,77,76,32,120,54,52],"value":"EZDML x64"}, 4 | {"hash":214540302,"name":"tfrmabout.lbversion.caption","sourcebytes":[86,101,114,115,105,111,110],"value":"Version"}, 5 | {"hash":245318634,"name":"tfrmabout.lbacknowledgements.caption","sourcebytes":[65,99,107,110,111,119,108,101,100,103,101,109,101,110,116,115,58],"value":"Acknowledgements:"}, 6 | {"hash":1339,"name":"tfrmabout.btnok.caption","sourcebytes":[79,75],"value":"OK"} 7 | ]} 8 | -------------------------------------------------------------------------------- /SubForms/wabout.pas: -------------------------------------------------------------------------------- 1 | unit wAbout; 2 | 3 | {$mode delphi} 4 | 5 | interface 6 | 7 | uses 8 | Classes, SysUtils, Forms, Controls, Graphics, Dialogs, ExtCtrls, StdCtrls; 9 | 10 | type 11 | 12 | { TfrmAbout } 13 | 14 | TfrmAbout = class(TForm) 15 | btnOk: TButton; 16 | Image1: TImage; 17 | lbAcknowledgements: TLabel; 18 | lbVersion: TLabel; 19 | lbTitle: TLabel; 20 | memoAcks: TMemo; 21 | memoAuthor: TMemo; 22 | procedure FormCreate(Sender: TObject); 23 | private 24 | 25 | public 26 | 27 | end; 28 | 29 | implementation 30 | 31 | uses 32 | ezdmlstrs; 33 | 34 | {$R *.lfm} 35 | 36 | { TfrmAbout } 37 | 38 | procedure TfrmAbout.FormCreate(Sender: TObject); 39 | begin 40 | lbTitle.Caption := srEzdmlAppTitleOS; 41 | lbVersion.Caption := Format('V%s %s (Freeware)', [srEzdmlVersionNum, srEzdmlVersionDate]); 42 | memoAuthor.Lines.Text := 'http://www.ezdml.com'#13#10'huzzz@163.com'#13#10'QQ group: 344282607'#13#10'http://www.ezdml.com/blog/'; 43 | end; 44 | 45 | end. 46 | 47 | -------------------------------------------------------------------------------- /doc/images/ezdml_lite_cn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/huzgd/ezdml/5fbf534685b0e38f3d634eaba6f6ffe96999f3b8/doc/images/ezdml_lite_cn.png -------------------------------------------------------------------------------- /doc/images/ezdml_lite_en.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/huzgd/ezdml/5fbf534685b0e38f3d634eaba6f6ffe96999f3b8/doc/images/ezdml_lite_en.png -------------------------------------------------------------------------------- /ezdml_lite.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/huzgd/ezdml/5fbf534685b0e38f3d634eaba6f6ffe96999f3b8/ezdml_lite.ico -------------------------------------------------------------------------------- /ezdml_lite.lpr: -------------------------------------------------------------------------------- 1 | program ezdml_lite; 2 | 3 | {$MODE Delphi} 4 | 5 | {%File 'dict.txt'} 6 | {%File 'readme.txt'} 7 | {%File 'readme_CHS.txt'} 8 | 9 | uses 10 | {$IFDEF UNIX} 11 | cthreads, 12 | {$ENDIF} 13 | Forms, Interfaces, 14 | wMainDml in 'wMainDml.pas' {frmMainDml}, 15 | ezdmlstrs in 'ezdmlstrs.pas', 16 | uJSON in 'pkg\uJSON.pas'; 17 | 18 | {$R *.res} 19 | 20 | begin 21 | Application.Initialize; 22 | Application.Title := srEzdmlAppTitle; 23 | CheckAppStart; 24 | Application.CreateForm(TfrmMainDml, frmMainDml); 25 | Application.Run; 26 | end. 27 | -------------------------------------------------------------------------------- /ezdmlstrs.pas: -------------------------------------------------------------------------------- 1 | unit ezdmlstrs; 2 | 3 | {$MODE Delphi} 4 | 5 | interface 6 | { 7 | 升级过程: 8 | 1.修改工程的版本号,以及下方的版本号版本日期 9 | 2.修改README.TXT中的版本号和版本说明 10 | 3.修改README_CHS.TXT中的版本号和版本说明 11 | 4.更新语言包 12 | 5.编译所有工程 13 | 6.修改安装包中的版本号 14 | 7.编译并测试安装包(英文系统也要)和绿色版 15 | 8.修改中英文HTML中的版本信息 16 | 9.上传 17 | } 18 | 19 | const 20 | srEzdmlVersionNum = '3.65'; 21 | srEzdmlVersionDate = '2025-01-12'; 22 | 23 | {$ifdef EZDML_LITE} 24 | 25 | {$ifdef WIN32} 26 | srEzdmlAppTitleOS = 'EZDML Lite (win32)'; 27 | {$else} 28 | srEzdmlAppTitleOS = 'EZDML Lite'; 29 | {$endif} 30 | 31 | {$else} 32 | 33 | {$ifdef WIN32} 34 | srEzdmlAppTitleOS = 'EZDML for win32'; 35 | {$else} 36 | srEzdmlAppTitleOS = 'EZDML'; 37 | {$endif} 38 | 39 | {$endif} 40 | //srEzdmlAppTitle = 'EZDML'; 41 | srEzdmlAppTitle = srEzdmlAppTitleOS; 42 | 43 | resourcestring 44 | {srEzdmlAppTitle = '表结构设计器'; 45 | srEzdmlExiting = '正在退出..'; 46 | srEzdmlLoading = '正在加载..'; 47 | srEzdmlOpeningFileFmt = '正在加载文件 %s...'; 48 | srEzdmlOpenFile = '打开文件'; 49 | srEzdmlOpening = '正在打开...'; 50 | srEzdmlAbortOpening = '确定要中止打开吗?'; 51 | srEzdmlConfirmClearAll = '新建文件将清除模型中的所有表,确定要继续吗?'; 52 | srEzdmlConfirmClearOnOpen = '打开前是否要清除现有表模型?'; 53 | srEzdmlSaveingFileFmt = '正在保存文件 %s...'; 54 | srEzdmlSaveFile = '保存文件'; 55 | srEzdmlSaving = '正在保存...'; 56 | srEzdmlAbortSaving = '确定要中止保存吗?'; 57 | srEzdmlSaved = '已保存: '; 58 | srEzdmlNew = '新文件'; } 59 | 60 | srEzdmlDefaultFontName = 'default'; 61 | srEzdmlDefaultFontSize = '0'; 62 | srEzdmlFixWidthFontName = 'default'; 63 | srEzdmlFixWidthFontSize = '0'; 64 | srEzdmlAbortSaving = 'Are you sure to abort saving?'; 65 | srEzdmlSaved = 'Saved: '; 66 | srEzdmlExiting = 'Exiting..'; 67 | srEzdmlLoading = 'Loading..'; 68 | srEzdmlOpeningFileFmt = 'Opening file %s...'; 69 | srEzdmlOpenLastFileFmt = 'Open last recent file %s?'; 70 | srEzdmlPromptOpenDemoFile = 'Open demo file?'; 71 | srEzdmlOpenFile = 'Open file'; 72 | srEzdmlOpening = 'Opening...'; 73 | srEzdmlAbortOpening = 'Are you sure to abort opening file?'; 74 | srEzdmlConfirmNewFile = 'Will create a new file, please ensure your work has been saved. Are you sure to continue?'; 75 | srEzdmlConfirmReOpenFile = 'Do you want to force the current file to be reopened (will skip the temp file)?'; 76 | srEzdmlConfirmClearOnOpen = 'Current model will be cleared before opening the file. Are you sure to continue?'; 77 | srEzdmlConfirmOpenDbTmpFile = 'Database file is not ready, open local temporary file instead?'; 78 | //srEzdmlConfirmClearOnLoad = 'Do you want to clear current model before load new models?'; 79 | //srEzdmlConfirmSyncWithDbFile = 'Since current file has the same name (%s) as the DB file being loaded, do you want to import the content into the current file (overwrite content but keep the local file name)?'; 80 | srEzdmlPromptSaveFile = 'Save current file before continue?'; 81 | srEzdmlPromptReloadOnFileDateSizeChanged = 'Current file is changed by other program, do you want to re-open it?'; 82 | srEzdmlPromptReloadDbFileChanged = 'Current file is changed in database by %s (%s), do you want to re-open it?'; 83 | srEzdmlPromptDbFileDisconnected = 'Database file is disconnected and will enter offline mode. Do you want to reconnect now?'; 84 | srEzdmlDbOfflineTip = '(Offline)'; 85 | srEzdmlConfirmCloseModified = 'Do you want to save and apply changes before close?'; 86 | srEzdmlSaveingFileFmt = 'Saving file %s...'; 87 | srEzdmlSaveFile = 'Save file'; 88 | srEzdmlSaving = 'Saving...'; 89 | srEzdmlDbFileSavedFmt = 'Database file saved: %s. Do you want to open the Generate-Database dialog?'; 90 | srEzdmlNew = 'New File'; 91 | srEzdmlDefault = 'Default'; 92 | srEzdmlFileNotFoundFmt = 'File not found %s'; 93 | srEzdmlTmpFileIgnoredFmt = '%s - the temp file is out of date and will be skipped'; 94 | srEzdmlDbTmpFileIgnoredFmt = '%s - the database file has been modified by %s (%s), thus the temp file is out of date and will be skipped'; 95 | srEzdmlLoadTmpFileFailFmt ='Failed to load tmp file: %s'#13#10'Error info: %s'#13#10'This may cause by version error or file damage. Please try newer version or delete the tmp file'; 96 | srEzdmlConfirmOpenUrlFmt = 'Are you sure to open URL %s with your internet explorer?'; 97 | srEzdmlConfirmEditTextFmt = 'Open %s to edit now?'; 98 | srEzdmlConfirmEditedTextFmt = '%s opened, please edit it now, and click OK to apply it when finished.'; 99 | srEzdmlConfirmExit = 'Do you want to save data before exit?'; 100 | srEzdmlCreateGScriptTipFmt = 'Global Script file (%s) not found, do you want to create it?'; 101 | srEzdmlFileAlreadyOpenedFmt = 'File %s is already open in another EZDML process.'; 102 | srEzdmlConfirmAlreadyOpenedFileFmt = 'Warning: File %s can not be locked and may have been opened in another EZDML process, continue operation may lead to unexpected consequences! Do you still want to forcibly open it?'; 103 | srEzdmlTempFileFmt = 'Temporary file - %s'; 104 | srEzdmlFunOnlyInWin32Ver = 'Sorry, this function is not available in EZDML of x64 version yet. Please take EZDML for win32 instead.'; 105 | srEzdmlCheckingForUpdates = 'Checking for updates...'; 106 | srEzdmlChatGPTProcessing = 'AI request is being processed, please be patient and wait...'; 107 | srEzdmlChatAITip_GenModel = 'Generate New Model: please specify the system name and requirement description, AI will generate the new model and add it to the list'; 108 | srEzdmlChatAITip_GenTables = 'Add More Tables: AI will supplement and add new tables to the model based on the system description and existing table information.'#13#10'Exists tables:'; 109 | srEzdmlChatAITip_GenFields = 'Add More Fields: AI will supplement and add new fields to the selected tables based on the system description and existing tables/fields information.'#13#10'Existing tables/fields:'; 110 | srEzdmlChatAITip_GenComments = 'Generate Comments: AI will add logical names and comments to the selected tables/fields based on the system description and existing tables/fields information.'#13#10'Existing tables/fields:'; 111 | srEzdmlChatAITip_GenFKLinks = 'Generate Foreign Keys: AI will add foreign key links to the selected table based on the system description and existing table information.'#13#10'Existing tables:'; 112 | srEzdmlNoUpdateFound = 'No updatable version present.'; 113 | srEzdmlDmjUnicodePropmt = 'Save json data with \uXXXX unicode format?'; 114 | srEzdmlPromptNeverShown = '(Shift+Action = Don''t prompt again)'; 115 | srEzdmlGlobalScriptError = 'Error running global-script function %s: %s'; 116 | srEzdmlLiteNotSupportFun = 'This function is not supported in Lite Version'; 117 | srEzdmlNoModelChecked = 'Please check at least one model'; 118 | srEzdmlShareWithoutPwdWarning = 'Without password protection, the model data will be transmitted and stored in plaintext over the network. Are you sure to continue?'; 119 | srEzdmlCommitShareError = 'Share error'; 120 | srEzdmlOnlineFiltTypes = 'Public Share'#13#10'History'; 121 | srEzdmlSharedByMe = 'Shared by me'; 122 | srEzdmlError = 'Error'; 123 | srEzdmlConfirmForceReconnDb = 'This database is already connected. Do you want to force a disconnection and reconnection?'; 124 | 125 | implementation 126 | 127 | end. 128 | 129 | -------------------------------------------------------------------------------- /mainicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/huzgd/ezdml/5fbf534685b0e38f3d634eaba6f6ffe96999f3b8/mainicon.ico -------------------------------------------------------------------------------- /pkg/CtSysInfo.pas: -------------------------------------------------------------------------------- 1 | unit CtSysInfo; 2 | 3 | {$mode delphi} 4 | 5 | interface 6 | 7 | uses 8 | Classes, {$IFDEF Windows}windows, {$ENDIF}SysUtils, process; 9 | 10 | function GetThisComputerName: string; 11 | function GetMyComputerId: string; 12 | 13 | implementation 14 | 15 | uses 16 | IniFiles, WindowFuncs; 17 | 18 | var 19 | G_MyComputerId: string; 20 | 21 | function GetMyComputerId: string; 22 | var 23 | ini: TIniFile; 24 | begin 25 | if G_MyComputerId=''then 26 | begin 27 | ini := TIniFile.Create(GetConfFileOfApp); 28 | try 29 | G_MyComputerId := ini.ReadString('Updates', 'UID', ''); 30 | if G_MyComputerId=''then 31 | begin 32 | G_MyComputerId := CtGenGuid; 33 | ini.WriteString('Updates', 'UID', G_MyComputerId); 34 | end; 35 | finally 36 | ini.Free; 37 | end; 38 | end; 39 | Result := G_MyComputerId; 40 | end; 41 | 42 | function GetThisComputerName: string; 43 | var 44 | c: array[0..127] of Char; 45 | computer: string; 46 | sz: dword; 47 | AProcess: TProcess; 48 | AStringList: TStringList; 49 | begin 50 | {$IFDEF Windows} 51 | sz := SizeOf(c); 52 | GetComputerName(c, sz); 53 | Result := c; 54 | {$ELSE} 55 | AProcess := TProcess.Create(nil); 56 | AStringList := TStringList.Create; 57 | AProcess.CommandLine := 'echo $HOSTNAME'; 58 | AProcess.Options := AProcess.Options + [poWaitOnExit, poUsePipes]; 59 | AProcess.Execute; 60 | AStringList.LoadFromStream(AProcess.Output); 61 | Result:=Trim(AStringList.Strings[0]); 62 | AStringList.Free; 63 | AProcess.Free; 64 | {$ENDIF} 65 | end; 66 | 67 | end. 68 | 69 | -------------------------------------------------------------------------------- /pkg/MessageBoxOnTop.lfm: -------------------------------------------------------------------------------- 1 | object frmMessageBoxOnTop: TfrmMessageBoxOnTop 2 | Left = 443 3 | Height = 173 4 | Top = 304 5 | Width = 562 6 | BorderStyle = bsDialog 7 | Caption = 'Message' 8 | ClientHeight = 173 9 | ClientWidth = 562 10 | FormStyle = fsStayOnTop 11 | Position = poMainFormCenter 12 | LCLVersion = '2.0.12.0' 13 | object btnOk: TButton 14 | Left = 204 15 | Height = 27 16 | Top = 132 17 | Width = 71 18 | Caption = 'Ok' 19 | ModalResult = 1 20 | TabOrder = 0 21 | end 22 | object btnCancel: TButton 23 | Left = 291 24 | Height = 27 25 | Top = 132 26 | Width = 71 27 | Caption = 'Cancel' 28 | ModalResult = 2 29 | TabOrder = 1 30 | end 31 | object lbMessage: TLabel 32 | Left = 20 33 | Height = 17 34 | Top = 16 35 | Width = 524 36 | Anchors = [akTop, akLeft, akRight] 37 | Caption = 'Message' 38 | ParentColor = False 39 | WordWrap = True 40 | end 41 | end 42 | -------------------------------------------------------------------------------- /pkg/MessageBoxOnTop.lrj: -------------------------------------------------------------------------------- 1 | {"version":1,"strings":[ 2 | {"hash":63608709,"name":"tfrmmessageboxontop.caption","sourcebytes":[77,101,115,115,97,103,101],"value":"Message"}, 3 | {"hash":1371,"name":"tfrmmessageboxontop.btnok.caption","sourcebytes":[79,107],"value":"Ok"}, 4 | {"hash":77089212,"name":"tfrmmessageboxontop.btncancel.caption","sourcebytes":[67,97,110,99,101,108],"value":"Cancel"}, 5 | {"hash":63608709,"name":"tfrmmessageboxontop.lbmessage.caption","sourcebytes":[77,101,115,115,97,103,101],"value":"Message"} 6 | ]} 7 | -------------------------------------------------------------------------------- /pkg/MessageBoxOnTop.pas: -------------------------------------------------------------------------------- 1 | unit MessageBoxOnTop; 2 | 3 | {$mode delphi} 4 | 5 | interface 6 | 7 | uses 8 | Classes, SysUtils, Forms, Controls, Graphics, Dialogs, StdCtrls; 9 | 10 | type 11 | 12 | { TfrmMessageBoxOnTop } 13 | 14 | TfrmMessageBoxOnTop = class(TForm) 15 | btnOk: TButton; 16 | btnCancel: TButton; 17 | lbMessage: TLabel; 18 | private 19 | 20 | public 21 | 22 | end; 23 | 24 | function ShowMessageOnTop(AMessage, ATitle: string): Integer; 25 | 26 | implementation 27 | 28 | {$R *.lfm} 29 | 30 | function ShowMessageOnTop(AMessage, ATitle: string): Integer; 31 | var 32 | frm: TfrmMessageBoxOnTop; 33 | begin 34 | frm:= TfrmMessageBoxOnTop.Create(nil); 35 | try 36 | frm.lbMessage.Caption:=AMessage; 37 | frm.Caption := ATitle; 38 | Result := frm.ShowModal; 39 | finally 40 | frm.Close; 41 | end; 42 | end; 43 | 44 | end. 45 | 46 | -------------------------------------------------------------------------------- /pkg/ThreadWait.dfm: -------------------------------------------------------------------------------- 1 | object frmThreadWait: TfrmThreadWait 2 | Cursor = crAppStart 3 | Left = 287 4 | Height = 90 5 | Top = 168 6 | Width = 380 7 | BorderIcons = [biSystemMenu] 8 | BorderStyle = bsDialog 9 | Caption = 'Processing...' 10 | ClientHeight = 90 11 | ClientWidth = 380 12 | Color = clBtnFace 13 | Font.CharSet = GB2312_CHARSET 14 | Font.Color = clWindowText 15 | Font.Height = -12 16 | Font.Name = '宋体' 17 | OnCloseQuery = FormCloseQuery 18 | OnDestroy = FormDestroy 19 | OnHide = FormHide 20 | OnShow = FormShow 21 | Position = poMainFormCenter 22 | LCLVersion = '2.0.4.0' 23 | Scaled = False 24 | object LabelPrompt: TLabel 25 | Left = 52 26 | Height = 33 27 | Top = 8 28 | Width = 309 29 | AutoSize = False 30 | Caption = 'Please wait...' 31 | ParentColor = False 32 | WordWrap = True 33 | end 34 | object Image1: TImage 35 | Left = 8 36 | Height = 32 37 | Top = 12 38 | Width = 32 39 | AutoSize = True 40 | Center = True 41 | Picture.Data = { 42 | 055449636F6EFE0200000000010001002020100000000000E802000016000000 43 | 2800000020000000400000000100040000000000800200000000000000000000 44 | 0000000000000000000000000000800000800000008080008000000080008000 45 | 8080000080808000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00 46 | FFFF0000FFFFFF00000000000000000000000000000000000000000000000000 47 | 0000000000000000000000000000000000000000000000000000000000000000 48 | 0000000000000000000000000000000000000000000000000000000000000000 49 | 0000000000000000000019889999910000000000000000000000077777777000 50 | 0000000000000000000007F7707770000000000000000000000007FF77787000 51 | 0000000000000000000007FFF788700000000000000000000000007FF8870000 52 | 000000000000000000000007F7807777777777777770000000000007F880FFFF 53 | FFFFFFFFFF70000000000007F780FFFFFFFFFFFFFF7000000000007FF7870FFF 54 | 777FF777FF700000000007FF777870FFFFFFFFFFFF700000000007FF888870F8 55 | 555FF8B9FF700000000007FFFF8870FFD55FF191FF70000000000777777770FF 56 | 885FF9B9FF700000000019889999111F558FFF19FF700000000011111111111F 57 | FFFFFFFFFF70000000000000078FFFFFFFFFFFFFFF7000000000000007888888 58 | 8888888888800000000000000784444444440000008000000000000007844444 59 | 4444F0F0F0800000000000000788888888888888888000000000000007777777 60 | 7777777777700000000000000000000000000000000000000000000000000000 61 | 0000000000000000000000000000000000000000000000000000000000000000 62 | 0000000000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF001FFFF 63 | F001FFFFF803FFFFF803FFFFF803FFFFF803FFFFFC00000FFE00000FFE00000F 64 | FE00000FFC00000FF800000FF800000FF800000FF800000FF000000FF000000F 65 | FF80000FFF80000FFF80000FFF80000FFF80000FFF80000FFFFFFFFFFFFFFFFF 66 | FFFFFFFFFFFFFFFF 67 | } 68 | end 69 | object btnCancel: TButton 70 | Left = 280 71 | Height = 21 72 | Top = 50 73 | Width = 69 74 | Cancel = True 75 | Caption = 'Cancel' 76 | OnClick = btnCancelClick 77 | TabOrder = 0 78 | Visible = False 79 | end 80 | object ProgressBarMain: TProgressBar 81 | Left = 24 82 | Height = 14 83 | Top = 53 84 | Width = 238 85 | Max = 1000 86 | TabOrder = 1 87 | Visible = False 88 | end 89 | object ActionList1: TActionList 90 | left = 8 91 | top = 56 92 | object actCancel: TAction 93 | Caption = 'actCancel' 94 | OnExecute = actCancelExecute 95 | ShortCut = 16498 96 | end 97 | end 98 | object TimerAfterShow: TTimer 99 | Interval = 10 100 | OnTimer = TimerAfterShowTimer 101 | left = 36 102 | top = 56 103 | end 104 | end 105 | -------------------------------------------------------------------------------- /pkg/ThreadWait.lrj: -------------------------------------------------------------------------------- 1 | {"version":1,"strings":[ 2 | {"hash":242294270,"name":"tfrmthreadwait.caption","sourcebytes":[80,114,111,99,101,115,115,105,110,103,46,46,46],"value":"Processing..."}, 3 | {"hash":265880334,"name":"tfrmthreadwait.labelprompt.caption","sourcebytes":[80,108,101,97,115,101,32,119,97,105,116,46,46,46],"value":"Please wait..."}, 4 | {"hash":77089212,"name":"tfrmthreadwait.btncancel.caption","sourcebytes":[67,97,110,99,101,108],"value":"Cancel"}, 5 | {"hash":144191004,"name":"tfrmthreadwait.actcancel.caption","sourcebytes":[97,99,116,67,97,110,99,101,108],"value":"actCancel"} 6 | ]} 7 | -------------------------------------------------------------------------------- /pkg/ThreadWait.lrs: -------------------------------------------------------------------------------- 1 | { This is an automatically generated lazarus resource file } 2 | 3 | LazarusResources.Add('TfrmThreadWait','FORMDATA',[ 4 | 'TPF0'#14'TfrmThreadWait'#13'frmThreadWait'#6'Cursor'#7#10'crAppStart'#4'Left' 5 | +#3#31#1#6'Height'#2'Z'#3'Top'#3#168#0#5'Width'#3'|'#1#11'BorderIcons'#11#12 6 | +'biSystemMenu'#0#11'BorderStyle'#7#8'bsDialog'#7'Caption'#6#10'Waiting...'#12 7 | +'ClientHeight'#2'Z'#11'ClientWidth'#3'|'#1#5'Color'#7#9'clBtnFace'#12'Font.C' 8 | +'harSet'#7#14'GB2312_CHARSET'#10'Font.Color'#7#12'clWindowText'#11'Font.Heig' 9 | +'ht'#2#244#9'Font.Name'#6#6#229#174#139#228#189#147#12'OnCloseQuery'#7#14'Fo' 10 | +'rmCloseQuery'#9'OnDestroy'#7#11'FormDestroy'#6'OnHide'#7#8'FormHide'#6'OnSh' 11 | +'ow'#7#8'FormShow'#8'Position'#7#16'poMainFormCenter'#10'LCLVersion'#6#7'2.0' 12 | +'.4.0'#6'Scaled'#8#0#6'TLabel'#11'LabelPrompt'#4'Left'#2'4'#6'Height'#2'!'#3 13 | +'Top'#2#8#5'Width'#3'5'#1#8'AutoSize'#8#7'Caption'#6#14'Please wait...'#11'P' 14 | +'arentColor'#8#8'WordWrap'#9#0#0#6'TImage'#6'Image1'#4'Left'#2#8#6'Height'#2 15 | +' '#3'Top'#2#12#5'Width'#2' '#8'AutoSize'#9#6'Center'#9#12'Picture.Data'#10#8 16 | +#3#0#0#5'TIcon'#254#2#0#0#0#0#1#0#1#0' '#16#0#0#0#0#0#232#2#0#0#22#0#0#0'(' 17 | +#0#0#0' '#0#0#0'@'#0#0#0#1#0#4#0#0#0#0#0#128#2#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0 18 | +#0#0#0#0#0#0#0#0#0#128#0#0#128#0#0#0#128#128#0#128#0#0#0#128#0#128#0#128#128 19 | +#0#0#128#128#128#0#192#192#192#0#0#0#255#0#0#255#0#0#0#255#255#0#255#0#0#0 20 | +#255#0#255#0#255#255#0#0#255#255#255#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0 21 | +#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0 22 | +#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0 23 | +#0#0#0#25#136#153#153#145#0#0#0#0#0#0#0#0#0#0#0#7'wwwp'#0#0#0#0#0#0#0#0#0#0#0 24 | +#7#247'pwp'#0#0#0#0#0#0#0#0#0#0#0#7#255'wxp'#0#0#0#0#0#0#0#0#0#0#0#7#255#247 25 | +#136'p'#0#0#0#0#0#0#0#0#0#0#0#0#127#248#135#0#0#0#0#0#0#0#0#0#0#0#0#0#7#247 26 | +#128'wwwwwwwp'#0#0#0#0#0#7#248#128#255#255#255#255#255#255#255'p'#0#0#0#0#0#7 27 | +#247#128#255#255#255#255#255#255#255'p'#0#0#0#0#0#127#247#135#15#255'w'#127 28 | +#247'w'#255'p'#0#0#0#0#7#255'wxp'#255#255#255#255#255#255'p'#0#0#0#0#7#255 29 | +#136#136'p'#248'U_'#248#185#255'p'#0#0#0#0#7#255#255#136'p'#255#213'_'#241 30 | +#145#255'p'#0#0#0#0#7'wwwp'#255#136'_'#249#185#255'p'#0#0#0#0#25#136#153#153 31 | +#17#31'U'#143#255#25#255'p'#0#0#0#0#17#17#17#17#17#31#255#255#255#255#255'p' 32 | +#0#0#0#0#0#0#7#143#255#255#255#255#255#255#255'p'#0#0#0#0#0#0#7#136#136#136 33 | +#136#136#136#136#136#128#0#0#0#0#0#0#7#132'DDDD'#0#0#0#128#0#0#0#0#0#0#7#132 34 | +'DDDD'#240#240#240#128#0#0#0#0#0#0#7#136#136#136#136#136#136#136#136#128#0#0 35 | +#0#0#0#0#7'wwwwwwwwp'#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0 36 | +#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0 37 | +#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255 38 | +#255#240#1#255#255#240#1#255#255#248#3#255#255#248#3#255#255#248#3#255#255 39 | +#248#3#255#255#252#0#0#15#254#0#0#15#254#0#0#15#254#0#0#15#252#0#0#15#248#0#0 40 | +#15#248#0#0#15#248#0#0#15#248#0#0#15#240#0#0#15#240#0#0#15#255#128#0#15#255 41 | +#128#0#15#255#128#0#15#255#128#0#15#255#128#0#15#255#128#0#15#255#255#255#255 42 | +#255#255#255#255#255#255#255#255#255#255#255#255#0#0#7'TButton'#9'btnCancel' 43 | +#4'Left'#3#24#1#6'Height'#2#21#3'Top'#2'2'#5'Width'#2'E'#6'Cancel'#9#7'Capti' 44 | +'on'#6#6'Cancel'#7'OnClick'#7#14'btnCancelClick'#8'TabOrder'#2#0#7'Visible'#8 45 | +#0#0#12'TProgressBar'#15'ProgressBarMain'#4'Left'#2#24#6'Height'#2#14#3'Top' 46 | +#2'5'#5'Width'#3#238#0#3'Max'#3#232#3#8'TabOrder'#2#1#7'Visible'#8#0#0#11'TA' 47 | +'ctionList'#11'ActionList1'#4'left'#2#8#3'top'#2'8'#0#7'TAction'#9'actCancel' 48 | +#7'Caption'#6#9'actCancel'#9'OnExecute'#7#16'actCancelExecute'#8'ShortCut'#3 49 | +'r@'#0#0#0#6'TTimer'#14'TimerAfterShow'#8'Interval'#2#10#7'OnTimer'#7#19'Tim' 50 | +'erAfterShowTimer'#4'left'#2'$'#3'top'#2'8'#0#0#0 51 | ]); 52 | -------------------------------------------------------------------------------- /pkg/ThreadWait.pas: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/huzgd/ezdml/5fbf534685b0e38f3d634eaba6f6ffe96999f3b8/pkg/ThreadWait.pas -------------------------------------------------------------------------------- /pkg/uWaitWnd.lfm: -------------------------------------------------------------------------------- 1 | object frmWaitWnd: TfrmWaitWnd 2 | Left = 266 3 | Height = 153 4 | Top = 188 5 | Width = 487 6 | BorderIcons = [biSystemMenu] 7 | BorderStyle = bsDialog 8 | Caption = 'Processing...' 9 | ClientHeight = 153 10 | ClientWidth = 487 11 | Color = clBtnFace 12 | OnCloseQuery = FormCloseQuery 13 | OnCreate = FormCreate 14 | OnShow = FormShow 15 | ParentFont = True 16 | Position = poScreenCenter 17 | LCLVersion = '2.0.4.0' 18 | object LabelPrompt: TLabel 19 | Left = 24 20 | Height = 13 21 | Top = 72 22 | Width = 432 23 | Anchors = [akTop, akLeft, akRight] 24 | Caption = 'Processing...' 25 | ParentColor = False 26 | WordWrap = True 27 | end 28 | object btnCancel: TButton 29 | Left = 400 30 | Height = 23 31 | Top = 16 32 | Width = 58 33 | Anchors = [akTop, akRight] 34 | AutoSize = True 35 | Cancel = True 36 | Caption = 'Cancel' 37 | OnClick = btnCancelClick 38 | TabOrder = 0 39 | TabStop = False 40 | end 41 | object ProgressBar1: TProgressBar 42 | Left = 24 43 | Height = 16 44 | Top = 120 45 | Width = 432 46 | Max = 1000 47 | TabOrder = 1 48 | end 49 | end 50 | -------------------------------------------------------------------------------- /pkg/uWaitWnd.lrj: -------------------------------------------------------------------------------- 1 | {"version":1,"strings":[ 2 | {"hash":242294270,"name":"tfrmwaitwnd.caption","sourcebytes":[80,114,111,99,101,115,115,105,110,103,46,46,46],"value":"Processing..."}, 3 | {"hash":242294270,"name":"tfrmwaitwnd.labelprompt.caption","sourcebytes":[80,114,111,99,101,115,115,105,110,103,46,46,46],"value":"Processing..."}, 4 | {"hash":77089212,"name":"tfrmwaitwnd.btncancel.caption","sourcebytes":[67,97,110,99,101,108],"value":"Cancel"} 5 | ]} 6 | -------------------------------------------------------------------------------- /pkg/wToast.lfm: -------------------------------------------------------------------------------- 1 | object frmToast: TfrmToast 2 | Left = 636 3 | Height = 93 4 | Top = 289 5 | Width = 385 6 | BorderIcons = [] 7 | BorderStyle = bsDialog 8 | Caption = 'Info' 9 | ClientHeight = 93 10 | ClientWidth = 385 11 | FormStyle = fsSystemStayOnTop 12 | OnClose = FormClose 13 | Position = poMainFormCenter 14 | LCLVersion = '2.0.4.0' 15 | object LabelMsg: TLabel 16 | Left = 24 17 | Height = 57 18 | Top = 24 19 | Width = 337 20 | AutoSize = False 21 | Caption = 'Please wait...' 22 | ParentColor = False 23 | WordWrap = True 24 | end 25 | object TimerHide: TTimer 26 | Enabled = False 27 | OnTimer = TimerHideTimer 28 | left = 104 29 | top = 56 30 | end 31 | end 32 | -------------------------------------------------------------------------------- /pkg/wToast.lrj: -------------------------------------------------------------------------------- 1 | {"version":1,"strings":[ 2 | {"hash":328911,"name":"tfrmtoast.caption","sourcebytes":[73,110,102,111],"value":"Info"}, 3 | {"hash":265880334,"name":"tfrmtoast.labelmsg.caption","sourcebytes":[80,108,101,97,115,101,32,119,97,105,116,46,46,46],"value":"Please wait..."} 4 | ]} 5 | -------------------------------------------------------------------------------- /pkg/wToast.pas: -------------------------------------------------------------------------------- 1 | unit wToast; 2 | 3 | {$mode delphi} 4 | 5 | interface 6 | 7 | uses 8 | Classes, SysUtils, Forms, Controls, Graphics, Dialogs, ExtCtrls, StdCtrls; 9 | 10 | type 11 | 12 | { TfrmToast } 13 | 14 | TfrmToast = class(TForm) 15 | LabelMsg: TLabel; 16 | TimerHide: TTimer; 17 | procedure FormClose(Sender: TObject; var CloseAction: TCloseAction); 18 | procedure TimerHideTimer(Sender: TObject); 19 | private 20 | 21 | public 22 | 23 | end; 24 | 25 | procedure ShowToastForm(Owner: TComponent; msg, title: string; closeTimeMs: Integer); 26 | 27 | implementation 28 | 29 | {$R *.lfm} 30 | 31 | procedure ShowToastForm(Owner: TComponent; msg, title: string; closeTimeMs: Integer); 32 | begin 33 | if Owner = nil then 34 | Owner := Application.MainForm; 35 | with TfrmToast.Create(Owner) do 36 | begin 37 | Caption := title; 38 | LabelMsg.Caption := msg; 39 | if closeTimeMs > 0 then 40 | begin 41 | TimerHide.Interval := closeTimeMs; 42 | TimerHide.Enabled := True; 43 | end; 44 | Show; 45 | Update; 46 | end; 47 | end; 48 | 49 | { TfrmToast } 50 | 51 | procedure TfrmToast.TimerHideTimer(Sender: TObject); 52 | begin 53 | TimerHide.Enabled := False; 54 | Self.Close; 55 | end; 56 | 57 | procedure TfrmToast.FormClose(Sender: TObject; var CloseAction: TCloseAction); 58 | begin 59 | CloseAction := caFree; 60 | end; 61 | 62 | end. 63 | 64 | --------------------------------------------------------------------------------