Changeset 11 for trunk/Forms


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.
Location:
trunk/Forms
Files:
6 added
9 edited

Legend:

Unmodified
Added
Removed
  • trunk/Forms/UFormDatabases.lfm

    r9 r11  
    4848    ButtonHeight = 32
    4949    ButtonWidth = 32
    50     Caption = 'ToolBar1'
    5150    Images = Core.ImageList1
     51    ParentShowHint = False
     52    ShowHint = True
    5253    TabOrder = 1
    5354    object ToolButton1: TToolButton
  • trunk/Forms/UFormDatabases.pas

    r9 r11  
    109109
    110110procedure TFormDatabases.FormShow(Sender: TObject);
     111var
     112  I: Integer;
    111113begin
     114  for I := 0 to ToolBar1.ButtonCount - 1 do
     115    ToolBar1.Buttons[I].Hint := ToolBar1.Buttons[I].Caption;
    112116  ReloadList;
    113117end;
  • trunk/Forms/UFormFields.lfm

    r8 r11  
    1818    ButtonHeight = 32
    1919    ButtonWidth = 32
    20     Caption = 'ToolBar1'
    2120    Images = Core.ImageList1
     21    ParentShowHint = False
     22    ShowHint = True
    2223    TabOrder = 0
    2324    object ToolButton1: TToolButton
  • trunk/Forms/UFormFields.pas

    r8 r11  
    5959{$R *.lfm}
    6060
     61resourcestring
     62  SNewField = 'New field';
     63  SFieldsNotSet = 'Fields not set';
     64  STableFields = 'Table fields - %s';
     65
    6166{ TFormFields }
    6267
    6368procedure TFormFields.FormShow(Sender: TObject);
     69var
     70  I: Integer;
    6471begin
     72  for I := 0 to ToolBar1.ButtonCount - 1 do
     73    ToolBar1.Buttons[I].Hint := ToolBar1.Buttons[I].Caption;
    6574  if not Assigned(Fields) then
    66     raise Exception.Create('Fields not set');
    67   Caption := 'Table fields - ' + TableName;
     75    raise Exception.Create(SFieldsNotSet);
     76  Caption := Format(STableFields, [TableName]);
    6877  UpdateInterface;
    6978  ReloadList;
     
    7685  NewField := TField.Create;
    7786  NewField.Table := Fields.Table;
    78   NewField.Name := 'New field';
     87  NewField.Name := SNewField;
     88  if Fields.Table.Database.Engine.DataTypes.Count > 0 then
     89    NewField.DataType := TDataType(Fields.Table.Database.Engine.DataTypes[0]);
    7990  FormField.Load(NewField);
    8091  if FormField.ShowModal = mrOk then begin
  • trunk/Forms/UFormMain.lfm

    r9 r11  
    2121  object MainMenu1: TMainMenu
    2222    Images = Core.ImageList1
    23     left = 870
    24     top = 200
     23    left = 824
     24    top = 216
    2525    object MenuItem1: TMenuItem
    2626      Caption = 'Database'
  • trunk/Forms/UFormRecords.lfm

    r9 r11  
    4444    ButtonHeight = 32
    4545    ButtonWidth = 32
    46     Caption = 'ToolBar1'
    4746    Images = Core.ImageList1
     47    ParentShowHint = False
     48    ShowHint = True
    4849    TabOrder = 1
    4950    object ToolButton1: TToolButton
  • trunk/Forms/UFormRecords.pas

    r4 r11  
    5252{$R *.lfm}
    5353
     54resourcestring
     55  STable = 'Table';
     56  SRemoveRecord = 'Remove record';
     57  SRemoveRecordConfirm = 'Do you want to remove record?';
     58
    5459{ TFormRecords }
    5560
    5661procedure TFormRecords.FormShow(Sender: TObject);
     62var
     63  I: Integer;
    5764begin
    58   Caption := 'Table - ' + Table.Caption;
     65  for I := 0 to ToolBar1.ButtonCount - 1 do
     66    ToolBar1.Buttons[I].Hint := ToolBar1.Buttons[I].Caption;
     67  Caption := STable + ' - ' + Table.Caption;
    5968  ReloadList;
    6069end;
     
    94103procedure TFormRecords.ARemoveExecute(Sender: TObject);
    95104begin
    96   if Assigned(ListView1.Selected) then begin
     105  if Assigned(ListView1.Selected) then
     106  if MessageDlg(SRemoveRecord, SRemoveRecordConfirm,
     107  mtConfirmation, [mbYes, mbNo], 0) = mrYes then begin
    97108    Table.Records.Remove(ListView1.Selected.Data);
    98109    ReloadList;
  • trunk/Forms/UFormTables.lfm

    r9 r11  
    4545    ButtonHeight = 32
    4646    ButtonWidth = 32
    47     Caption = 'ToolBar1'
    4847    Images = Core.ImageList1
     48    ParentShowHint = False
     49    ShowHint = True
    4950    TabOrder = 1
    5051    object ToolButton1: TToolButton
  • trunk/Forms/UFormTables.pas

    r9 r11  
    6464{$R *.lfm}
    6565
     66resourcestring
     67  SRemoveTable = 'Remove table';
     68  SRemoveTableConfirm = 'Do you want to really remove table ''%s'' ?';
     69  SNewTable = 'New table';
     70
     71
    6672{ TFormTables }
    6773
     
    104110begin
    105111  NewTable := TTable.Create;
    106   NewTable.Name := 'New table';
     112  NewTable.Name := SNewTable;
    107113  NewTable.Database := Database;
    108114  FormTable.Load(NewTable);
     
    128134begin
    129135  if Assigned(ListView1.Selected) then begin
    130     if MessageDlg('Remove table', 'Do you want to really remove table ' +
    131     TTable(ListView1.Selected.Data).Name, mtConfirmation, [mbYes, mbNo], 0) = mrYes then begin
     136    if MessageDlg(SRemoveTable, Format(SRemoveTableConfirm, [TTable(ListView1.Selected.Data).Name]),
     137    mtConfirmation, [mbYes, mbNo], 0) = mrYes then begin
    132138      Database.Tables.Remove(ListView1.Selected.Data);
    133139      ReloadList;
     
    200206
    201207procedure TFormTables.FormShow(Sender: TObject);
    202 begin
     208var
     209  I: Integer;
     210begin
     211  for I := 0 to ToolBar1.ButtonCount - 1 do
     212    ToolBar1.Buttons[I].Hint := ToolBar1.Buttons[I].Caption;
    203213  UpdateInterface;
    204214end;
Note: See TracChangeset for help on using the changeset viewer.