Changeset 515
- Timestamp:
- Jun 5, 2018, 11:02:54 AM (6 years ago)
- Location:
- Common
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
Common/UCommon.pas
r510 r515 73 73 function LoadFileToStr(const FileName: TFileName): AnsiString; 74 74 procedure SearchFiles(AList: TStrings; Dir: string; 75 FilterMethod: TFilterMethodMethod );75 FilterMethod: TFilterMethodMethod = nil); 76 76 function GetStringPart(var Text: string; Separator: string): string; 77 77 … … 524 524 525 525 procedure SearchFiles(AList: TStrings; Dir: string; 526 FilterMethod: TFilterMethodMethod );526 FilterMethod: TFilterMethodMethod = nil); 527 527 var 528 528 SR: TSearchRec; … … 532 532 try 533 533 repeat 534 if (SR.Name = '.') or (SR.Name = '..') or not FilterMethod(SR.Name) or535 not FilterMethod(Copy(Dir, 3, Length(Dir)) + SR.Name) then Continue;534 if (SR.Name = '.') or (SR.Name = '..') or (Assigned(FilterMethod) and (not FilterMethod(SR.Name) or 535 not FilterMethod(Copy(Dir, 3, Length(Dir)) + SR.Name))) then Continue; 536 536 AList.Add(Dir + SR.Name); 537 537 if (SR.Attr and faDirectory) <> 0 then -
Common/UPersistentForm.pas
r510 r515 8 8 9 9 uses 10 Classes, SysUtils, Forms, URegistry, LCLIntf, Registry, Controls, ComCtrls; 10 Classes, SysUtils, Forms, URegistry, LCLIntf, Registry, Controls, ComCtrls, 11 ExtCtrls; 11 12 12 13 type … … 71 72 end; 72 73 74 if (Control is TPanel) then begin 75 with Form, TRegistryEx.Create do 76 try 77 RootKey := RegistryContext.RootKey; 78 OpenKey(RegistryContext.Key + '\Forms\' + Form.Name + '\' + Control.Name, True); 79 if (TPanel(Control).Align = alRight) or (TPanel(Control).Align = alLeft) then begin 80 if ValueExists('Width') then 81 TPanel(Control).Width := ReadInteger('Width'); 82 end; 83 if (TPanel(Control).Align = alTop) or (TPanel(Control).Align = alBottom) then begin 84 if ValueExists('Height') then 85 TPanel(Control).Height := ReadInteger('Height'); 86 end; 87 finally 88 Free; 89 end; 90 end; 91 73 92 if Control is TWinControl then begin 74 93 WinControl := TWinControl(Control); … … 95 114 for I := 0 to TListView(Control).Columns.Count - 1 do begin 96 115 WriteInteger('ColWidth' + IntToStr(I), TListView(Control).Columns[I].Width); 116 end; 117 finally 118 Free; 119 end; 120 end; 121 122 if (Control is TPanel) then begin 123 with Form, TRegistryEx.Create do 124 try 125 RootKey := RegistryContext.RootKey; 126 OpenKey(RegistryContext.Key + '\Forms\' + Form.Name + '\' + Control.Name, True); 127 if (TPanel(Control).Align = alRight) or (TPanel(Control).Align = alLeft) then begin 128 WriteInteger('Width', TPanel(Control).Width); 129 end; 130 if (TPanel(Control).Align = alTop) or (TPanel(Control).Align = alBottom) then begin 131 WriteInteger('Height', TPanel(Control).Height); 97 132 end; 98 133 finally -
Common/UTheme.pas
r509 r515 158 158 ApplyTheme(TPageControl(Component).Pages[I]); 159 159 end; 160 161 if Control is TCoolBar then begin 162 (Control as TCoolBar).Themed := False; 163 end; 160 164 end; 161 165 end;
Note:
See TracChangeset
for help on using the changeset viewer.