- Timestamp:
- Dec 25, 2010, 9:53:55 PM (14 years ago)
- Location:
- trunk
- Files:
-
- 6 added
- 14 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Common/USqlDatabase.pas
r2 r7 2 2 3 3 {$mode Delphi}{$H+} 4 // Upraveno: 30.5.2010 4 5 // Modified: 2010-12-24 5 6 6 7 interface 7 8 8 9 uses 9 SysUtils, Classes, Dialogs, mysql50, TypInfo; 10 SysUtils, Classes, Dialogs, mysql50, TypInfo, 11 SpecializedDictionary, SpecializedList; 10 12 11 13 type 12 EQueryError = Exception;14 EQueryError = class(Exception); 13 15 14 16 TClientCapabilities = (_CLIENT_LONG_PASSWORD, _CLIENT_FOUND_ROWS, … … 19 21 TSetClientCapabilities = set of TClientCapabilities; 20 22 21 T AssociativeArray = class(TStringList)23 TDbRows = class(TListObject) 22 24 private 23 function GetValues(Index: string): string; 24 function GetValuesAtIndex(Index: Integer): string; 25 procedure SetValues(Index: string; const Value: string); 25 function GetData(Index: Integer): TDictionaryStringString; 26 procedure SetData(Index: Integer; const Value: TDictionaryStringString); 26 27 public 27 constructor Create; 28 destructor Destroy; override; 29 function GetAllValues: string; 30 procedure AddKeyValue(Key, Value: string); 31 property ValuesAtIndex[Index: Integer]: string read GetValuesAtIndex; 32 property Values[Index: string]: string read GetValues write SetValues; default; 33 end; 34 35 TDbRows = class(TList) 36 private 37 function GetData(Index: Integer): TAssociativeArray; 38 procedure SetData(Index: Integer; const Value: TAssociativeArray); 39 public 40 property Data[Index: Integer]: TAssociativeArray read GetData write SetData; default; 28 property Data[Index: Integer]: TDictionaryStringString read GetData write SetData; default; 41 29 destructor Destroy; override; 42 30 end; … … 51 39 function GetLastErrorMessage: string; 52 40 function GetLastErrorNumber: Integer; 53 function CheckError: Boolean;54 41 function GetCharset: string; 55 procedure Set Schema(const Value: string);42 procedure SetDatabase(const Value: string); 56 43 public 57 44 Hostname: string; … … 65 52 procedure CreateTable(Name: string); 66 53 procedure CreateColumn(Table, ColumnName: string; ColumnType: TTypeKind); 67 function Query(Data: string): TDbRows;68 function Select(ATable: string; Filter: string = '*'; Condition: string = '1'): TDbRows;54 procedure Query(DbRows: TDbRows; Data: string); 55 procedure Select(DbRows: TDbRows; ATable: string; Filter: string = '*'; Condition: string = '1'); 69 56 procedure Delete(ATable: string; Condition: string = '1'); 70 procedure Insert(ATable: string; Data: T AssociativeArray);71 procedure Update(ATable: string; Data: T AssociativeArray; Condition: string = '1');72 procedure Replace(ATable: string; Data: T AssociativeArray);57 procedure Insert(ATable: string; Data: TDictionaryStringString); 58 procedure Update(ATable: string; Data: TDictionaryStringString; Condition: string = '1'); 59 procedure Replace(ATable: string; Data: TDictionaryStringString); 73 60 procedure Connect; 74 61 procedure Disconnect; … … 80 67 destructor Destroy; override; 81 68 property Charset: string read GetCharset; 82 property Schema: string read FDatabase write SetSchema;69 property Database: string read FDatabase write SetDatabase; 83 70 end; 84 71 85 72 function MySQLFloatToStr(F: Real): string; 86 73 function MySQLStrToFloat(S: string): Real; 74 function SQLToDateTime(Value: string): TDateTime; 75 function DateTimeToSQL(Value: TDateTime): string; 87 76 88 77 implementation 89 78 90 uses DateUtils; 79 uses 80 DateUtils, Math; 81 82 resourcestring 83 SDatabaseQueryError = 'Database query error: "%s"'; 91 84 92 85 const … … 105 98 CLIENT_TRANSACTIONS = 8192; // Client knows about transactions 106 99 107 { TDataModule2 }108 109 100 function MySQLFloatToStr(F: Real): string; 110 101 var … … 112 103 begin 113 104 S := FloatToStr(F); 114 if Pos(',', S) > 0 then S[Pos(',', S)] := '.';105 if Pos(',', S) > 0 then S[Pos(',', S)] := '.'; 115 106 Result := S; 116 107 end; … … 118 109 function MySQLStrToFloat(S: string): Real; 119 110 begin 120 if Pos('.', S) > 0 then S[Pos('.',S)] := ',';111 if Pos('.', S) > 0 then S[Pos('.', S)] := ','; 121 112 Result := StrToFloat(S); 122 113 end; 114 115 function StrToStr(Value: string): string; 116 begin 117 Result := Value; 118 end; 119 120 function SQLToDateTime(Value: string): TDateTime; 121 var 122 Parts: TListString; 123 DateParts: TListString; 124 TimeParts: TListString; 125 begin 126 try 127 Parts := TListString.Create; 128 DateParts := TListString.Create; 129 TimeParts := TListString.Create; 130 131 Parts.Explode(Value, ' ', StrToStr); 132 DateParts.Explode(Parts[0], '-', StrToStr); 133 Result := EncodeDate(StrToInt(DateParts[0]), StrToInt(DateParts[1]), 134 StrToInt(DateParts[2])); 135 if Parts.Count > 1 then begin 136 TimeParts.Explode(Parts[1], ':', StrToStr); 137 Result := Result + EncodeTime(StrToInt(TimeParts[0]), StrToInt(TimeParts[1]), 138 StrToInt(TimeParts[2]), 0); 139 end; 140 finally 141 DateParts.Free; 142 TimeParts.Free; 143 Parts.Free; 144 end; 145 end; 146 147 function DateTimeToSQL(Value: TDateTime): string; 148 begin 149 Result := FormatDateTime('yyyy-mm-dd hh.nn.ss', Value); 150 end; 151 152 { TSqlDatabase } 123 153 124 154 procedure TSqlDatabase.Connect; … … 132 162 // FSession.charset := 'latin2'; 133 163 NewSession := mysql_real_connect(FSession, PChar(HostName), PChar(UserName), 134 PChar(Password), PChar( Schema), 3306, nil, CLIENT_LONG_PASSWORD + CLIENT_CONNECT_WITH_DB);164 PChar(Password), PChar(Database), 3306, nil, CLIENT_LONG_PASSWORD + CLIENT_CONNECT_WITH_DB); 135 165 if Assigned(NewSession) then begin 136 166 FConnected := True; 137 167 FSession := NewSession; 138 168 end else FConnected := False; 139 CheckError; 140 Rows := Query('SET NAMES ' + Encoding); 141 Rows.Free; 142 end; 143 144 procedure TSqlDatabase.Insert(ATable: string; Data: TAssociativeArray); 169 170 if LastErrorNumber <> 0 then 171 raise EQueryError.Create(Format(SDatabaseQueryError, [LastErrorMessage])); 172 173 try 174 Rows := TDbRows.Create; 175 Query(Rows, 'SET NAMES ' + Encoding); 176 finally 177 Rows.Free; 178 end; 179 end; 180 181 procedure TSqlDatabase.Insert(ATable: string; Data: TDictionaryStringString); 145 182 var 146 183 DbNames: string; … … 154 191 DbValues := ''; 155 192 for I := 0 to Data.Count - 1 do begin 156 Value := Data. ValuesAtIndex[I];193 Value := Data.Items[I].Value; 157 194 StringReplace(Value, '"', '\"', [rfReplaceAll]); 158 195 if Value = 'NOW()' then DbValues := DbValues + ',' + Value 159 196 else DbValues := DbValues + ',"' + Value + '"'; 160 DbNames := DbNames + ',`' + Data. Names[I] + '`';197 DbNames := DbNames + ',`' + Data.Keys[I] + '`'; 161 198 end; 162 199 System.Delete(DbNames, 1, 1); 163 200 System.Delete(DbValues, 1, 1); 164 DbResult := Query('INSERT INTO `' + Table + '` (' + DbNames + ') VALUES (' + DbValues + ')'); 165 DbResult.Free; 166 end; 167 168 function TSqlDatabase.Query(Data: string): TDbRows; 201 try 202 DbResult := TDbRows.Create; 203 Query(DbResult, 'INSERT INTO `' + Table + '` (' + DbNames + ') VALUES (' + DbValues + ')'); 204 finally 205 DbResult.Free; 206 end; 207 end; 208 209 procedure TSqlDatabase.Query(DbRows: TDbRows; Data: string); 169 210 var 170 211 I, II: Integer; … … 172 213 DbRow: MYSQL_ROW; 173 214 begin 215 DbRows.Clear; 174 216 //DebugLog('SqlDatabase query: '+Data); 175 217 RepeatLastAction := False; 176 218 LastQuery := Data; 177 //if not Connected then NastaveniPripojeni.ShowModal;178 Result := TDbRows.Create;179 //repeat180 219 mysql_query(FSession, PChar(Data)); 181 //until not182 CheckError;183 //if not CheckError then184 begin 185 186 187 Result.Count := mysql_num_rows(DbResult);188 for I := 0 to Result.Count - 1 do begin189 190 Result[I] := TAssociativeArray.Create;191 with Result[I] do begin192 193 Add(mysql_fetch_field_direct(DbResult, II)^.Name +194 NameValueSeparator +PChar((DbRow + II)^));220 if LastErrorNumber <> 0 then begin 221 raise EQueryError.Create(Format(SDatabaseQueryError, [LastErrorMessage])); 222 end; 223 224 DbResult := mysql_store_result(FSession); 225 if Assigned(DbResult) then begin 226 DbRows.Count := mysql_num_rows(DbResult); 227 for I := 0 to DbRows.Count - 1 do begin 228 DbRow := mysql_fetch_row(DbResult); 229 DbRows[I] := TDictionaryStringString.Create; 230 with DbRows[I] do begin 231 for II := 0 to mysql_num_fields(DbResult) - 1 do begin 232 Add(mysql_fetch_field_direct(DbResult, II)^.Name, 233 PChar((DbRow + II)^)); 195 234 end; 196 235 end; 197 236 end; 198 end;199 237 end; 200 238 mysql_free_result(DbResult); 201 (* 202 if Assigned(DatabaseIntegrity) then 203 with DatabaseIntegrity do if not Checking then begin 204 Check; 205 DebugLog('Database integrity: Unreferenced='+IntToStr(Unreferenced)+' BadReferences='+IntToStr(BadReferences)); 206 end; 207 *) 208 end; 209 210 procedure TSqlDatabase.Replace(ATable: string; Data: TAssociativeArray); 239 end; 240 241 procedure TSqlDatabase.Replace(ATable: string; Data: TDictionaryStringString); 211 242 var 212 243 DbNames: string; … … 220 251 DbValues := ''; 221 252 for I := 0 to Data.Count - 1 do begin 222 Value := Data. ValuesAtIndex[I];253 Value := Data.Items[I].Value; 223 254 StringReplace(Value, '"', '\"', [rfReplaceAll]); 224 255 if Value = 'NOW()' then DbValues := DbValues + ',' + Value 225 256 else DbValues := DbValues + ',"' + Value + '"'; 226 DbNames := DbNames + ',`' + Data. Names[I] + '`';257 DbNames := DbNames + ',`' + Data.Keys[I] + '`'; 227 258 end; 228 259 System.Delete(DbNames, 1, 1); 229 260 System.Delete(DbValues, 1, 1); 230 DbResult := Query('REPLACE INTO `' + Table + '` (' + DbNames + ') VALUES (' + DbValues + ')'); 231 DbResult.Free; 232 end; 233 234 function TSqlDatabase.Select(ATable: string; Filter: string = '*'; Condition: string = '1'): TDbRows; 261 try 262 DbResult := TDbRows.Create; 263 Query(DbResult, 'REPLACE INTO `' + Table + '` (' + DbNames + ') VALUES (' + DbValues + ')'); 264 finally 265 DbResult.Free; 266 end; 267 end; 268 269 procedure TSqlDatabase.Select(DbRows: TDbRows; ATable: string; Filter: string = '*'; Condition: string = '1'); 235 270 begin 236 271 Table := ATable; 237 Result := Query('SELECT ' + Filter + ' FROM `' + Table + '` WHERE '+Condition);238 end; 239 240 procedure TSqlDatabase.Update(ATable: string; Data: T AssociativeArray; Condition: string = '1');272 Query(DbRows, 'SELECT ' + Filter + ' FROM `' + Table + '` WHERE ' + Condition); 273 end; 274 275 procedure TSqlDatabase.Update(ATable: string; Data: TDictionaryStringString; Condition: string = '1'); 241 276 var 242 277 DbValues: string; … … 248 283 DbValues := ''; 249 284 for I := 0 to Data.Count - 1 do begin 250 Value := Data. ValuesAtIndex[I];285 Value := Data.Items[I].Value; 251 286 StringReplace(Value, '"', '\"', [rfReplaceAll]); 252 287 if Value = 'NOW()' then DbValues := DbValues + ',' + Value 253 else DbValues := DbValues + ',' + Data. Names[I] + '=' + '"' + Value + '"';288 else DbValues := DbValues + ',' + Data.Keys[I] + '=' + '"' + Value + '"'; 254 289 end; 255 290 System.Delete(DbValues, 1, 1); 256 DbResult := Query('UPDATE `' + Table + '` SET (' + DbValues + ') WHERE ' + Condition); 257 DbResult.Free; 291 try 292 DbResult := TDbRows.Create; 293 Query(DbResult, 'UPDATE `' + Table + '` SET (' + DbValues + ') WHERE ' + Condition); 294 finally 295 DbResult.Free; 296 end; 258 297 end; 259 298 … … 263 302 end; 264 303 265 { TAssocArray }266 267 procedure TAssociativeArray.AddKeyValue(Key, Value: string);268 begin269 Add(Key + NameValueSeparator + Value);270 end;271 272 constructor TAssociativeArray.Create;273 begin274 NameValueSeparator := '|';275 end;276 277 destructor TAssociativeArray.Destroy;278 begin279 inherited;280 end;281 282 function TAssociativeArray.GetAllValues: string;283 var284 I: Integer;285 begin286 Result := '';287 for I := 0 to Count - 1 do begin288 Result := Result + Names[I] + '=' + ValuesAtIndex[I] + ',';289 end;290 end;291 292 function TAssociativeArray.GetValues(Index: string): string;293 begin294 Result := inherited Values[Index];295 end;296 297 function TAssociativeArray.GetValuesAtIndex(Index: Integer): string;298 begin299 Result := inherited Values[Names[Index]];300 end;301 302 304 procedure TSqlDatabase.Delete(ATable: string; Condition: string = '1'); 303 305 var … … 305 307 begin 306 308 Table := ATable; 307 DbResult := Query('DELETE FROM `' + Table + '` WHERE ' + Condition); 308 DbResult.Free; 309 try 310 DbResult := TDbRows.Create; 311 Query(DbResult, 'DELETE FROM `' + Table + '` WHERE ' + Condition); 312 finally 313 DbResult.Free; 314 end; 309 315 end; 310 316 … … 327 333 end; 328 334 329 procedure TAssociativeArray.SetValues(Index: string; const Value: string);330 begin331 inherited Values[Index] := Value;332 end;333 334 { TDbRows }335 336 destructor TDbRows.Destroy;337 var338 I: Integer;339 begin340 for I := 0 to Count - 1 do341 Data[I].Free;342 inherited;343 end;344 345 function TDbRows.GetData(Index: Integer): TAssociativeArray;346 begin347 Result := Items[Index];348 end;349 350 procedure TDbRows.SetData(Index: Integer; const Value: TAssociativeArray);351 begin352 Items[Index] := Value;353 end;354 355 335 function TSqlDatabase.LastInsertId: Integer; 356 336 begin … … 368 348 end; 369 349 370 function TSqlDatabase.CheckError: Boolean;371 begin372 Result := LastErrorNumber <> 0;373 if Result then374 raise EQueryError.Create('Database query error: "' + LastErrorMessage + '"');375 end;376 377 350 procedure TSqlDatabase.CreateDatabase; 378 351 var 379 352 TempDatabase: string; 380 begin 381 TempDatabase := Schema; 382 Schema := 'mysql'; 353 DbRows: TDbRows; 354 begin 355 TempDatabase := Database; 356 Database := 'mysql'; 383 357 Connect; 384 Query('CREATE DATABASE ' + TempDatabase); 358 try 359 DbRows := TDbRows.Create; 360 Query(DbRows, 'CREATE DATABASE ' + TempDatabase); 361 finally 362 DbRows.Free; 363 end; 385 364 Disconnect; 386 Schema:= TempDatabase;365 Database := TempDatabase; 387 366 end; 388 367 389 368 procedure TSqlDatabase.CreateTable(Name: string); 390 begin 391 Query('CREATE TABLE `' + Name + '`' + 392 ' (`Id` INT NOT NULL AUTO_INCREMENT, PRIMARY KEY (`Id`));'); 369 var 370 DbRows: TDbRows; 371 begin 372 try 373 DbRows := TDbRows.Create; 374 Query(DbRows, 'CREATE TABLE `' + Name + '`' + 375 ' (`Id` INT NOT NULL AUTO_INCREMENT, PRIMARY KEY (`Id`));'); 376 finally 377 DbRows.Free; 378 end; 393 379 end; 394 380 … … 398 384 ColTypes: array[0..17] of string = ('', 'INT', 'CHAR', 'INT', 'DOUBLE', 399 385 'VARCHAR(255)', 'SET', 'INT', '', '', 'TEXT', 'TEXT', '', '', '', '', '', ''); 400 begin 401 Query('ALTER TABLE `' + Table + '` ADD `' + ColumnName + '` ' + 402 ColTypes[Integer(ColumnType)] + ' NOT NULL'); 386 var 387 DbRows: TDbRows; 388 begin 389 try 390 DbRows := TDbRows.Create; 391 Query(DbRows, 'ALTER TABLE `' + Table + '` ADD `' + ColumnName + '` ' + 392 ColTypes[Integer(ColumnType)] + ' NOT NULL'); 393 finally 394 DbRows.Free; 395 end; 403 396 end; 404 397 … … 413 406 end; 414 407 415 procedure TSqlDatabase.Set Schema(const Value: string);408 procedure TSqlDatabase.SetDatabase(const Value: string); 416 409 begin 417 410 FDatabase := Value; … … 419 412 end; 420 413 414 { TDbRows } 415 416 destructor TDbRows.Destroy; 417 begin 418 inherited; 419 end; 420 421 function TDbRows.GetData(Index: Integer): TDictionaryStringString; 422 begin 423 Result := TDictionaryStringString(Items[Index]); 424 end; 425 426 procedure TDbRows.SetData(Index: Integer; const Value: TDictionaryStringString); 427 begin 428 Items[Index] := Value; 429 end; 430 421 431 end. 422 432 -
trunk/Forms/UItemAdd.lfm
r5 r7 2 2 Left = 400 3 3 Height = 421 4 Top = 1 564 Top = 130 5 5 Width = 567 6 Caption = ' Přidání položky'6 Caption = 'Add item' 7 7 ClientHeight = 421 8 8 ClientWidth = 567 … … 26 26 Width = 75 27 27 Anchors = [akRight, akBottom] 28 Caption = ' Zrušit'28 Caption = 'Cancel' 29 29 OnClick = ButtonCancelClick 30 30 TabOrder = 1 … … 36 36 Width = 75 37 37 Anchors = [akRight, akBottom] 38 Caption = ' Přidat'38 Caption = 'Add' 39 39 OnClick = ButtonSaveClick 40 40 TabOrder = 2 -
trunk/Forms/UItemAdd.pas
r5 r7 77 77 LastTop := 8; 78 78 Column := 0; 79 ObjectInfo := MainForm.Database.Query('SELECT * FROM `Object` WHERE `Id`=' + IntToStr(MainForm.SelectedObject)); 79 try 80 ObjectInfo := TDbRows.Create; 81 MainForm.Database.Query(ObjectInfo, 'SELECT * FROM `Object` WHERE `Id`=' + IntToStr(MainForm.SelectedObject)); 80 82 if ObjectInfo.Count = 1 then begin 81 83 82 84 for I := Panel1.ControlCount - 1 downto 0 do 83 Panel1.Controls[I]. Destroy;85 Panel1.Controls[I].Free; 84 86 85 87 // Load column names 86 Properties := MainForm.Database.Query('SELECT * FROM `Property` WHERE `Object`=' + 88 try 89 Properties := TDbRows.Create; 90 MainForm.Database.Query(Properties, 'SELECT * FROM `Property` WHERE `Object`=' + 87 91 IntToStr(MainForm.SelectedObject)); 88 92 for I := 0 to Properties.Count - 1 do begin … … 145 149 if Column = 0 then LastTop := LastTop + NewControl.Height + 4; 146 150 end; 147 Properties.Destroy; 148 end else ShowMessage('Objekt nenalezen'); 149 ObjectInfo.Destroy; 151 152 finally 153 Properties.Free; 154 end; 155 end else ShowMessage(SObjectNotFound); 156 finally 157 ObjectInfo.Free; 158 end; 150 159 end; 151 160 -
trunk/Forms/UItemEdit.lfm
r6 r7 2 2 Left = 295 3 3 Height = 429 4 Top = 1 744 Top = 122 5 5 Width = 558 6 6 ActiveControl = Panel1 7 Caption = ' Úprava položky'7 Caption = 'Edit item' 8 8 ClientHeight = 429 9 9 ClientWidth = 558 … … 27 27 Width = 75 28 28 Anchors = [akRight, akBottom] 29 Caption = ' Zrušit'29 Caption = 'Cancel' 30 30 OnClick = ButtonCancelClick 31 31 TabOrder = 1 … … 37 37 Width = 75 38 38 Anchors = [akRight, akBottom] 39 Caption = ' Uložit'39 Caption = 'Save' 40 40 OnClick = ButtonSaveClick 41 41 TabOrder = 2 -
trunk/Forms/UItemEdit.pas
r6 r7 78 78 LastTop := 8; 79 79 Column := 0; 80 ObjectInfo := MainForm.Database.Query('SELECT * FROM `Object` WHERE `Id`=' + IntToStr(MainForm.SelectedObject)); 80 try 81 ObjectInfo := TDbRows.Create; 82 MainForm.Database.Query(ObjectInfo, 'SELECT * FROM `Object` WHERE `Id`=' + IntToStr(MainForm.SelectedObject)); 81 83 if ObjectInfo.Count = 1 then begin 82 84 83 85 for I := Panel1.ControlCount - 1 downto 0 do 84 Panel1.Controls[I]. Destroy;86 Panel1.Controls[I].Free; 85 87 86 88 // Load column names 87 Properties := MainForm.Database.Query('SELECT * FROM `Property` WHERE `Object`=' + 89 try 90 Properties := TDbRows.Create; 91 MainForm.Database.Query(Properties, 'SELECT * FROM `Property` WHERE `Object`=' + 88 92 IntToStr(MainForm.SelectedObject)); 89 Values := MainForm.Database.Query('SELECT * FROM `' + ObjectInfo[0].Values['Schema'] + '`.`' + 93 Values := TDbRows.Create; 94 MainForm.Database.Query(Values, 'SELECT * FROM `' + ObjectInfo[0].Values['Schema'] + '`.`' + 90 95 ObjectInfo[0].Values['Table'] + '` WHERE ' + ObjectInfo[0].Values['PrimaryKey'] + ' = ' + 91 96 IntToStr(MainForm.SelectedItem)); … … 155 160 Column := (Column + 1) mod 2; 156 161 if Column = 0 then LastTop := LastTop + NewControl.Height + 4; 157 end else ShowMessage('Položka nenalezena'); 158 Values.Destroy; 159 Properties.Destroy; 160 end else ShowMessage('Objekt nenalezen'); 161 ObjectInfo.Destroy; 162 end else ShowMessage(SItemNotFound); 163 finally 164 Values.Free; 165 Properties.Free; 166 end; 167 end else ShowMessage(SObjectNotFound); 168 finally 169 ObjectInfo.Free; 170 end; 162 171 end; 163 172 -
trunk/Forms/UItemView.lfm
r6 r7 4 4 Top = 135 5 5 Width = 552 6 Caption = ' Zobrazení položky'6 Caption = 'View item' 7 7 ClientHeight = 416 8 8 ClientWidth = 552 … … 16 16 Width = 75 17 17 Anchors = [akRight, akBottom] 18 Caption = ' Zavřít'18 Caption = 'Close' 19 19 OnClick = ButtonCloseClick 20 20 TabOrder = 0 … … 36 36 Width = 75 37 37 Anchors = [akRight, akBottom] 38 Caption = 'Edit ovat'38 Caption = 'Edit' 39 39 OnClick = ButtonEditClick 40 40 TabOrder = 2 -
trunk/Forms/UItemView.pas
r6 r7 82 82 LastTop := 8; 83 83 Column := 0; 84 ObjectInfo := MainForm.Database.Query('SELECT * FROM `Object` WHERE `Id`=' + IntToStr(MainForm.SelectedObject)); 84 try 85 ObjectInfo := TDbRows.Create; 86 MainForm.Database.Query(ObjectInfo, 'SELECT * FROM `Object` WHERE `Id`=' + IntToStr(MainForm.SelectedObject)); 85 87 if ObjectInfo.Count = 1 then begin 86 88 … … 89 91 90 92 // Load column names 91 Properties := MainForm.Database.Query('SELECT * FROM `Property` WHERE `Object`=' + 93 try 94 Properties := TDbRows.Create; 95 MainForm.Database.Query(Properties, 'SELECT * FROM `Property` WHERE `Object`=' + 92 96 IntToStr(MainForm.SelectedObject)); 93 Values := MainForm.Database.Query('SELECT * FROM `' + ObjectInfo[0].Values['Schema'] + '`.`' + 97 Values := TDbRows.Create; 98 MainForm.Database.Query(Values, 'SELECT * FROM `' + ObjectInfo[0].Values['Schema'] + '`.`' + 94 99 ObjectInfo[0].Values['Table'] + '` WHERE ' + ObjectInfo[0].Values['PrimaryKey'] + ' = ' + 95 100 IntToStr(MainForm.SelectedItem)); … … 110 115 Column := (Column + 1) mod 2; 111 116 if Column = 0 then LastTop := LastTop + NewControl.Height + 4; 112 end else ShowMessage('Položka nenalezena'); 113 Values.Destroy; 114 Properties.Destroy; 115 end else ShowMessage('Objekt nenalezen'); 116 ObjectInfo.Free; 117 end else ShowMessage(SItemNotFound); 118 finally 119 Values.Free; 120 Properties.Free; 121 end; 122 end else ShowMessage(SObjectNotFound); 123 finally 124 ObjectInfo.Free; 125 end; 117 126 end; 118 127 -
trunk/Forms/ULoginForm.lfm
r3 r7 6 6 BorderIcons = [biSystemMenu] 7 7 BorderStyle = bsDialog 8 Caption = ' Přihlášení'8 Caption = 'Login' 9 9 ClientHeight = 177 10 10 ClientWidth = 405 … … 12 12 object Label1: TLabel 13 13 Left = 16 14 Height = 1 814 Height = 14 15 15 Top = 48 16 Width = 4717 Caption = ' Jméno:'16 Width = 61 17 Caption = 'Username:' 18 18 ParentColor = False 19 19 end 20 20 object Label2: TLabel 21 21 Left = 16 22 Height = 1 822 Height = 14 23 23 Top = 80 24 Width = 4325 Caption = ' Heslo:'24 Width = 57 25 Caption = 'Password:' 26 26 ParentColor = False 27 27 end … … 31 31 Top = 128 32 32 Width = 75 33 Caption = ' Ukončit'33 Caption = 'Close' 34 34 TabOrder = 0 35 35 end … … 39 39 Top = 128 40 40 Width = 75 41 Caption = ' Přihlásit'41 Caption = 'Login' 42 42 TabOrder = 1 43 43 end 44 44 object Edit1: TEdit 45 Left = 7246 Height = 2 745 Left = 88 46 Height = 23 47 47 Top = 40 48 Width = 1 2048 Width = 104 49 49 TabOrder = 2 50 Text = 'Edit1'51 50 end 52 51 object MaskEdit1: TMaskEdit 53 Left = 7254 Height = 2 752 Left = 88 53 Height = 23 55 54 Top = 71 56 Width = 1 2055 Width = 104 57 56 CharCase = ecNormal 58 57 MaxLength = 1 -
trunk/Forms/UMainForm.lfm
r6 r7 28 28 Height = 14 29 29 Top = 4 30 Width = 4 631 Caption = ' Skupiny:'30 Width = 44 31 Caption = 'Groups:' 32 32 ParentColor = False 33 33 end … … 60 60 Height = 14 61 61 Top = 4 62 Width = 3863 Caption = ' Výpisy:'62 Width = 46 63 Caption = 'Reports:' 64 64 ParentColor = False 65 65 end … … 112 112 object AItemDelete: TAction 113 113 Category = 'Item' 114 Caption = ' Smazat'114 Caption = 'Delete' 115 115 end 116 116 object AItemAdd: TAction 117 117 Category = 'Item' 118 Caption = ' Přidat'118 Caption = 'Add' 119 119 OnExecute = AItemAddExecute 120 120 end 121 121 object AItemEdit: TAction 122 122 Category = 'Item' 123 Caption = ' Upravit'123 Caption = 'Edit' 124 124 OnExecute = AItemEditExecute 125 125 end 126 126 object AItemView: TAction 127 127 Category = 'Item' 128 Caption = ' Zobrazit'128 Caption = 'View' 129 129 OnExecute = AItemViewExecute 130 130 end 131 131 object AObjectGroupDelete: TAction 132 132 Category = 'ObjectGroup' 133 Caption = ' Odebrat'133 Caption = 'Delete' 134 134 end 135 135 object AObjectGroupAddGroup: TAction 136 136 Category = 'ObjectGroup' 137 Caption = ' Přidat skupinu'137 Caption = 'Add group' 138 138 OnExecute = AObjectGroupAddGroupExecute 139 139 end 140 140 object AObjectGroupAddObject: TAction 141 141 Category = 'ObjectGroup' 142 Caption = ' Přidat objekt'142 Caption = 'Add object' 143 143 end 144 144 object AObjectGroupEdit: TAction 145 145 Category = 'ObjectGroup' 146 Caption = ' Upravit'146 Caption = 'Edit' 147 147 OnExecute = AObjectGroupEditExecute 148 148 end 149 149 object AObjectDelete: TAction 150 150 Category = 'Object' 151 Caption = ' Odstranit'151 Caption = 'Delete' 152 152 end 153 153 object AObjectEdit: TAction 154 154 Category = 'Object' 155 Caption = ' Upravit'155 Caption = 'Edit' 156 156 OnExecute = AObjectEditExecute 157 157 end … … 161 161 end 162 162 object AToggleFullscreen: TAction 163 Caption = 'Fullscreen mode F11'163 Caption = 'Fullscreen mode' 164 164 OnExecute = AToggleFullscreenExecute 165 165 ShortCut = 122 -
trunk/Forms/UMainForm.lrt
r6 r7 1 1 TMAINFORM.MAINFORM.CAPTION=ChronIS 2 TMAINFORM.LABEL1.CAPTION= Skupiny:3 TMAINFORM.LABEL2.CAPTION= Výpisy:4 TMAINFORM.AITEMDELETE.CAPTION= Smazat5 TMAINFORM.AITEMADD.CAPTION= Přidat6 TMAINFORM.AITEMEDIT.CAPTION= Upravit7 TMAINFORM.AITEMVIEW.CAPTION= Zobrazit8 TMAINFORM.AOBJECTGROUPDELETE.CAPTION= Odebrat9 TMAINFORM.AOBJECTGROUPADDGROUP.CAPTION= Přidat skupinu10 TMAINFORM.AOBJECTGROUPADDOBJECT.CAPTION= Přidat objekt11 TMAINFORM.AOBJECTGROUPEDIT.CAPTION= Upravit12 TMAINFORM.AOBJECTDELETE.CAPTION= Odstranit13 TMAINFORM.AOBJECTEDIT.CAPTION= Upravit2 TMAINFORM.LABEL1.CAPTION=Groups: 3 TMAINFORM.LABEL2.CAPTION=Reports: 4 TMAINFORM.AITEMDELETE.CAPTION=Delete 5 TMAINFORM.AITEMADD.CAPTION=Add 6 TMAINFORM.AITEMEDIT.CAPTION=Edit 7 TMAINFORM.AITEMVIEW.CAPTION=View 8 TMAINFORM.AOBJECTGROUPDELETE.CAPTION=Delete 9 TMAINFORM.AOBJECTGROUPADDGROUP.CAPTION=Add group 10 TMAINFORM.AOBJECTGROUPADDOBJECT.CAPTION=Add object 11 TMAINFORM.AOBJECTGROUPEDIT.CAPTION=Edit 12 TMAINFORM.AOBJECTDELETE.CAPTION=Delete 13 TMAINFORM.AOBJECTEDIT.CAPTION=Edit 14 14 TMAINFORM.AEXIT.CAPTION=Exit 15 TMAINFORM.ATOGGLEFULLSCREEN.CAPTION=Fullscreen mode F1115 TMAINFORM.ATOGGLEFULLSCREEN.CAPTION=Fullscreen mode 16 16 TMAINFORM.MENUITEM13.CAPTION=Server 17 17 TMAINFORM.MENUITEM11.CAPTION=View -
trunk/Forms/UMainForm.pas
r6 r7 100 100 MainForm: TMainForm; 101 101 102 resourcestring 103 SItemNotFound = 'Item not found'; 104 SObjectNotFound = 'Object not found'; 105 106 102 107 implementation 103 108 … … 129 134 Database.HostName := TextContent; 130 135 if NodeName = 'schema' then 131 Database. Schema:= TextContent;136 Database.Database := TextContent; 132 137 if NodeName = 'username' then 133 138 Database.UserName := TextContent; … … 306 311 TopItem.SelectedIndex := 0; 307 312 try 308 DbRows := Database.Query('SELECT * FROM `ObjectGroup`'); 313 DbRows := TDbRows.Create; 314 Database.Query(DbRows, 'SELECT * FROM `ObjectGroup`'); 309 315 for I := 0 to DbRows.Count - 1 do begin 310 316 NewNode := AddChild(TopItem, DbRows[I].Values['Name']); … … 313 319 NewNode.Data := Pointer(StrToInt(DbRows[I].Values['Id'])); 314 320 try 315 ObjectDbRows := Database.Query('SELECT * FROM `Object` WHERE `Group`=' + DbRows[I].Values['Id']); 321 ObjectDbRows := TDbRows.Create; 322 Database.Query(ObjectDbRows, 'SELECT * FROM `Object` WHERE `Group`=' + DbRows[I].Values['Id']); 316 323 for O := 0 to ObjectDbRows.Count - 1 do begin 317 324 NewObjectNode := AddChild(NewNode, ObjectDbRows[O].Values['Name']); … … 348 355 Clear; 349 356 try 350 DbRows := Database.Query('SELECT * FROM `Object` WHERE `Id`=' + IntToStr(Integer(TreeView1.Selected.Data))); 357 DbRows := TDbRows.Create; 358 Database.Query(DbRows, 'SELECT * FROM `Object` WHERE `Id`=' + IntToStr(Integer(TreeView1.Selected.Data))); 351 359 if DbRows.Count = 1 then begin 352 360 SelectedObject := StrToInt(DbRows[0].Values['Id']); … … 354 362 // Load column names 355 363 try 356 Properties := Database.Query('SELECT * FROM `Property` WHERE `Object`=' + 364 Properties := TDbRows.Create; 365 Database.Query(Properties, 'SELECT * FROM `Property` WHERE `Object`=' + 357 366 DbRows[0].Values['Id']); 358 367 Columns.Clear; … … 371 380 // Load items 372 381 try 373 Values := Database.Query('SELECT * FROM `' + DbRows[0].Values['Schema'] + '`.`' + 382 Values := TDbRows.Create; 383 Database.Query(Values, 'SELECT * FROM `' + DbRows[0].Values['Schema'] + '`.`' + 374 384 DbRows[0].Values['Table'] + '`'); 375 385 for I := 0 to Values.Count - 1 do begin -
trunk/chronis.lpi
r6 r7 35 35 </local> 36 36 </RunParams> 37 <RequiredPackages Count=" 1">37 <RequiredPackages Count="2"> 38 38 <Item1> 39 <PackageName Value="TemplateGenerics"/> 40 </Item1> 41 <Item2> 39 42 <PackageName Value="LCL"/> 40 </Item 1>43 </Item2> 41 44 </RequiredPackages> 42 45 <Units Count="13"> … … 99 102 <EditorIndex Value="2"/> 100 103 <WindowIndex Value="0"/> 101 <TopLine Value=" 264"/>102 <CursorPos X=" 3" Y="307"/>104 <TopLine Value="50"/> 105 <CursorPos X="5" Y="45"/> 103 106 <UsageCount Value="264"/> 104 107 <Loaded Value="True"/> … … 119 122 <ResourceBaseClass Value="Form"/> 120 123 <UnitName Value="UItemView"/> 124 <IsVisibleTab Value="True"/> 121 125 <EditorIndex Value="0"/> 122 126 <WindowIndex Value="0"/> 123 <TopLine Value=" 65"/>124 <CursorPos X=" 41" Y="68"/>127 <TopLine Value="76"/> 128 <CursorPos X="37" Y="98"/> 125 129 <UsageCount Value="327"/> 126 130 <Loaded Value="True"/> … … 135 139 <EditorIndex Value="1"/> 136 140 <WindowIndex Value="0"/> 137 <TopLine Value=" 56"/>138 <CursorPos X=" 23" Y="78"/>141 <TopLine Value="80"/> 142 <CursorPos X="30" Y="93"/> 139 143 <UsageCount Value="318"/> 140 144 <Loaded Value="True"/> … … 144 148 <Filename Value="Forms/ULoginForm.pas"/> 145 149 <IsPartOfProject Value="True"/> 150 <ComponentName Value="LoginForm"/> 146 151 <HasResources Value="True"/> 152 <ResourceBaseClass Value="Form"/> 147 153 <UnitName Value="ULoginForm"/> 154 <EditorIndex Value="5"/> 155 <WindowIndex Value="0"/> 156 <TopLine Value="1"/> 157 <CursorPos X="1" Y="1"/> 148 158 <UsageCount Value="317"/> 159 <Loaded Value="True"/> 160 <LoadedDesigner Value="True"/> 149 161 </Unit9> 150 162 <Unit10> … … 155 167 <ResourceBaseClass Value="Form"/> 156 168 <UnitName Value="UMainForm"/> 157 <IsVisibleTab Value="True"/>158 169 <EditorIndex Value="3"/> 159 170 <WindowIndex Value="0"/> 160 <TopLine Value=" 235"/>161 <CursorPos X=" 28" Y="245"/>171 <TopLine Value="372"/> 172 <CursorPos X="30" Y="383"/> 162 173 <UsageCount Value="317"/> 163 174 <Loaded Value="True"/> … … 178 189 <EditorIndex Value="4"/> 179 190 <WindowIndex Value="0"/> 180 <TopLine Value=" 47"/>181 <CursorPos X=" 6" Y="48"/>191 <TopLine Value="69"/> 192 <CursorPos X="41" Y="90"/> 182 193 <UsageCount Value="313"/> 183 194 <Loaded Value="True"/> … … 188 199 <Position1> 189 200 <Filename Value="Forms/UItemAdd.pas"/> 190 <Caret Line=" 51" Column="33" TopLine="31"/>201 <Caret Line="9" Column="27" TopLine="1"/> 191 202 </Position1> 192 203 <Position2> 193 204 <Filename Value="Forms/UItemAdd.pas"/> 194 <Caret Line=" 57" Column="32" TopLine="38"/>205 <Caret Line="138" Column="28" TopLine="116"/> 195 206 </Position2> 196 207 <Position3> 197 <Filename Value="Forms/UItem Add.pas"/>198 <Caret Line=" 23" Column="1" TopLine="5"/>208 <Filename Value="Forms/UItemEdit.pas"/> 209 <Caret Line="137" Column="16" TopLine="125"/> 199 210 </Position3> 200 211 <Position4> 201 <Filename Value="Forms/UItem Add.pas"/>202 <Caret Line=" 88" Column="1" TopLine="81"/>212 <Filename Value="Forms/UItemEdit.pas"/> 213 <Caret Line="78" Column="23" TopLine="56"/> 203 214 </Position4> 204 215 <Position5> 205 <Filename Value="Forms/U ItemAdd.pas"/>206 <Caret Line=" 121" Column="27" TopLine="97"/>216 <Filename Value="Forms/UMainForm.pas"/> 217 <Caret Line="339" Column="43" TopLine="214"/> 207 218 </Position5> 208 219 <Position6> 209 <Filename Value="Forms/U ItemAdd.pas"/>210 <Caret Line=" 124" Column="31" TopLine="97"/>220 <Filename Value="Forms/UMainForm.pas"/> 221 <Caret Line="340" Column="43" TopLine="317"/> 211 222 </Position6> 212 223 <Position7> 213 <Filename Value="Forms/U ItemAdd.pas"/>214 <Caret Line=" 125" Column="32" TopLine="104"/>224 <Filename Value="Forms/UMainForm.pas"/> 225 <Caret Line="341" Column="43" TopLine="318"/> 215 226 </Position7> 216 227 <Position8> 217 <Filename Value="Forms/U ItemAdd.pas"/>218 <Caret Line=" 126" Column="32" TopLine="105"/>228 <Filename Value="Forms/UMainForm.pas"/> 229 <Caret Line="342" Column="43" TopLine="319"/> 219 230 </Position8> 220 231 <Position9> 221 <Filename Value="Forms/U ItemAdd.pas"/>222 <Caret Line=" 125" Column="32" TopLine="104"/>232 <Filename Value="Forms/UMainForm.pas"/> 233 <Caret Line="343" Column="43" TopLine="320"/> 223 234 </Position9> 224 235 <Position10> 225 <Filename Value="Forms/U ItemEdit.pas"/>226 <Caret Line=" 148" Column="1" TopLine="112"/>236 <Filename Value="Forms/UMainForm.pas"/> 237 <Caret Line="344" Column="43" TopLine="321"/> 227 238 </Position10> 228 239 <Position11> 229 <Filename Value="Forms/U ItemEdit.pas"/>230 <Caret Line=" 9" Column="50" TopLine="1"/>240 <Filename Value="Forms/UMainForm.pas"/> 241 <Caret Line="345" Column="43" TopLine="322"/> 231 242 </Position11> 232 243 <Position12> 233 <Filename Value="Forms/U ItemAdd.pas"/>234 <Caret Line=" 9" Column="27" TopLine="1"/>244 <Filename Value="Forms/UMainForm.pas"/> 245 <Caret Line="346" Column="43" TopLine="323"/> 235 246 </Position12> 236 247 <Position13> 237 <Filename Value="Forms/U ItemAdd.pas"/>238 <Caret Line=" 138" Column="28" TopLine="116"/>248 <Filename Value="Forms/UMainForm.pas"/> 249 <Caret Line="345" Column="43" TopLine="322"/> 239 250 </Position13> 240 251 <Position14> 241 <Filename Value="Forms/U ItemEdit.pas"/>242 <Caret Line=" 137" Column="16" TopLine="125"/>252 <Filename Value="Forms/UMainForm.pas"/> 253 <Caret Line="344" Column="43" TopLine="321"/> 243 254 </Position14> 244 255 <Position15> 245 <Filename Value="Forms/U ItemEdit.pas"/>246 <Caret Line=" 78" Column="23" TopLine="56"/>256 <Filename Value="Forms/UMainForm.pas"/> 257 <Caret Line="345" Column="43" TopLine="322"/> 247 258 </Position15> 248 259 <Position16> 249 260 <Filename Value="Forms/UMainForm.pas"/> 250 <Caret Line="3 39" Column="43" TopLine="214"/>261 <Caret Line="352" Column="43" TopLine="329"/> 251 262 </Position16> 252 263 <Position17> 253 264 <Filename Value="Forms/UMainForm.pas"/> 254 <Caret Line=" 340" Column="43" TopLine="317"/>265 <Caret Line="218" Column="1" TopLine="195"/> 255 266 </Position17> 256 267 <Position18> 257 268 <Filename Value="Forms/UMainForm.pas"/> 258 <Caret Line=" 341" Column="43" TopLine="318"/>269 <Caret Line="79" Column="21" TopLine="67"/> 259 270 </Position18> 260 271 <Position19> 261 272 <Filename Value="Forms/UMainForm.pas"/> 262 <Caret Line=" 342" Column="43" TopLine="319"/>273 <Caret Line="81" Column="21" TopLine="69"/> 263 274 </Position19> 264 275 <Position20> 265 <Filename Value="Forms/U MainForm.pas"/>266 <Caret Line=" 343" Column="43" TopLine="320"/>276 <Filename Value="Forms/UItemView.pas"/> 277 <Caret Line="118" Column="39" TopLine="98"/> 267 278 </Position20> 268 279 <Position21> 269 <Filename Value="Forms/U MainForm.pas"/>270 <Caret Line="3 44" Column="43" TopLine="321"/>280 <Filename Value="Forms/UItemEdit.pas"/> 281 <Caret Line="39" Column="1" TopLine="26"/> 271 282 </Position21> 272 283 <Position22> 273 <Filename Value="Forms/U MainForm.pas"/>274 <Caret Line=" 345" Column="43" TopLine="322"/>284 <Filename Value="Forms/UItemEdit.pas"/> 285 <Caret Line="81" Column="31" TopLine="70"/> 275 286 </Position22> 276 287 <Position23> 277 <Filename Value="Forms/U MainForm.pas"/>278 <Caret Line=" 346" Column="43" TopLine="323"/>288 <Filename Value="Forms/UItemAdd.pas"/> 289 <Caret Line="153" Column="39" TopLine="2"/> 279 290 </Position23> 280 291 <Position24> 281 292 <Filename Value="Forms/UMainForm.pas"/> 282 <Caret Line=" 345" Column="43" TopLine="322"/>293 <Caret Line="102" Column="1" TopLine="91"/> 283 294 </Position24> 284 295 <Position25> 285 296 <Filename Value="Forms/UMainForm.pas"/> 286 <Caret Line=" 344" Column="43" TopLine="321"/>297 <Caret Line="138" Column="26" TopLine="125"/> 287 298 </Position25> 288 299 <Position26> 289 300 <Filename Value="Forms/UMainForm.pas"/> 290 <Caret Line=" 345" Column="43" TopLine="322"/>301 <Caret Line="136" Column="30" TopLine="125"/> 291 302 </Position26> 292 303 <Position27> 293 304 <Filename Value="Forms/UMainForm.pas"/> 294 <Caret Line="3 52" Column="43" TopLine="329"/>305 <Caret Line="314" Column="30" TopLine="302"/> 295 306 </Position27> 296 307 <Position28> 297 308 <Filename Value="Forms/UMainForm.pas"/> 298 <Caret Line=" 218" Column="1" TopLine="195"/>309 <Caret Line="343" Column="11" TopLine="322"/> 299 310 </Position28> 300 311 <Position29> 301 312 <Filename Value="Forms/UMainForm.pas"/> 302 <Caret Line=" 79" Column="21" TopLine="67"/>313 <Caret Line="368" Column="9" TopLine="346"/> 303 314 </Position29> 304 315 <Position30> 305 <Filename Value="Forms/U MainForm.pas"/>306 <Caret Line="8 1" Column="21" TopLine="69"/>316 <Filename Value="Forms/UItemView.pas"/> 317 <Caret Line="86" Column="24" TopLine="80"/> 307 318 </Position30> 308 319 </JumpHistory> -
trunk/chronis.lpr
r5 r7 9 9 Interfaces, // this includes the LCL widgetset 10 10 Forms, UPersistentForm, URegistry, USqlDatabase, UTreeState, 11 UItemView, UItemEdit, ULoginForm, UMainForm, UItemAdd 11 UItemView, UItemEdit, ULoginForm, UMainForm, UItemAdd, TemplateGenerics 12 12 { you can add units after this }; 13 13 -
trunk/languages/chronis.po
r6 r7 1 1 msgid "" 2 2 msgstr "Content-Type: text/plain; charset=UTF-8" 3 4 #: TITEMADDFORM.BUTTONCANCEL.CAPTION 5 msgctxt "TITEMADDFORM.BUTTONCANCEL.CAPTION" 6 msgid "Cancel" 7 msgstr "" 8 9 #: TITEMADDFORM.BUTTONSAVE.CAPTION 10 msgctxt "TITEMADDFORM.BUTTONSAVE.CAPTION" 11 msgid "Add" 12 msgstr "" 13 14 #: TITEMADDFORM.ITEMADDFORM.CAPTION 15 msgid "Add item" 16 msgstr "" 17 18 #: TITEMEDITFORM.BUTTONCANCEL.CAPTION 19 msgctxt "TITEMEDITFORM.BUTTONCANCEL.CAPTION" 20 msgid "Cancel" 21 msgstr "" 22 23 #: TITEMEDITFORM.BUTTONSAVE.CAPTION 24 msgid "Save" 25 msgstr "" 26 27 #: TITEMEDITFORM.ITEMEDITFORM.CAPTION 28 msgid "Edit item" 29 msgstr "" 30 31 #: TITEMVIEWFORM.BUTTONCLOSE.CAPTION 32 msgctxt "TITEMVIEWFORM.BUTTONCLOSE.CAPTION" 33 msgid "Close" 34 msgstr "" 35 36 #: TITEMVIEWFORM.BUTTONEDIT.CAPTION 37 msgctxt "TITEMVIEWFORM.BUTTONEDIT.CAPTION" 38 msgid "Edit" 39 msgstr "" 40 41 #: TITEMVIEWFORM.ITEMVIEWFORM.CAPTION 42 msgid "View item" 43 msgstr "" 44 45 #: TLOGINFORM.BUTTONCANCEL.CAPTION 46 msgctxt "TLOGINFORM.BUTTONCANCEL.CAPTION" 47 msgid "Close" 48 msgstr "" 49 50 #: TLOGINFORM.BUTTONLOGIN.CAPTION 51 msgctxt "TLOGINFORM.BUTTONLOGIN.CAPTION" 52 msgid "Login" 53 msgstr "" 54 55 #: TLOGINFORM.LABEL1.CAPTION 56 msgid "Username:" 57 msgstr "" 58 59 #: TLOGINFORM.LABEL2.CAPTION 60 msgid "Password:" 61 msgstr "" 62 63 #: TLOGINFORM.LOGINFORM.CAPTION 64 msgctxt "TLOGINFORM.LOGINFORM.CAPTION" 65 msgid "Login" 66 msgstr "" 3 67 4 68 #: TMAINFORM.AEXIT.CAPTION … … 7 71 8 72 #: TMAINFORM.AITEMADD.CAPTION 9 msgid "Přidat" 73 msgctxt "TMAINFORM.AITEMADD.CAPTION" 74 msgid "Add" 10 75 msgstr "" 11 76 12 77 #: TMAINFORM.AITEMDELETE.CAPTION 13 msgid "Smazat" 78 msgctxt "TMAINFORM.AITEMDELETE.CAPTION" 79 msgid "Delete" 14 80 msgstr "" 15 81 16 82 #: TMAINFORM.AITEMEDIT.CAPTION 17 83 msgctxt "TMAINFORM.AITEMEDIT.CAPTION" 18 msgid " Upravit"84 msgid "Edit" 19 85 msgstr "" 20 86 21 87 #: TMAINFORM.AITEMVIEW.CAPTION 22 msgid "Zobrazit" 88 msgctxt "TMAINFORM.AITEMVIEW.CAPTION" 89 msgid "View" 23 90 msgstr "" 24 91 25 92 #: TMAINFORM.AOBJECTDELETE.CAPTION 26 msgid "Odstranit" 93 msgctxt "TMAINFORM.AOBJECTDELETE.CAPTION" 94 msgid "Delete" 27 95 msgstr "" 28 96 29 97 #: TMAINFORM.AOBJECTEDIT.CAPTION 30 98 msgctxt "TMAINFORM.AOBJECTEDIT.CAPTION" 31 msgid " Upravit"99 msgid "Edit" 32 100 msgstr "" 33 101 34 102 #: TMAINFORM.AOBJECTGROUPADDGROUP.CAPTION 35 msgid " Přidat skupinu"103 msgid "Add group" 36 104 msgstr "" 37 105 38 106 #: TMAINFORM.AOBJECTGROUPADDOBJECT.CAPTION 39 msgid " Přidat objekt"107 msgid "Add object" 40 108 msgstr "" 41 109 42 110 #: TMAINFORM.AOBJECTGROUPDELETE.CAPTION 43 msgid "Odebrat" 111 msgctxt "TMAINFORM.AOBJECTGROUPDELETE.CAPTION" 112 msgid "Delete" 44 113 msgstr "" 45 114 46 115 #: TMAINFORM.AOBJECTGROUPEDIT.CAPTION 47 116 msgctxt "TMAINFORM.AOBJECTGROUPEDIT.CAPTION" 48 msgid " Upravit"117 msgid "Edit" 49 118 msgstr "" 50 119 51 120 #: TMAINFORM.ATOGGLEFULLSCREEN.CAPTION 52 msgid "Fullscreen mode F11"121 msgid "Fullscreen mode" 53 122 msgstr "" 54 123 55 124 #: TMAINFORM.LABEL1.CAPTION 56 msgid " Skupiny:"125 msgid "Groups:" 57 126 msgstr "" 58 127 59 128 #: TMAINFORM.LABEL2.CAPTION 60 msgid " Výpisy:"129 msgid "Reports:" 61 130 msgstr "" 62 131 … … 66 135 67 136 #: TMAINFORM.MENUITEM11.CAPTION 137 msgctxt "TMAINFORM.MENUITEM11.CAPTION" 68 138 msgid "View" 69 139 msgstr "" … … 77 147 msgstr "" 78 148 149 #: umainform.sitemnotfound 150 msgid "Item not found" 151 msgstr "" 152 153 #: umainform.sobjectnotfound 154 msgid "Object not found" 155 msgstr "" 156 157 #: usqldatabase.sdatabasequeryerror 158 msgid "Database query error: \"%s\"" 159 msgstr "" 160
Note:
See TracChangeset
for help on using the changeset viewer.