Changeset 11 for trunk/UCore.pas


Ignore:
Timestamp:
Feb 16, 2015, 10:42:24 PM (10 years ago)
Author:
chronos
Message:
  • Added: Czech translation for most of interface texts.
  • Fixed: Creation of new table fields.
  • Fixed: Saving XML database on exit.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/UCore.pas

    r10 r11  
    2525    procedure AExitExecute(Sender: TObject);
    2626    procedure APreferencesExecute(Sender: TObject);
     27    procedure CoolTranslator1Translate(Sender: TObject);
    2728    procedure DataModuleCreate(Sender: TObject);
    2829    procedure DataModuleDestroy(Sender: TObject);
     
    5758{$R *.lfm}
    5859
     60resourcestring
     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
    5971{ TCore }
    6072
     
    6981procedure TCore.AExitExecute(Sender: TObject);
    7082begin
    71   FormTables.Close;
     83  FormMain.Close;
    7284end;
    7385
     
    89101  if FormPreferences.ShowModal = mrOk then begin
    90102    FormPreferences.Save(Preferences);
     103  end;
     104end;
     105
     106procedure TCore.CoolTranslator1Translate(Sender: TObject);
     107var
     108  I: Integer;
     109begin
     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);
    91112  end;
    92113end;
     
    119140  DataTypes.Clear;
    120141  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);
    130151  end;
    131152end;
     
    135156  if FDatabase = AValue then Exit;
    136157  if Assigned(FDatabase) then begin
     158    FDatabase.Save;
    137159    FDatabase.Clear;
    138160  end;
Note: See TracChangeset for help on using the changeset viewer.