Changeset 11 for trunk/UCore.pas
- Timestamp:
- Feb 16, 2015, 10:42:24 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/UCore.pas
r10 r11 25 25 procedure AExitExecute(Sender: TObject); 26 26 procedure APreferencesExecute(Sender: TObject); 27 procedure CoolTranslator1Translate(Sender: TObject); 27 28 procedure DataModuleCreate(Sender: TObject); 28 29 procedure DataModuleDestroy(Sender: TObject); … … 57 58 {$R *.lfm} 58 59 60 resourcestring 61 STypeString = 'String'; 62 STypeInteger = 'Integer'; 63 STypeFloat = 'Float'; 64 STypeBoolean = 'Boolean'; 65 STypeMapPosition = 'Map position'; 66 STypeImage = 'Image'; 67 STypeDate = 'Date'; 68 STypeTime = 'Time'; 69 STypeDateTime = 'Date and time'; 70 59 71 { TCore } 60 72 … … 69 81 procedure TCore.AExitExecute(Sender: TObject); 70 82 begin 71 Form Tables.Close;83 FormMain.Close; 72 84 end; 73 85 … … 89 101 if FormPreferences.ShowModal = mrOk then begin 90 102 FormPreferences.Save(Preferences); 103 end; 104 end; 105 106 procedure TCore.CoolTranslator1Translate(Sender: TObject); 107 var 108 I: Integer; 109 begin 110 for I := 0 to DataTypes.Count - 1 do begin 111 TDataType(DataTypes[I]).Name := CoolTranslator1.TranslateText(TDataType(DataTypes[I]).Name, TDataType(DataTypes[I]).Name); 91 112 end; 92 113 end; … … 119 140 DataTypes.Clear; 120 141 with DataTypes do begin 121 RegisterType( 'String', ftString, TFieldString);122 RegisterType( 'Integer', ftInteger, TFieldInteger);123 RegisterType( 'Date and time', ftDateTime, TFieldDateTime);124 RegisterType( 'Boolean', ftBoolean, TFieldBoolean);125 RegisterType( 'Float', ftFloat, TFieldFloat);126 RegisterType( 'MapPosition', ftMapPosition, TFieldMapPosition);127 RegisterType( 'Date', ftDate, TFieldDate);128 RegisterType( 'Time', ftTime, TFieldTime);129 RegisterType( 'Image', ftImage, TFieldImage);142 RegisterType(STypeString, ftString, TFieldString); 143 RegisterType(STypeInteger, ftInteger, TFieldInteger); 144 RegisterType(STypeDateTime, ftDateTime, TFieldDateTime); 145 RegisterType(STypeBoolean, ftBoolean, TFieldBoolean); 146 RegisterType(STypeFloat, ftFloat, TFieldFloat); 147 RegisterType(STypeMapPosition, ftMapPosition, TFieldMapPosition); 148 RegisterType(STypeDate, ftDate, TFieldDate); 149 RegisterType(STypeTime, ftTime, TFieldTime); 150 RegisterType(STypeImage, ftImage, TFieldImage); 130 151 end; 131 152 end; … … 135 156 if FDatabase = AValue then Exit; 136 157 if Assigned(FDatabase) then begin 158 FDatabase.Save; 137 159 FDatabase.Clear; 138 160 end;
Note:
See TracChangeset
for help on using the changeset viewer.