Added: initial AllowEmptyResults implementation
This commit is contained in:
parent
96deb77011
commit
79b18c0bf6
Binary file not shown.
@ -1,10 +1,10 @@
|
|||||||
object frmUnSwDialog: TfrmUnSwDialog
|
object frmUnSwDialog: TfrmUnSwDialog
|
||||||
Left = 187
|
Left = 187
|
||||||
Top = 83
|
Top = 83
|
||||||
|
Width = 320
|
||||||
|
Height = 425
|
||||||
BorderIcons = [biSystemMenu]
|
BorderIcons = [biSystemMenu]
|
||||||
Caption = 'UnitSwitcher'
|
Caption = 'UnitSwitcher'
|
||||||
ClientHeight = 398
|
|
||||||
ClientWidth = 312
|
|
||||||
Color = clBtnFace
|
Color = clBtnFace
|
||||||
Constraints.MinHeight = 240
|
Constraints.MinHeight = 240
|
||||||
Constraints.MinWidth = 290
|
Constraints.MinWidth = 290
|
||||||
@ -204,10 +204,10 @@ object frmUnSwDialog: TfrmUnSwDialog
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
object ilsTypes: TImageList
|
object ilsTypes: TImageList
|
||||||
Left = 16
|
Left = 28
|
||||||
Top = 264
|
Top = 228
|
||||||
Bitmap = {
|
Bitmap = {
|
||||||
494C010106000900040010001000FFFFFFFFFF00FFFFFFFFFFFFFFFF424D3600
|
494C010106000900040010001000FFFFFFFFFF10FFFFFFFFFFFFFFFF424D3600
|
||||||
0000000000003600000028000000400000003000000001002000000000000030
|
0000000000003600000028000000400000003000000001002000000000000030
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
@ -607,11 +607,12 @@ object frmUnSwDialog: TfrmUnSwDialog
|
|||||||
E000E0000000AC0FE000E0000000BF3FE000E0000000FFFFE000600000001000
|
E000E0000000AC0FE000E0000000BF3FE000E0000000FFFFE000600000001000
|
||||||
E000200000001000E00000000000B000E00020000000F000E00060000000F000
|
E000200000001000E00000000000B000E00020000000F000E00060000000F000
|
||||||
E000E0000000F000E000E0000000F000E000E0000000F000E001E0010000F000
|
E000E0000000F000E000E0000000F000E000E0000000F000E001E0010000F000
|
||||||
E003E003FFFFF000E007E007FFFFF000}
|
E003E003FFFFF000E007E007FFFFF00000000000000000000000000000000000
|
||||||
|
000000000000}
|
||||||
end
|
end
|
||||||
object alMain: TActionList
|
object alMain: TActionList
|
||||||
Left = 44
|
Left = 84
|
||||||
Top = 264
|
Top = 228
|
||||||
object actSelectAll: TAction
|
object actSelectAll: TAction
|
||||||
Caption = 'Select &All'
|
Caption = 'Select &All'
|
||||||
ShortCut = 16449
|
ShortCut = 16449
|
||||||
@ -666,8 +667,8 @@ object frmUnSwDialog: TfrmUnSwDialog
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
object pmnUnits: TPopupMenu
|
object pmnUnits: TPopupMenu
|
||||||
Left = 72
|
Left = 140
|
||||||
Top = 264
|
Top = 228
|
||||||
object pmnUnitsSelectAll: TMenuItem
|
object pmnUnitsSelectAll: TMenuItem
|
||||||
Action = actSelectAll
|
Action = actSelectAll
|
||||||
end
|
end
|
||||||
|
@ -120,6 +120,7 @@ type
|
|||||||
FTypeFilter: TUnSwUnitTypeFilter;
|
FTypeFilter: TUnSwUnitTypeFilter;
|
||||||
FSubFilter: TUnSwUnitSimpleFilter;
|
FSubFilter: TUnSwUnitSimpleFilter;
|
||||||
FInputFilter: TUnSwUnitSimpleFilter;
|
FInputFilter: TUnSwUnitSimpleFilter;
|
||||||
|
FLastFilter: String;
|
||||||
|
|
||||||
FStyleVisitor: TUnSwStyleVisitor;
|
FStyleVisitor: TUnSwStyleVisitor;
|
||||||
|
|
||||||
@ -168,22 +169,26 @@ type
|
|||||||
destructor Destroy(); override;
|
destructor Destroy(); override;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
TUnSwOpenFolderVisitor = class(TUnSwOpenVisitor)
|
TUnSwOpenFolderVisitor = class(TUnSwOpenVisitor)
|
||||||
protected
|
protected
|
||||||
procedure OpenFile(const AFileName: String); override;
|
procedure OpenFile(const AFileName: String); override;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
TUnSwOpenPropertiesVisitor = class(TUnSwOpenVisitor)
|
TUnSwOpenPropertiesVisitor = class(TUnSwOpenVisitor)
|
||||||
protected
|
protected
|
||||||
procedure OpenFile(const AFileName: String); override;
|
procedure OpenFile(const AFileName: String); override;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
TUnSwOpenDFMPropertiesVisitor = class(TUnSwOpenPropertiesVisitor)
|
TUnSwOpenDFMPropertiesVisitor = class(TUnSwOpenPropertiesVisitor)
|
||||||
protected
|
protected
|
||||||
procedure VisitModule(const AUnit: TUnSwModuleUnit); override;
|
procedure VisitModule(const AUnit: TUnSwModuleUnit); override;
|
||||||
procedure VisitProject(const AUnit: TUnSwProjectUnit); override;
|
procedure VisitProject(const AUnit: TUnSwProjectUnit); override;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
TUnSwReadOnlyVisitor = class(TUnSwOpenVisitor)
|
TUnSwReadOnlyVisitor = class(TUnSwOpenVisitor)
|
||||||
private
|
private
|
||||||
FReadOnlyCount: Integer;
|
FReadOnlyCount: Integer;
|
||||||
@ -193,6 +198,7 @@ type
|
|||||||
property ReadOnlyCount: Integer read FReadOnlyCount;
|
property ReadOnlyCount: Integer read FReadOnlyCount;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
TUnSwSetReadOnlyVisitor = class(TUnSwOpenVisitor)
|
TUnSwSetReadOnlyVisitor = class(TUnSwOpenVisitor)
|
||||||
private
|
private
|
||||||
FReadOnlyFlag: Boolean;
|
FReadOnlyFlag: Boolean;
|
||||||
@ -225,6 +231,7 @@ begin
|
|||||||
FProcessed.CaseSensitive := False;
|
FProcessed.CaseSensitive := False;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
destructor TUnSwOpenVisitor.Destroy();
|
destructor TUnSwOpenVisitor.Destroy();
|
||||||
begin
|
begin
|
||||||
FreeAndNil(FProcessed);
|
FreeAndNil(FProcessed);
|
||||||
@ -232,6 +239,7 @@ begin
|
|||||||
inherited;
|
inherited;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
function TUnSwOpenVisitor.IsProcessed(const AFileName: String;
|
function TUnSwOpenVisitor.IsProcessed(const AFileName: String;
|
||||||
const ARegister: Boolean): Boolean;
|
const ARegister: Boolean): Boolean;
|
||||||
begin
|
begin
|
||||||
@ -244,11 +252,13 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
procedure TUnSwOpenVisitor.VisitModule(const AUnit: TUnSwModuleUnit);
|
procedure TUnSwOpenVisitor.VisitModule(const AUnit: TUnSwModuleUnit);
|
||||||
begin
|
begin
|
||||||
OpenFile(AUnit.FileName);
|
OpenFile(AUnit.FileName);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
procedure TUnSwOpenVisitor.VisitProject(const AUnit: TUnSwProjectUnit);
|
procedure TUnSwOpenVisitor.VisitProject(const AUnit: TUnSwProjectUnit);
|
||||||
begin
|
begin
|
||||||
OpenFile(AUnit.FileName);
|
OpenFile(AUnit.FileName);
|
||||||
@ -305,6 +315,7 @@ begin
|
|||||||
OpenFile(ChangeFileExt(AUnit.FileName, '.dfm'));
|
OpenFile(ChangeFileExt(AUnit.FileName, '.dfm'));
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
procedure TUnSwOpenDFMPropertiesVisitor.VisitProject(const AUnit: TUnSwProjectUnit);
|
procedure TUnSwOpenDFMPropertiesVisitor.VisitProject(const AUnit: TUnSwProjectUnit);
|
||||||
begin
|
begin
|
||||||
end;
|
end;
|
||||||
@ -360,6 +371,7 @@ begin
|
|||||||
FOverlayIndex := -1;
|
FOverlayIndex := -1;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
procedure TUnSwStyleVisitor.VisitModule(const AUnit: TUnSwModuleUnit);
|
procedure TUnSwStyleVisitor.VisitModule(const AUnit: TUnSwModuleUnit);
|
||||||
begin
|
begin
|
||||||
VisitUnit(AUnit);
|
VisitUnit(AUnit);
|
||||||
@ -385,6 +397,7 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
procedure TUnSwStyleVisitor.VisitProject(const AUnit: TUnSwProjectUnit);
|
procedure TUnSwStyleVisitor.VisitProject(const AUnit: TUnSwProjectUnit);
|
||||||
begin
|
begin
|
||||||
VisitUnit(AUnit);
|
VisitUnit(AUnit);
|
||||||
@ -409,21 +422,24 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
procedure TfrmUnSwDialog.FormResize(Sender: TObject);
|
procedure TfrmUnSwDialog.FormResize(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
lstUnits.Invalidate();
|
lstUnits.Invalidate();
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
procedure TfrmUnSwDialog.FormShow(Sender: TObject);
|
procedure TfrmUnSwDialog.FormShow(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
// Setting ListBox.Selected[x] won't work before OnShow...
|
// Setting ListBox.Selected[x] won't work before OnShow...
|
||||||
UpdateTypeFilter();
|
UpdateTypeFilter();
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
function TfrmUnSwDialog.InternalExecute(): TUnSwUnitList;
|
function TfrmUnSwDialog.InternalExecute(): TUnSwUnitList;
|
||||||
type
|
type
|
||||||
TUnSwUnitSimpleFilterClass = class of TUnSwUnitSimpleFilter;
|
TUnSwUnitSimpleFilterClass = class of TUnSwUnitSimpleFilter;
|
||||||
|
|
||||||
var
|
var
|
||||||
iIndex: Integer;
|
iIndex: Integer;
|
||||||
pClass: TUnSwUnitSimpleFilterClass;
|
pClass: TUnSwUnitSimpleFilterClass;
|
||||||
@ -434,15 +450,15 @@ begin
|
|||||||
FTypeFilteredList := TUnSwUnitList.Create();
|
FTypeFilteredList := TUnSwUnitList.Create();
|
||||||
FSubFilteredList := TUnSwUnitList.Create();
|
FSubFilteredList := TUnSwUnitList.Create();
|
||||||
FInputFilteredList := TUnSwUnitList.Create();
|
FInputFilteredList := TUnSwUnitList.Create();
|
||||||
FTypeFilter := TUnSwUnitTypeFilter.Create(FTypeFilteredList);
|
FTypeFilter := TUnSwUnitTypeFilter.Create;
|
||||||
|
|
||||||
if FFormsOnly then
|
if FFormsOnly then
|
||||||
pClass := TUnSwUnitSimpleFormNameFilter
|
pClass := TUnSwUnitSimpleFormNameFilter
|
||||||
else
|
else
|
||||||
pClass := TUnSwUnitSimpleNameFilter;
|
pClass := TUnSwUnitSimpleNameFilter;
|
||||||
|
|
||||||
FSubFilter := pClass.Create(FSubFilteredList);
|
FSubFilter := pClass.Create;
|
||||||
FInputFilter := pClass.Create(FInputFilteredList);
|
FInputFilter := pClass.Create;
|
||||||
|
|
||||||
try
|
try
|
||||||
LoadSettings();
|
LoadSettings();
|
||||||
@ -489,6 +505,7 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
procedure TfrmUnSwDialog.UpdateUnitActions();
|
procedure TfrmUnSwDialog.UpdateUnitActions();
|
||||||
var
|
var
|
||||||
bDFM: Boolean;
|
bDFM: Boolean;
|
||||||
@ -549,18 +566,43 @@ begin
|
|||||||
actOpenDFMProperties.Enabled := bDFM;
|
actOpenDFMProperties.Enabled := bDFM;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
procedure TfrmUnSwDialog.UpdateList();
|
procedure TfrmUnSwDialog.UpdateList();
|
||||||
var
|
var
|
||||||
activeUnit: TUnSwUnit;
|
activeUnit: TUnSwUnit;
|
||||||
activeUnits: TUnSwUnitList;
|
activeUnits: TUnSwUnitList;
|
||||||
itemIndex: Integer;
|
itemIndex: Integer;
|
||||||
listIndex: Integer;
|
listIndex: Integer;
|
||||||
|
filteredList: TUnSwUnitList;
|
||||||
|
selStart: Integer;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
activeUnits := GetActiveUnits();
|
activeUnits := GetActiveUnits();
|
||||||
|
|
||||||
|
filteredList := TUnSwUnitList.Create();
|
||||||
|
try
|
||||||
|
filteredList.Clone(FSubFilteredList);
|
||||||
|
FInputFilter.FilterList(filteredList);
|
||||||
|
|
||||||
|
if (filteredList.Count = 0) and (not Settings.Filter.AllowEmptyResult) then
|
||||||
|
begin
|
||||||
|
{ Only enforce AllowEmptyResult when adding to the filter }
|
||||||
|
if Length(FInputFilter.Filter) > Length(FLastFilter) then
|
||||||
|
begin
|
||||||
|
FInputFilter.Filter := FLastFilter;
|
||||||
|
selStart := cmbSearch.SelStart;
|
||||||
|
cmbSearch.Text := FLastFilter;
|
||||||
|
cmbSearch.SelStart := selStart;
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
FLastFilter := FInputFilter.Filter;
|
||||||
|
FInputFilteredList.Clone(filteredList);
|
||||||
|
finally
|
||||||
|
FreeAndNil(filteredList);
|
||||||
|
end;
|
||||||
|
|
||||||
FInputFilteredList.Clone(FSubFilteredList);
|
|
||||||
FInputFilteredList.AcceptVisitor(FInputFilter);
|
|
||||||
|
|
||||||
lstUnits.Count := FInputFilteredList.Count;
|
lstUnits.Count := FInputFilteredList.Count;
|
||||||
if FInputFilteredList.Count > 0 then
|
if FInputFilteredList.Count > 0 then
|
||||||
@ -588,11 +630,13 @@ begin
|
|||||||
lstUnits.OnClick(nil);
|
lstUnits.OnClick(nil);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
function SortByName(Item1, Item2: Pointer): Integer;
|
function SortByName(Item1, Item2: Pointer): Integer;
|
||||||
begin
|
begin
|
||||||
Result := CompareText(TUnSwUnit(Item1).Name, TUnSwUnit(Item2).Name)
|
Result := CompareText(TUnSwUnit(Item1).Name, TUnSwUnit(Item2).Name)
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
function SortByType(Item1, Item2: Pointer): Integer;
|
function SortByType(Item1, Item2: Pointer): Integer;
|
||||||
const
|
const
|
||||||
Above = -1;
|
Above = -1;
|
||||||
@ -641,6 +685,7 @@ begin
|
|||||||
Result := SortByName(Item1, Item2);
|
Result := SortByName(Item1, Item2);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
procedure TfrmUnSwDialog.UpdateTypeFilter();
|
procedure TfrmUnSwDialog.UpdateTypeFilter();
|
||||||
begin
|
begin
|
||||||
FTypeFilter.IncludeUnits := ((not FFormsOnly) and chkUnits.Checked);
|
FTypeFilter.IncludeUnits := ((not FFormsOnly) and chkUnits.Checked);
|
||||||
@ -649,7 +694,7 @@ begin
|
|||||||
FTypeFilter.IncludeDataModules := chkDataModules.Checked;
|
FTypeFilter.IncludeDataModules := chkDataModules.Checked;
|
||||||
|
|
||||||
FTypeFilteredList.Clone(FUnitList);
|
FTypeFilteredList.Clone(FUnitList);
|
||||||
FTypeFilteredList.AcceptVisitor(FTypeFilter);
|
FTypeFilter.FilterList(FTypeFilteredList);
|
||||||
|
|
||||||
if actSortByName.Checked then
|
if actSortByName.Checked then
|
||||||
FTypeFilteredList.Sort(SortByName)
|
FTypeFilteredList.Sort(SortByName)
|
||||||
@ -659,6 +704,7 @@ begin
|
|||||||
UpdateSubFilters();
|
UpdateSubFilters();
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
procedure TfrmUnSwDialog.PopFilter();
|
procedure TfrmUnSwDialog.PopFilter();
|
||||||
begin
|
begin
|
||||||
if FSubFilters.Count > 0 then
|
if FSubFilters.Count > 0 then
|
||||||
@ -668,6 +714,7 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
procedure TfrmUnSwDialog.UpdateSubFilters();
|
procedure TfrmUnSwDialog.UpdateSubFilters();
|
||||||
var
|
var
|
||||||
iFilter: Integer;
|
iFilter: Integer;
|
||||||
@ -682,7 +729,7 @@ begin
|
|||||||
begin
|
begin
|
||||||
sFilters := sFilters + FSubFilters[iFilter] + ' '#187' ';
|
sFilters := sFilters + FSubFilters[iFilter] + ' '#187' ';
|
||||||
FSubFilter.Filter := FSubFilters[iFilter];
|
FSubFilter.Filter := FSubFilters[iFilter];
|
||||||
FSubFilteredList.AcceptVisitor(FSubFilter);
|
FSubFilter.FilterList(FSubFilteredList);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
lblSubFilters.Caption := Trim(sFilters);
|
lblSubFilters.Caption := Trim(sFilters);
|
||||||
@ -708,6 +755,7 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
function TfrmUnSwDialog.GetActiveUnits(): TUnSwUnitList;
|
function TfrmUnSwDialog.GetActiveUnits(): TUnSwUnitList;
|
||||||
var
|
var
|
||||||
itemIndex: Integer;
|
itemIndex: Integer;
|
||||||
@ -764,6 +812,7 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
procedure TfrmUnSwDialog.SaveSettings();
|
procedure TfrmUnSwDialog.SaveSettings();
|
||||||
var
|
var
|
||||||
dialogSettings: TUnSwDialogSettings;
|
dialogSettings: TUnSwDialogSettings;
|
||||||
@ -796,6 +845,7 @@ begin
|
|||||||
lstUnits.SelectAll();
|
lstUnits.SelectAll();
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
procedure TfrmUnSwDialog.actSelectInvertExecute(Sender: TObject);
|
procedure TfrmUnSwDialog.actSelectInvertExecute(Sender: TObject);
|
||||||
var
|
var
|
||||||
iItem: Integer;
|
iItem: Integer;
|
||||||
@ -805,6 +855,7 @@ begin
|
|||||||
lstUnits.Selected[iItem] := not lstUnits.Selected[iItem];
|
lstUnits.Selected[iItem] := not lstUnits.Selected[iItem];
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
procedure TfrmUnSwDialog.SortExecute(Sender: TObject);
|
procedure TfrmUnSwDialog.SortExecute(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
(Sender as TAction).Checked := True;
|
(Sender as TAction).Checked := True;
|
||||||
@ -822,6 +873,7 @@ begin
|
|||||||
cmbSearch.OnChange(nil);
|
cmbSearch.OnChange(nil);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
procedure TfrmUnSwDialog.actMRUNextExecute(Sender: TObject);
|
procedure TfrmUnSwDialog.actMRUNextExecute(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
if FMRUIndex < Pred(FMRUList.Count) then
|
if FMRUIndex < Pred(FMRUList.Count) then
|
||||||
@ -830,6 +882,7 @@ begin
|
|||||||
SelectMRUItem();
|
SelectMRUItem();
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
procedure TfrmUnSwDialog.actMRUPriorExecute(Sender: TObject);
|
procedure TfrmUnSwDialog.actMRUPriorExecute(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
if FMRUIndex >= -1 then
|
if FMRUIndex >= -1 then
|
||||||
@ -838,6 +891,7 @@ begin
|
|||||||
SelectMRUItem();
|
SelectMRUItem();
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
procedure TfrmUnSwDialog.actOpenFolderExecute(Sender: TObject);
|
procedure TfrmUnSwDialog.actOpenFolderExecute(Sender: TObject);
|
||||||
var
|
var
|
||||||
pUnits: TUnSwUnitList;
|
pUnits: TUnSwUnitList;
|
||||||
@ -852,6 +906,7 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
procedure TfrmUnSwDialog.actOpenPropertiesExecute(Sender: TObject);
|
procedure TfrmUnSwDialog.actOpenPropertiesExecute(Sender: TObject);
|
||||||
var
|
var
|
||||||
pUnits: TUnSwUnitList;
|
pUnits: TUnSwUnitList;
|
||||||
@ -866,6 +921,7 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
procedure TfrmUnSwDialog.actOpenDFMPropertiesExecute(Sender: TObject);
|
procedure TfrmUnSwDialog.actOpenDFMPropertiesExecute(Sender: TObject);
|
||||||
var
|
var
|
||||||
pUnits: TUnSwUnitList;
|
pUnits: TUnSwUnitList;
|
||||||
@ -887,12 +943,17 @@ begin
|
|||||||
lstUnits.Invalidate();
|
lstUnits.Invalidate();
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
procedure TfrmUnSwDialog.cmbSearchChange(Sender: TObject);
|
procedure TfrmUnSwDialog.cmbSearchChange(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
FInputFilter.Filter := cmbSearch.Text;
|
if cmbSearch.Text <> FInputFilter.Filter then
|
||||||
UpdateList();
|
begin
|
||||||
|
FInputFilter.Filter := cmbSearch.Text;
|
||||||
|
UpdateList();
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
procedure TfrmUnSwDialog.cmbSearchKeyDown(Sender: TObject; var Key: Word;
|
procedure TfrmUnSwDialog.cmbSearchKeyDown(Sender: TObject; var Key: Word;
|
||||||
Shift: TShiftState);
|
Shift: TShiftState);
|
||||||
begin
|
begin
|
||||||
@ -922,6 +983,7 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
procedure TfrmUnSwDialog.cmbSearchKeyPress(Sender: TObject; var Key: Char);
|
procedure TfrmUnSwDialog.cmbSearchKeyPress(Sender: TObject; var Key: Char);
|
||||||
begin
|
begin
|
||||||
// Ctrl-Backspace
|
// Ctrl-Backspace
|
||||||
@ -929,28 +991,33 @@ begin
|
|||||||
Key := #0;
|
Key := #0;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
procedure TfrmUnSwDialog.TypeFilterChange(Sender: TObject);
|
procedure TfrmUnSwDialog.TypeFilterChange(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
if not FLoading then
|
if not FLoading then
|
||||||
UpdateTypeFilter();
|
UpdateTypeFilter();
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
procedure TfrmUnSwDialog.lstUnitsDblClick(Sender: TObject);
|
procedure TfrmUnSwDialog.lstUnitsDblClick(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
btnOK.Click();
|
btnOK.Click();
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
procedure TfrmUnSwDialog.lstUnitsClick(Sender: TObject);
|
procedure TfrmUnSwDialog.lstUnitsClick(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
UpdateUnitActions();
|
UpdateUnitActions();
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
procedure TfrmUnSwDialog.lstUnitsData(Control: TWinControl; Index: Integer;
|
procedure TfrmUnSwDialog.lstUnitsData(Control: TWinControl; Index: Integer;
|
||||||
var Data: string);
|
var Data: string);
|
||||||
begin
|
begin
|
||||||
Data := FInputFilteredList[Index].Name;
|
Data := FInputFilteredList[Index].Name;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
procedure TfrmUnSwDialog.lstUnitsDrawItem(Control: TWinControl; Index: Integer;
|
procedure TfrmUnSwDialog.lstUnitsDrawItem(Control: TWinControl; Index: Integer;
|
||||||
Rect: TRect; State: TOwnerDrawState);
|
Rect: TRect; State: TOwnerDrawState);
|
||||||
var
|
var
|
||||||
@ -996,6 +1063,7 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
procedure TfrmUnSwDialog.lstUnitsMouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
|
procedure TfrmUnSwDialog.lstUnitsMouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
|
||||||
var
|
var
|
||||||
itemIndex: Integer;
|
itemIndex: Integer;
|
||||||
@ -1015,6 +1083,7 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
procedure TfrmUnSwDialog.actReadOnlyExecute(Sender: TObject);
|
procedure TfrmUnSwDialog.actReadOnlyExecute(Sender: TObject);
|
||||||
var
|
var
|
||||||
pUnits: TUnSwUnitList;
|
pUnits: TUnSwUnitList;
|
||||||
|
@ -23,7 +23,7 @@ type
|
|||||||
|
|
||||||
procedure FilterUnit(const AUnit: TUnSwUnit); virtual;
|
procedure FilterUnit(const AUnit: TUnSwUnit); virtual;
|
||||||
public
|
public
|
||||||
constructor Create(const AList: TUnSwUnitList); virtual;
|
procedure FilterList(AList: TUnSwUnitList);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
TUnSwUnitSimpleFilter = class(TUnSwUnitFilter)
|
TUnSwUnitSimpleFilter = class(TUnSwUnitFilter)
|
||||||
@ -55,7 +55,7 @@ type
|
|||||||
procedure VisitModule(const AUnit: TUnSwModuleUnit); override;
|
procedure VisitModule(const AUnit: TUnSwModuleUnit); override;
|
||||||
procedure VisitProject(const AUnit: TUnSwProjectUnit); override;
|
procedure VisitProject(const AUnit: TUnSwProjectUnit); override;
|
||||||
public
|
public
|
||||||
constructor Create(const AList: TUnSwUnitList); override;
|
constructor Create;
|
||||||
|
|
||||||
property IncludeDataModules: Boolean read FIncludeDataModules write FIncludeDataModules;
|
property IncludeDataModules: Boolean read FIncludeDataModules write FIncludeDataModules;
|
||||||
property IncludeForms: Boolean read FIncludeForms write FIncludeForms;
|
property IncludeForms: Boolean read FIncludeForms write FIncludeForms;
|
||||||
@ -69,28 +69,34 @@ uses
|
|||||||
|
|
||||||
|
|
||||||
{ TUnSwUnitFilter }
|
{ TUnSwUnitFilter }
|
||||||
constructor TUnSwUnitFilter.Create(const AList: TUnSwUnitList);
|
procedure TUnSwUnitFilter.FilterList(AList: TUnSwUnitList);
|
||||||
begin
|
begin
|
||||||
inherited Create();
|
|
||||||
|
|
||||||
Assert(Assigned(AList), 'List must be assigned.');
|
|
||||||
FList := AList;
|
FList := AList;
|
||||||
|
try
|
||||||
|
FList.AcceptVisitor(Self);
|
||||||
|
finally
|
||||||
|
FList := nil;
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
procedure TUnSwUnitFilter.VisitUnit(const AUnit: TUnSwUnit);
|
procedure TUnSwUnitFilter.VisitUnit(const AUnit: TUnSwUnit);
|
||||||
begin
|
begin
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
procedure TUnSwUnitFilter.VisitModule(const AUnit: TUnSwModuleUnit);
|
procedure TUnSwUnitFilter.VisitModule(const AUnit: TUnSwModuleUnit);
|
||||||
begin
|
begin
|
||||||
VisitUnit(AUnit);
|
VisitUnit(AUnit);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
procedure TUnSwUnitFilter.VisitProject(const AUnit: TUnSwProjectUnit);
|
procedure TUnSwUnitFilter.VisitProject(const AUnit: TUnSwProjectUnit);
|
||||||
begin
|
begin
|
||||||
VisitUnit(AUnit);
|
VisitUnit(AUnit);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
procedure TUnSwUnitFilter.FilterUnit(const AUnit: TUnSwUnit);
|
procedure TUnSwUnitFilter.FilterUnit(const AUnit: TUnSwUnit);
|
||||||
begin
|
begin
|
||||||
FList.Remove(AUnit);
|
FList.Remove(AUnit);
|
||||||
@ -123,7 +129,7 @@ end;
|
|||||||
|
|
||||||
|
|
||||||
{ TUnSwUnitTypeFilter }
|
{ TUnSwUnitTypeFilter }
|
||||||
constructor TUnSwUnitTypeFilter.Create(const AList: TUnSwUnitList);
|
constructor TUnSwUnitTypeFilter.Create;
|
||||||
begin
|
begin
|
||||||
inherited;
|
inherited;
|
||||||
|
|
||||||
@ -133,6 +139,7 @@ begin
|
|||||||
FIncludeUnits := True;
|
FIncludeUnits := True;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
procedure TUnSwUnitTypeFilter.VisitModule(const AUnit: TUnSwModuleUnit);
|
procedure TUnSwUnitTypeFilter.VisitModule(const AUnit: TUnSwModuleUnit);
|
||||||
var
|
var
|
||||||
validTypes: TUnSwUnitTypes;
|
validTypes: TUnSwUnitTypes;
|
||||||
@ -153,6 +160,7 @@ begin
|
|||||||
FilterUnit(AUnit);
|
FilterUnit(AUnit);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
procedure TUnSwUnitTypeFilter.VisitProject(const AUnit: TUnSwProjectUnit);
|
procedure TUnSwUnitTypeFilter.VisitProject(const AUnit: TUnSwProjectUnit);
|
||||||
begin
|
begin
|
||||||
if not FIncludeProjectSource then
|
if not FIncludeProjectSource then
|
||||||
|
@ -29,6 +29,7 @@ type
|
|||||||
procedure WriteColor(const ARegistry: TRegistry; const AValue: TColor; const AName: String);
|
procedure WriteColor(const ARegistry: TRegistry; const AValue: TColor; const AName: String);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
TUnSwDialogSort = (dsName, dsType);
|
TUnSwDialogSort = (dsName, dsType);
|
||||||
|
|
||||||
TUnSwDialogSettings = class(TUnSwBaseSettings)
|
TUnSwDialogSettings = class(TUnSwBaseSettings)
|
||||||
@ -60,6 +61,7 @@ type
|
|||||||
property Width: Integer read FWidth write FWidth;
|
property Width: Integer read FWidth write FWidth;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
TUnSwColorSettings = class(TUnSwBaseSettings)
|
TUnSwColorSettings = class(TUnSwBaseSettings)
|
||||||
private
|
private
|
||||||
FDataModules: TColor;
|
FDataModules: TColor;
|
||||||
@ -78,9 +80,22 @@ type
|
|||||||
property Units: TColor read FUnits write FUnits;
|
property Units: TColor read FUnits write FUnits;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
TUnSwFilterSettings = class(TUnSwBaseSettings)
|
||||||
|
private
|
||||||
|
FAllowEmptyResults: Boolean;
|
||||||
|
protected
|
||||||
|
procedure Load(const ARegistry: TRegistry); override;
|
||||||
|
procedure Save(const ARegistry: TRegistry); override;
|
||||||
|
public
|
||||||
|
property AllowEmptyResult: Boolean read FAllowEmptyResults write FAllowEmptyResults;
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
TUnSwSettings = class(TObject)
|
TUnSwSettings = class(TObject)
|
||||||
private
|
private
|
||||||
FColors: TUnSwColorSettings;
|
FColors: TUnSwColorSettings;
|
||||||
|
FFilter: TUnSwFilterSettings;
|
||||||
FFormsDialog: TUnSwDialogSettings;
|
FFormsDialog: TUnSwDialogSettings;
|
||||||
FUnitsDialog: TUnSwDialogSettings;
|
FUnitsDialog: TUnSwDialogSettings;
|
||||||
|
|
||||||
@ -95,12 +110,15 @@ type
|
|||||||
procedure Save();
|
procedure Save();
|
||||||
|
|
||||||
property Colors: TUnSwColorSettings read FColors write FColors;
|
property Colors: TUnSwColorSettings read FColors write FColors;
|
||||||
|
property Filter: TUnSwFilterSettings read FFilter write FFilter;
|
||||||
property FormsDialog: TUnSwDialogSettings read FFormsDialog write FFormsDialog;
|
property FormsDialog: TUnSwDialogSettings read FFormsDialog write FFormsDialog;
|
||||||
property UnitsDialog: TUnSwDialogSettings read FUnitsDialog write FUnitsDialog;
|
property UnitsDialog: TUnSwDialogSettings read FUnitsDialog write FUnitsDialog;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
function Settings(): TUnSwSettings;
|
function Settings(): TUnSwSettings;
|
||||||
|
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
uses
|
uses
|
||||||
SysUtils,
|
SysUtils,
|
||||||
@ -126,6 +144,7 @@ begin
|
|||||||
Result := AName;
|
Result := AName;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
procedure TUnSwBaseSettings.ReadBoolDef(const ARegistry: TRegistry;
|
procedure TUnSwBaseSettings.ReadBoolDef(const ARegistry: TRegistry;
|
||||||
var AValue: Boolean;
|
var AValue: Boolean;
|
||||||
const AName: String);
|
const AName: String);
|
||||||
@ -134,6 +153,7 @@ begin
|
|||||||
AValue := ARegistry.ReadBool(GetKeyName(AName));
|
AValue := ARegistry.ReadBool(GetKeyName(AName));
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
procedure TUnSwBaseSettings.ReadColorDef(const ARegistry: TRegistry;
|
procedure TUnSwBaseSettings.ReadColorDef(const ARegistry: TRegistry;
|
||||||
var AValue: TColor;
|
var AValue: TColor;
|
||||||
const AName: String);
|
const AName: String);
|
||||||
@ -142,6 +162,7 @@ begin
|
|||||||
AValue := TColor(ARegistry.ReadInteger(GetKeyName(AName)));
|
AValue := TColor(ARegistry.ReadInteger(GetKeyName(AName)));
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
procedure TUnSwBaseSettings.ReadIntegerDef(const ARegistry: TRegistry;
|
procedure TUnSwBaseSettings.ReadIntegerDef(const ARegistry: TRegistry;
|
||||||
var AValue: Integer;
|
var AValue: Integer;
|
||||||
const AName: String);
|
const AName: String);
|
||||||
@ -158,6 +179,7 @@ begin
|
|||||||
ARegistry.WriteBool(GetKeyName(AName), AValue);
|
ARegistry.WriteBool(GetKeyName(AName), AValue);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
procedure TUnSwBaseSettings.WriteColor(const ARegistry: TRegistry;
|
procedure TUnSwBaseSettings.WriteColor(const ARegistry: TRegistry;
|
||||||
const AValue: TColor;
|
const AValue: TColor;
|
||||||
const AName: String);
|
const AName: String);
|
||||||
@ -165,6 +187,7 @@ begin
|
|||||||
WriteInteger(ARegistry, Integer(AValue), AName);
|
WriteInteger(ARegistry, Integer(AValue), AName);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
procedure TUnSwBaseSettings.WriteInteger(const ARegistry: TRegistry;
|
procedure TUnSwBaseSettings.WriteInteger(const ARegistry: TRegistry;
|
||||||
const AValue: Integer;
|
const AValue: Integer;
|
||||||
const AName: String);
|
const AName: String);
|
||||||
@ -184,6 +207,7 @@ begin
|
|||||||
TStringList(FMRUList).CaseSensitive := False
|
TStringList(FMRUList).CaseSensitive := False
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
destructor TUnSwDialogSettings.Destroy();
|
destructor TUnSwDialogSettings.Destroy();
|
||||||
begin
|
begin
|
||||||
FreeAndNil(FMRUList);
|
FreeAndNil(FMRUList);
|
||||||
@ -240,6 +264,7 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
procedure TUnSwDialogSettings.Save(const ARegistry: TRegistry);
|
procedure TUnSwDialogSettings.Save(const ARegistry: TRegistry);
|
||||||
var
|
var
|
||||||
sMRU: String;
|
sMRU: String;
|
||||||
@ -274,6 +299,7 @@ begin
|
|||||||
ReadColorDef(ARegistry, FUnits, 'ColorUnits');
|
ReadColorDef(ARegistry, FUnits, 'ColorUnits');
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
procedure TUnSwColorSettings.Save(const ARegistry: TRegistry);
|
procedure TUnSwColorSettings.Save(const ARegistry: TRegistry);
|
||||||
begin
|
begin
|
||||||
WriteBool(ARegistry, FEnabled, 'ColorEnabled');
|
WriteBool(ARegistry, FEnabled, 'ColorEnabled');
|
||||||
@ -284,6 +310,19 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
{ TUnSwFilterSettings }
|
||||||
|
procedure TUnSwFilterSettings.Load(const ARegistry: TRegistry);
|
||||||
|
begin
|
||||||
|
ReadBoolDef(ARegistry, FAllowEmptyResults, 'AllowEmptyResults');
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
procedure TUnSwFilterSettings.Save(const ARegistry: TRegistry);
|
||||||
|
begin
|
||||||
|
WriteBool(ARegistry, FAllowEmptyResults, 'AllowEmptyResults');
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
{ TUnSwSettings }
|
{ TUnSwSettings }
|
||||||
constructor TUnSwSettings.Create();
|
constructor TUnSwSettings.Create();
|
||||||
begin
|
begin
|
||||||
@ -293,16 +332,20 @@ begin
|
|||||||
'\UnitSwitcher';
|
'\UnitSwitcher';
|
||||||
|
|
||||||
FColors := TUnSwColorSettings.Create();
|
FColors := TUnSwColorSettings.Create();
|
||||||
|
FFilter := TUnSwFilterSettings.Create();
|
||||||
FFormsDialog := TUnSwDialogSettings.Create('Forms');
|
FFormsDialog := TUnSwDialogSettings.Create('Forms');
|
||||||
FUnitsDialog := TUnSwDialogSettings.Create('Units');
|
FUnitsDialog := TUnSwDialogSettings.Create('Units');
|
||||||
|
|
||||||
ResetDefaults();
|
ResetDefaults();
|
||||||
Load();
|
Load();
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
destructor TUnSwSettings.Destroy();
|
destructor TUnSwSettings.Destroy();
|
||||||
begin
|
begin
|
||||||
FreeAndNil(FUnitsDialog);
|
FreeAndNil(FUnitsDialog);
|
||||||
FreeAndNil(FFormsDialog);
|
FreeAndNil(FFormsDialog);
|
||||||
|
FreeAndNil(FFilter);
|
||||||
FreeAndNil(FColors);
|
FreeAndNil(FColors);
|
||||||
|
|
||||||
inherited;
|
inherited;
|
||||||
@ -310,6 +353,7 @@ end;
|
|||||||
|
|
||||||
|
|
||||||
procedure TUnSwSettings.ResetDefaults(const AColorsOnly: Boolean);
|
procedure TUnSwSettings.ResetDefaults(const AColorsOnly: Boolean);
|
||||||
|
|
||||||
procedure ResetDialog(const ADialog: TUnSwDialogSettings);
|
procedure ResetDialog(const ADialog: TUnSwDialogSettings);
|
||||||
begin
|
begin
|
||||||
ADialog.IncludeDataModules := True;
|
ADialog.IncludeDataModules := True;
|
||||||
@ -321,6 +365,7 @@ procedure TUnSwSettings.ResetDefaults(const AColorsOnly: Boolean);
|
|||||||
ADialog.Height := 425;
|
ADialog.Height := 425;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
begin
|
begin
|
||||||
if not AColorsOnly then
|
if not AColorsOnly then
|
||||||
begin
|
begin
|
||||||
@ -328,11 +373,13 @@ begin
|
|||||||
ResetDialog(FUnitsDialog);
|
ResetDialog(FUnitsDialog);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
FColors.Enabled := True;
|
FColors.Enabled := True;
|
||||||
FColors.DataModules := RGB( 35, 120, 35); // Green
|
FColors.DataModules := RGB( 35, 120, 35); // Green
|
||||||
FColors.Forms := RGB( 50, 70, 120); // Blue
|
FColors.Forms := RGB( 50, 70, 120); // Blue
|
||||||
FColors.ProjectSource := RGB(120, 120, 35); // Yellow
|
FColors.ProjectSource := RGB(120, 120, 35); // Yellow
|
||||||
FColors.Units := RGB(150, 35, 35); // Red
|
FColors.Units := RGB(150, 35, 35); // Red
|
||||||
|
|
||||||
|
FFilter.AllowEmptyResult := False;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TUnSwSettings.Load();
|
procedure TUnSwSettings.Load();
|
||||||
@ -344,11 +391,14 @@ begin
|
|||||||
with ideRegistry do
|
with ideRegistry do
|
||||||
try
|
try
|
||||||
RootKey := HKEY_CURRENT_USER;
|
RootKey := HKEY_CURRENT_USER;
|
||||||
|
|
||||||
if OpenKey(FRegistryKey, False) then
|
if OpenKey(FRegistryKey, False) then
|
||||||
begin
|
begin
|
||||||
FColors.Load(ideRegistry);
|
FColors.Load(ideRegistry);
|
||||||
|
FFilter.Load(ideRegistry);
|
||||||
FFormsDialog.Load(ideRegistry);
|
FFormsDialog.Load(ideRegistry);
|
||||||
FUnitsDialog.Load(ideRegistry);
|
FUnitsDialog.Load(ideRegistry);
|
||||||
|
|
||||||
CloseKey();
|
CloseKey();
|
||||||
end;
|
end;
|
||||||
finally
|
finally
|
||||||
@ -356,6 +406,7 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
procedure TUnSwSettings.Save();
|
procedure TUnSwSettings.Save();
|
||||||
var
|
var
|
||||||
ideRegistry: TRegistry;
|
ideRegistry: TRegistry;
|
||||||
@ -365,11 +416,14 @@ begin
|
|||||||
with ideRegistry do
|
with ideRegistry do
|
||||||
try
|
try
|
||||||
RootKey := HKEY_CURRENT_USER;
|
RootKey := HKEY_CURRENT_USER;
|
||||||
|
|
||||||
if OpenKey(FRegistryKey, True) then
|
if OpenKey(FRegistryKey, True) then
|
||||||
begin
|
begin
|
||||||
FColors.Save(ideRegistry);
|
FColors.Save(ideRegistry);
|
||||||
|
FFilter.Save(ideRegistry);
|
||||||
FFormsDialog.Save(ideRegistry);
|
FFormsDialog.Save(ideRegistry);
|
||||||
FUnitsDialog.Save(ideRegistry);
|
FUnitsDialog.Save(ideRegistry);
|
||||||
|
|
||||||
CloseKey();
|
CloseKey();
|
||||||
end;
|
end;
|
||||||
finally
|
finally
|
||||||
|
Loading…
Reference in New Issue
Block a user