Changeset 288 for trunk/Forms/UFormPlayer.pas
- Timestamp:
- Mar 24, 2019, 10:52:35 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Forms/UFormPlayer.pas
r282 r288 29 29 Label6: TLabel; 30 30 SpinEditStartUnits: TSpinEdit; 31 procedure ButtonOkClick(Sender: TObject); 31 32 procedure ComboBoxModeChange(Sender: TObject); 32 33 procedure FormClose(Sender: TObject; var CloseAction: TCloseAction); … … 34 35 procedure FormShow(Sender: TObject); 35 36 private 36 { private declarations } 37 FPlayer: TPlayer; 38 procedure LoadData(Player: TPlayer); 39 procedure SaveData(Player: TPlayer); 40 procedure SetPlayer(AValue: TPlayer); 37 41 public 38 42 procedure Translate; 39 43 procedure UpdateInterface; 40 procedure LoadData(Player: TPlayer); 41 procedure SaveData(Player: TPlayer); 44 property Player: TPlayer read FPlayer write SetPlayer; 42 45 end; 43 46 … … 64 67 begin 65 68 UpdateInterface; 69 end; 70 71 procedure TFormPlayer.ButtonOkClick(Sender: TObject); 72 begin 73 SaveData(FPlayer); 66 74 end; 67 75 … … 149 157 end; 150 158 159 procedure TFormPlayer.SetPlayer(AValue: TPlayer); 160 begin 161 if FPlayer = AValue then Exit; 162 FPlayer := AValue; 163 if Assigned(FPlayer) then LoadData(FPlayer); 164 end; 165 151 166 end. 152 167
Note:
See TracChangeset
for help on using the changeset viewer.