Ignore:
Timestamp:
Mar 24, 2019, 2:26:29 PM (6 years ago)
Author:
chronos
Message:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Forms/UFormUnitKind.pas

    r277 r287  
    2020    LabelHealth: TLabel;
    2121    SpinEditHealth: TSpinEdit;
     22    procedure ButtonOkClick(Sender: TObject);
    2223  private
    23 
    24   public
     24    FUnitKind: TUnitKind;
    2525    procedure Load(UnitKind: TUnitKind);
    2626    procedure Save(UnitKind: TUnitKind);
     27    procedure SetUnitKind(AValue: TUnitKind);
     28  public
     29    property UnitKind: TUnitKind read FUnitKind write SetUnitKind;
    2730  end;
    2831
     
    4851end;
    4952
     53procedure TFormUnitKind.ButtonOkClick(Sender: TObject);
     54begin
     55  Save(FUnitKind);
     56end;
     57
     58procedure TFormUnitKind.SetUnitKind(AValue: TUnitKind);
     59begin
     60  if FUnitKind = AValue then Exit;
     61  FUnitKind := AValue;
     62  if Assigned(AValue) then Load(FUnitKind);
     63end;
     64
    5065end.
    5166
Note: See TracChangeset for help on using the changeset viewer.