Changeset 288 for trunk/Forms/UFormNation.pas
- Timestamp:
- Mar 24, 2019, 10:52:35 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Forms/UFormNation.pas
r284 r288 20 20 LabelName: TLabel; 21 21 LabelHealth: TLabel; 22 procedure ButtonOkClick(Sender: TObject); 22 23 private 23 24 public 24 FNation: TNation; 25 25 procedure Load(Nation: TNation); 26 26 procedure Save(Nation: TNation); 27 procedure SetNation(AValue: TNation); 28 public 29 property Nation: TNation read FNation write SetNation; 27 30 end; 28 31 … … 36 39 37 40 { TFormNation } 41 42 procedure TFormNation.ButtonOkClick(Sender: TObject); 43 begin 44 Save(FNation); 45 end; 38 46 39 47 procedure TFormNation.Load(Nation: TNation); … … 50 58 end; 51 59 60 procedure TFormNation.SetNation(AValue: TNation); 61 begin 62 if FNation = AValue then Exit; 63 FNation := AValue; 64 if Assigned(FNation) then Load(FNation); 65 end; 66 52 67 end. 53 68
Note:
See TracChangeset
for help on using the changeset viewer.