Changeset 20 for trunk/Packages
- Timestamp:
- Mar 23, 2018, 1:59:25 PM (7 years ago)
- Location:
- trunk/Packages/Common
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Packages/Common/UApplicationInfo.pas
r15 r20 6 6 7 7 uses 8 SysUtils, Registry, Classes, Forms, URegistry;8 SysUtils, Classes, Forms, URegistry, LCLType; 9 9 10 10 type … … 14 14 TApplicationInfo = class(TComponent) 15 15 private 16 FDescription: string;16 FDescription: TTranslateString; 17 17 FIdentification: Byte; 18 18 FLicense: string; -
trunk/Packages/Common/UPersistentForm.pas
r15 r20 56 56 I: Integer; 57 57 WinControl: TWinControl; 58 Count: Integer;59 58 begin 60 59 if Control is TListView then begin … … 217 216 218 217 procedure TPersistentForm.Load(Form: TForm; DefaultMaximized: Boolean = False); 219 var220 LoadDefaults: Boolean;221 218 begin 222 219 Self.Form := Form; … … 230 227 231 228 if not EqualRect(FormNormalSize, FormRestoredSize) or 232 (LoadDefaults and DefaultMaximized)then begin229 DefaultMaximized then begin 233 230 // Restore to maximized state 234 231 Form.WindowState := wsNormal; -
trunk/Packages/Common/URegistry.pas
r15 r20 37 37 function DeleteKeyRecursive(const Key: string): Boolean; 38 38 function OpenKey(const Key: string; CanCreate: Boolean): Boolean; 39 function GetValue(const Name: string; const DefaultValue: Integer): Integer; overload; 40 function GetValue(const Name: string; const DefaultValue: string): string; overload; 41 function GetValue(const Name: string; const DefaultValue: Boolean): Boolean; overload; 42 function GetValue(const Name: string; const DefaultValue: Double): Double; overload; 43 procedure SetValue(const Name: string; const Value: Integer); overload; 44 procedure SetValue(const Name: string; const Value: string); overload; 45 procedure SetValue(const Name: string; const Value: Boolean); overload; 46 procedure SetValue(const Name: string; const Value: Double); overload; 39 47 property CurrentContext: TRegistryContext read GetCurrentContext write SetCurrentContext; 40 48 end; … … 97 105 Result := DefaultValue; 98 106 end; 107 end; 108 109 function TRegistryEx.GetValue(const Name: string; const DefaultValue: Integer 110 ): Integer; 111 begin 112 Result := ReadIntegerWithDefault(Name, DefaultValue); 113 end; 114 115 function TRegistryEx.GetValue(const Name: string; const DefaultValue: string 116 ): string; 117 begin 118 Result := ReadStringWithDefault(Name, DefaultValue); 119 end; 120 121 function TRegistryEx.GetValue(const Name: string; const DefaultValue: Boolean 122 ): Boolean; 123 begin 124 Result := ReadBoolWithDefault(Name, DefaultValue); 125 end; 126 127 function TRegistryEx.GetValue(const Name: string; const DefaultValue: Double 128 ): Double; 129 begin 130 Result := ReadFloatWithDefault(Name, DefaultValue); 131 end; 132 133 procedure TRegistryEx.SetValue(const Name: string; const Value: Integer); 134 begin 135 WriteInteger(Name, Value); 136 end; 137 138 procedure TRegistryEx.SetValue(const Name: string; const Value: string); 139 begin 140 WriteString(Name, Value); 141 end; 142 143 procedure TRegistryEx.SetValue(const Name: string; const Value: Boolean); 144 begin 145 WriteBool(Name, Value); 146 end; 147 148 procedure TRegistryEx.SetValue(const Name: string; const Value: Double); 149 begin 150 WriteFloat(Name, Value); 99 151 end; 100 152
Note:
See TracChangeset
for help on using the changeset viewer.