Changeset 365 for trunk/Packages


Ignore:
Timestamp:
Jan 2, 2025, 2:29:10 PM (3 weeks ago)
Author:
chronos
Message:
  • Modified: OK button moved to be on the left side of buttons.
  • Modified: Allow to run test from test form.
  • Fixed: Free tests during test list form close.
Location:
trunk/Packages/Common/Forms
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • trunk/Packages/Common/Forms/FormAbout.lfm

    r315 r365  
    11object FormAbout: TFormAbout
    22  Left = 624
    3   Height = 402
     3  Height = 397
    44  Top = 622
    5   Width = 702
     5  Width = 714
    66  Caption = 'About'
    7   ClientHeight = 402
    8   ClientWidth = 702
     7  ClientHeight = 397
     8  ClientWidth = 714
    99  DesignTimePPI = 144
    1010  OnShow = FormShow
    1111  Position = poScreenCenter
    12   LCLVersion = '2.2.6.0'
     12  LCLVersion = '3.6.0.0'
    1313  object LabelDescription: TLabel
    1414    Left = 30
    1515    Height = 26
    16     Top = 135
    17     Width = 642
     16    Top = 0
     17    Width = 654
    1818    Align = alTop
    1919    BorderSpacing.Left = 30
     
    2828    Left = 30
    2929    Height = 26
    30     Top = 191
    31     Width = 642
     30    Top = 221
     31    Width = 654
    3232    Align = alTop
    3333    BorderSpacing.Around = 30
     
    3939    Left = 0
    4040    Height = 135
    41     Top = 0
    42     Width = 702
     41    Top = 56
     42    Width = 714
    4343    Align = alTop
    4444    BevelOuter = bvNone
    4545    ClientHeight = 135
    46     ClientWidth = 702
     46    ClientWidth = 714
    4747    FullRepaint = False
    4848    ParentFont = False
     
    5252      Height = 84
    5353      Top = 20
    54       Width = 564
     54      Width = 576
    5555      Anchors = [akTop, akLeft, akRight]
    5656      AutoSize = False
     
    7474    Left = 0
    7575    Height = 75
    76     Top = 327
    77     Width = 702
     76    Top = 322
     77    Width = 714
    7878    Align = alBottom
    7979    BevelOuter = bvNone
    8080    ClientHeight = 75
    81     ClientWidth = 702
     81    ClientWidth = 714
    8282    TabOrder = 1
    8383    object ButtonHomePage: TButton
     
    8888      Anchors = [akLeft, akBottom]
    8989      Caption = 'Home page'
    90       OnClick = ButtonHomePageClick
    9190      ParentFont = False
    9291      TabOrder = 0
     92      OnClick = ButtonHomePageClick
    9393    end
    9494    object ButtonClose: TButton
    95       Left = 531
     95      Left = 543
    9696      Height = 38
    9797      Top = 24
  • trunk/Packages/Common/Forms/FormItem.lfm

    r355 r365  
    1010  OnCreate = FormCreate
    1111  OnDestroy = FormDestroy
    12   LCLVersion = '3.4.0.0'
     12  LCLVersion = '3.6.0.0'
    1313  object ButtonOk: TButton
    14     Left = 344
     14    Left = 224
    1515    Height = 38
    1616    Top = 353
     
    2424  end
    2525  object ButtonCancel: TButton
    26     Left = 208
     26    Left = 348
    2727    Height = 38
    2828    Top = 353
  • trunk/Packages/Common/Forms/FormKeyShortcuts.lfm

    r362 r365  
    11object FormKeyShortcuts: TFormKeyShortcuts
    22  Left = 839
    3   Height = 274
     3  Height = 329
    44  Top = 609
    5   Width = 587
     5  Width = 704
    66  Caption = 'Key shortcuts'
    7   ClientHeight = 274
    8   ClientWidth = 587
    9   DesignTimePPI = 120
     7  ClientHeight = 329
     8  ClientWidth = 704
     9  DesignTimePPI = 144
    1010  OnCreate = FormCreate
    1111  OnDestroy = FormDestroy
     
    1313  LCLVersion = '3.6.0.0'
    1414  object ListView1: TListView
    15     Left = 8
    16     Height = 212
    17     Top = 8
    18     Width = 571
     15    Left = 10
     16    Height = 262
     17    Top = 10
     18    Width = 684
    1919    Align = alTop
    2020    Anchors = [akTop, akLeft, akRight, akBottom]
    21     BorderSpacing.Around = 8
     21    BorderSpacing.Around = 10
    2222    Columns = <   
    2323      item
    2424        Caption = 'Action'
    25         Width = 200
     25        Width = 240
    2626      end   
    2727      item
    2828        Caption = 'Window'
    29         Width = 200
     29        Width = 240
    3030      end   
    3131      item
    3232        Caption = 'Shortcut'
    33         Width = 166
     33        Width = 199
    3434      end>
    3535    OwnerData = True
     
    4444  end
    4545  object ButtonClose: TButton
    46     Left = 485
    47     Height = 31
    48     Top = 232
    49     Width = 94
     46    Left = 581
     47    Height = 37
     48    Top = 284
     49    Width = 113
    5050    Anchors = [akRight, akBottom]
    5151    Caption = 'Close'
     
    5555  end
    5656  object PopupMenu1: TPopupMenu
    57     Left = 340
    58     Top = 120
     57    Left = 408
     58    Top = 144
    5959    object MenuItem1: TMenuItem
    6060      Caption = 'Execute'
     
    6767    Column = 0
    6868    Order = soNone
    69     Left = 184
    70     Top = 120
     69    Left = 221
     70    Top = 144
    7171  end
    7272end
  • trunk/Packages/Common/Forms/FormTest.lfm

    r315 r365  
    88  ClientWidth = 865
    99  DesignTimePPI = 144
    10   LCLVersion = '2.2.6.0'
     10  OnShow = FormShow
     11  LCLVersion = '3.6.0.0'
    1112  object MemoLog: TMemo
    1213    Left = 8
    13     Height = 505
     14    Height = 464
    1415    Top = 8
    1516    Width = 849
    16     Align = alClient
     17    Align = alTop
     18    Anchors = [akTop, akLeft, akRight, akBottom]
    1719    BorderSpacing.Around = 8
    1820    ReadOnly = True
     
    2022    TabOrder = 0
    2123  end
     24  object ButtonRun: TButton
     25    Left = 616
     26    Height = 37
     27    Top = 480
     28    Width = 112
     29    Anchors = [akRight, akBottom]
     30    Caption = 'Run'
     31    TabOrder = 1
     32    OnClick = ButtonRunClick
     33  end
     34  object ButtonClose: TButton
     35    Left = 745
     36    Height = 37
     37    Top = 480
     38    Width = 112
     39    Anchors = [akRight, akBottom]
     40    Caption = 'Close'
     41    ModalResult = 11
     42    TabOrder = 2
     43    OnClick = ButtonRunClick
     44  end
    2245end
  • trunk/Packages/Common/Forms/FormTest.lrj

    r315 r365  
    11{"version":1,"strings":[
    2 {"hash":371876,"name":"tformtest.caption","sourcebytes":[84,101,115,116],"value":"Test"}
     2{"hash":371876,"name":"tformtest.caption","sourcebytes":[84,101,115,116],"value":"Test"},
     3{"hash":22974,"name":"tformtest.buttonrun.caption","sourcebytes":[82,117,110],"value":"Run"},
     4{"hash":4863637,"name":"tformtest.buttonclose.caption","sourcebytes":[67,108,111,115,101],"value":"Close"}
    35]}
  • trunk/Packages/Common/Forms/FormTest.pas

    r315 r365  
    44
    55uses
    6   Classes, SysUtils, Forms, Controls, Graphics, Dialogs, StdCtrls, FormEx;
     6  Classes, SysUtils, Forms, Controls, Graphics, Dialogs, StdCtrls, FormEx,
     7  TestCase;
    78
    89type
     
    1112
    1213  TFormTest = class(TFormEx)
     14    ButtonRun: TButton;
     15    ButtonClose: TButton;
    1316    MemoLog: TMemo;
     17    procedure FormShow(Sender: TObject);
     18    procedure ButtonRunClick(Sender: TObject);
     19  private
     20    FTestCase: TTestCase;
     21    procedure SetTestCase(AValue: TTestCase);
     22  public
     23    property TestCase: TTestCase read FTestCase write SetTestCase;
    1424  end;
    1525
     
    1929{$R *.lfm}
    2030
     31{ TFormTest }
     32
     33procedure TFormTest.FormShow(Sender: TObject);
     34begin
     35  if Assigned(FTestCase) then MemoLog.Text := FTestCase.Log;
     36end;
     37
     38procedure TFormTest.SetTestCase(AValue: TTestCase);
     39begin
     40  if FTestCase = AValue then Exit;
     41  FTestCase := AValue;
     42end;
     43
     44procedure TFormTest.ButtonRunClick(Sender: TObject);
     45begin
     46  if Assigned(FTestCase) then begin
     47    FTestCase.Run;
     48    MemoLog.Text := FTestCase.Log;
     49  end;
     50end;
     51
    2152end.
    2253
  • trunk/Packages/Common/Forms/FormTests.lfm

    r315 r365  
    99  DesignTimePPI = 144
    1010  OnShow = FormShow
    11   LCLVersion = '2.2.6.0'
     11  LCLVersion = '3.6.0.0'
    1212  object ListViewTestCases: TListView
    1313    Left = 19
     
    3636  end
    3737  object ButtonRun: TButton
    38     Left = 945
     38    Left = 816
    3939    Height = 37
    4040    Top = 585
     
    4242    Anchors = [akRight, akBottom]
    4343    Caption = 'Run'
     44    TabOrder = 1
    4445    OnClick = ButtonRunClick
    45     TabOrder = 1
    4646  end
    4747  object LabelResult: TLabel
     
    5353    Caption = '   '
    5454    ParentColor = False
     55  end
     56  object ButtonClose: TButton
     57    Left = 945
     58    Height = 37
     59    Top = 585
     60    Width = 112
     61    Anchors = [akRight, akBottom]
     62    Caption = 'Close'
     63    ModalResult = 11
     64    TabOrder = 2
     65    OnClick = ButtonRunClick
    5566  end
    5667  object ActionList1: TActionList
  • trunk/Packages/Common/Forms/FormTests.lrj

    r315 r365  
    55{"hash":22974,"name":"tformtests.buttonrun.caption","sourcebytes":[82,117,110],"value":"Run"},
    66{"hash":8736,"name":"tformtests.labelresult.caption","sourcebytes":[32,32,32],"value":"   "},
     7{"hash":4863637,"name":"tformtests.buttonclose.caption","sourcebytes":[67,108,111,115,101],"value":"Close"},
    78{"hash":368487,"name":"tformtests.ashow.caption","sourcebytes":[83,104,111,119],"value":"Show"},
    89{"hash":22974,"name":"tformtests.arun.caption","sourcebytes":[82,117,110],"value":"Run"}
  • trunk/Packages/Common/Forms/FormTests.pas

    r315 r365  
    1616    ActionList1: TActionList;
    1717    ButtonRun: TButton;
     18    ButtonClose: TButton;
    1819    LabelResult: TLabel;
    1920    ListViewTestCases: TListView;
     
    119120  with TFormTest.Create(nil) do
    120121  try
    121     MemoLog.Text := TTestCase(ListViewTestCases.Selected.Data).Log;
     122    TestCase := TTestCase(ListViewTestCases.Selected.Data);
    122123    ShowModal;
     124    ReloadList;
    123125  finally
    124126    Free;
Note: See TracChangeset for help on using the changeset viewer.