Changeset 105 for trunk/Tile.pas
- Timestamp:
- Dec 9, 2024, 4:40:34 PM (5 weeks ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Tile.pas
r104 r105 4 4 5 5 uses 6 Classes, SysUtils, Generics.Collections ;6 Classes, SysUtils, Generics.Collections, RegistryEx; 7 7 8 8 type … … 18 18 Action: TTileAction; 19 19 Shift: TPoint; 20 Disabled: Boolean; 21 procedure Clear; 20 22 procedure Assign(Source: TTile); 23 procedure SaveToRegistry(Reg: TRegistryEx; RegContext: TRegistryContext); 24 procedure LoadFromRegistry(Reg: TRegistryEx; RegContext: TRegistryContext); 21 25 end; 22 26 … … 29 33 { TTile } 30 34 35 procedure TTile.Clear; 36 begin 37 Value := 0; 38 Action := taNone;; 39 Disabled := False; 40 end; 41 31 42 procedure TTile.Assign(Source: TTile); 32 43 begin 44 Index := Source.Index; 33 45 Value := Source.Value; 34 46 Merged := Source.Merged; 47 Disabled := Source.Disabled; 35 48 end; 36 49 50 procedure TTile.SaveToRegistry(Reg: TRegistryEx; RegContext: TRegistryContext); 51 begin 52 with Reg do begin 53 CurrentContext := RegContext; 54 55 WriteInteger('Value', Value); 56 WriteBool('Disabled', Disabled); 57 end; 58 end; 59 60 procedure TTile.LoadFromRegistry(Reg: TRegistryEx; RegContext: TRegistryContext 61 ); 62 begin 63 with Reg do begin 64 CurrentContext := RegContext; 65 66 Value := ReadIntegerWithDefault('Value', Value); 67 Disabled := ReadBoolWithDefault('Disabled', Disabled); 68 end; 69 end; 37 70 38 71 end.
Note:
See TracChangeset
for help on using the changeset viewer.