├── .gitignore
├── Bin
└── TEMPLATE.xml
├── DelphiSettingManager.dpr
├── DelphiSettingManager.dproj
├── DelphiSettingManager.res
├── Design Patterns
├── IntfObserver.pas
└── Subject.pas
├── Documentation
├── EditASetting.PNG
├── EditKey.PNG
├── EditNames.PNG
├── MainForm.PNG
├── MultiEdit.PNG
├── Template.PNG
└── index.html
├── README.md
├── Resources
├── Glyphs
│ ├── copy_clipboard16.png
│ ├── copy_clipboard16_d.png
│ ├── copy_clipboard16_h.png
│ ├── delete_x16.png
│ ├── delete_x16_d.png
│ ├── delete_x16_h.png
│ ├── exit16.png
│ ├── exit16_d.png
│ ├── exit16_h.png
│ ├── link16.png
│ ├── link16_d.png
│ ├── link16_h.png
│ ├── new_document16.png
│ ├── new_document16_d.png
│ ├── new_document16_h.png
│ ├── play_blue16.png
│ ├── play_blue16_d.png
│ ├── play_blue16_h.png
│ ├── rename16.png
│ ├── rename16_d.png
│ ├── rename16_h.png
│ ├── save16.png
│ ├── save16_d.png
│ ├── save16_h.png
│ ├── tick_green16.png
│ ├── tick_green16_d.png
│ ├── tick_green16_h.png
│ ├── treeview_edit16.png
│ ├── treeview_edit16_d.png
│ └── treeview_edit16_h.png
└── Icons
│ ├── IDEs
│ ├── 16x16
│ │ ├── BDS10.ico
│ │ ├── BDS3.ico
│ │ ├── BDS7.ico
│ │ ├── C#.ico
│ │ ├── D5.ico
│ │ ├── D6.ico
│ │ ├── D7.ico
│ │ └── D8.ico
│ ├── BDS10.ico
│ ├── BDS3.ico
│ ├── BDS7.ico
│ ├── C#.ico
│ ├── D5.ico
│ ├── D6.ico
│ ├── D7.ico
│ └── D8.ico
│ └── Main.ico
└── Source
├── DelphiSettingEditor.pas
├── DelphiSettingRegistry.pas
├── LayoutPersistent.pas
├── LoadSaveCustomSetting.pas
├── SettingCollection.pas
├── SettingPersistent.pas
├── SettingTemplate.pas
├── ShellUtilities.pas
├── TreeViewController.pas
├── ValueNamesProvider.pas
├── dmGlyphs.dfm
├── dmGlyphs.pas
├── fAbout.dfm
├── fAbout.pas
├── fEditSetting.dfm
├── fEditSetting.pas
├── fMain.dfm
├── fMain.pas
├── fNewSetting.dfm
├── fNewSetting.pas
├── fRenameSetting.dfm
├── fRenameSetting.pas
├── frmSetting.dfm
└── frmSetting.pas
/.gitignore:
--------------------------------------------------------------------------------
1 |
2 | # Delphi binaries
3 | DCU/
4 | *.exe
5 | *.identcache
6 |
7 | # Delphi local files
8 | __history
9 | *.~*
10 | *.dproj.local
11 | *.projdata
12 | *.dsk
13 |
14 | # Modeling configuration file
15 | *.tvsconfig
16 |
17 | # GExperts project params
18 | *.gex
19 |
20 | # Settings file
21 | DelphiSettingManager.ini
22 |
23 | # Autogenerated resource files
24 | DelphiSettingManager.dres
25 | DelphiSettingManagerResource.rc
--------------------------------------------------------------------------------
/Bin/TEMPLATE.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 |
115 |
116 |
117 |
118 |
119 |
120 |
121 |
122 |
123 |
124 |
125 |
126 |
127 |
128 |
129 |
130 |
131 |
132 |
133 |
134 |
135 |
136 |
137 |
138 |
139 |
140 |
141 |
142 |
143 |
144 |
145 |
146 |
147 |
148 |
149 |
150 |
151 |
152 |
153 |
154 |
155 |
156 |
157 |
158 |
159 |
160 |
161 |
162 |
163 |
164 |
165 |
166 |
167 |
168 |
169 |
170 |
171 |
172 |
173 |
174 |
175 |
176 |
177 |
178 |
179 |
180 |
181 |
182 |
183 |
184 |
185 |
186 |
187 |
188 |
189 |
190 |
191 |
192 |
193 |
194 |
195 |
196 |
197 |
198 |
199 |
200 |
201 |
202 |
203 |
204 |
205 |
206 |
207 |
208 |
209 |
210 |
211 |
212 |
213 |
214 |
215 |
216 |
217 |
218 |
219 |
220 |
221 |
222 |
223 |
224 |
225 |
226 |
227 |
228 |
229 |
230 |
231 |
232 |
233 |
234 |
235 |
236 |
237 |
238 |
239 |
240 |
241 |
242 |
243 |
244 |
245 |
246 |
247 |
248 |
249 |
250 |
251 |
252 |
253 |
254 |
255 |
256 |
257 |
258 |
259 |
260 |
261 |
262 |
263 |
264 |
265 |
266 |
267 |
268 |
269 |
270 |
271 |
272 |
273 |
274 |
275 |
276 |
277 |
278 |
279 |
280 |
281 |
282 |
283 |
284 |
285 |
286 |
287 |
288 |
289 |
290 |
291 |
292 |
293 |
294 |
295 |
296 |
297 |
298 |
--------------------------------------------------------------------------------
/DelphiSettingManager.dpr:
--------------------------------------------------------------------------------
1 | program DelphiSettingManager;
2 |
3 | {$R *.dres}
4 |
5 | uses
6 | Forms,
7 | dmGlyphs in 'Source\dmGlyphs.pas' {dm_Glyphs: TDataModule},
8 | fMain in 'Source\fMain.pas' {frmMain},
9 | ShellUtilities in 'Source\ShellUtilities.pas',
10 | SettingCollection in 'Source\SettingCollection.pas',
11 | frmSetting in 'Source\frmSetting.pas' {frmSettingList: TFrame},
12 | fNewSetting in 'Source\fNewSetting.pas' {frmNewSetting},
13 | fRenameSetting in 'Source\fRenameSetting.pas' {frmRenameSetting},
14 | LoadSaveCustomSetting in 'Source\LoadSaveCustomSetting.pas',
15 | fAbout in 'Source\fAbout.pas' {frmAbout},
16 | DelphiSettingRegistry in 'Source\DelphiSettingRegistry.pas',
17 | TreeViewController in 'Source\TreeViewController.pas',
18 | fEditSetting in 'Source\fEditSetting.pas' {frmEditSetting},
19 | ValueNamesProvider in 'Source\ValueNamesProvider.pas',
20 | IntfObserver in 'Design Patterns\IntfObserver.pas',
21 | Subject in 'Design Patterns\Subject.pas',
22 | SettingPersistent in 'Source\SettingPersistent.pas',
23 | SettingTemplate in 'Source\SettingTemplate.pas';
24 |
25 | {$R *.res}
26 |
27 | begin
28 | Application.Initialize;
29 | Application.Title := 'Delphi Setting Manager';
30 | Application.CreateForm(Tdm_Glyphs, dm_Glyphs);
31 | Application.CreateForm(TfrmMain, frmMain);
32 | Application.Run;
33 | end.
34 |
--------------------------------------------------------------------------------
/DelphiSettingManager.dproj:
--------------------------------------------------------------------------------
1 |
2 |
3 | {E3426579-3952-4684-88CE-53B7168E5740}
4 | DelphiSettingManager.dpr
5 | True
6 | Release
7 | Win32
8 | Application
9 | VCL
10 | DCC32
11 | 12.3
12 |
13 |
14 | true
15 |
16 |
17 | true
18 | Base
19 | true
20 |
21 |
22 | true
23 | Base
24 | true
25 |
26 |
27 | vcl;rtl;vclx;indy;vclie;xmlrtl;inetdbbde;inet;inetdbxpress;dbrtl;soaprtl;dsnap;VclSmp;dbexpress;vcldb;dbxcds;inetdb;bdertl;vcldbx;adortl;teeui;teedb;tee;ibxpress;visualclx;visualdbclx;vclactnband;vclshlctrls;IntrawebDB_50_70;Intraweb_50_70;Rave50CLX;Rave50VCL;dclOfficeXP;CodelineUtilities
28 | false
29 | 0
30 | 00400000
31 | WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;$(DCC_UnitAlias)
32 | false
33 | Bin
34 | false
35 | true
36 | false
37 | false
38 | DCU
39 | false
40 | false
41 |
42 |
43 | RELEASE;$(DCC_Define)
44 |
45 |
46 | true
47 | true
48 | DEBUG;$(DCC_Define)
49 | false
50 | true
51 |
52 |
53 |
54 | MainSource
55 |
56 |
57 |
58 | TDataModule
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 | TFrame
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 | ICON
91 | 2
92 |
93 |
94 | ICON
95 | 3
96 |
97 |
98 | ICON
99 | 4
100 |
101 |
102 | ICON
103 | 5
104 |
105 |
106 | ICON
107 | 6
108 |
109 |
110 | ICON
111 | 7
112 |
113 |
114 | ICON
115 | 8
116 |
117 |
118 | ICON
119 | 9
120 |
121 |
122 | Cfg_2
123 | Base
124 |
125 |
126 | Base
127 |
128 |
129 | Cfg_1
130 | Base
131 |
132 |
133 |
134 |
135 | DelphiDotNetAssemblyCompiler
136 |
137 | $(SystemRoot)\microsoft.net\framework\v1.1.4322\system.drawing.dll
138 | $(SystemRoot)\microsoft.net\framework\v1.1.4322\system.drawing.dll
139 |
140 |
141 |
142 |
143 |
144 | Delphi.Personality.12
145 |
146 |
147 |
148 |
149 | DelphiSettingManager.dpr
150 |
151 |
152 | True
153 | False
154 | 1
155 | 3
156 | 4
157 | 0
158 | False
159 | False
160 | False
161 | False
162 | False
163 | 1033
164 | 1252
165 |
166 |
167 | GalaxyWorks
168 | Delphi Setting Manager
169 | 1.3.4.0
170 | Delphi Setting Manager
171 | Copyright © Erwien Saputra 2005, Denis Grinyuk 2011
172 |
173 |
174 | Delphi Setting Manager
175 | 1.3
176 |
177 | 2015-11-16 11:58
178 |
179 |
180 | Microsoft Office 2000 Sample Automation Server Wrapper Components
181 | Microsoft Office XP Sample Automation Server Wrapper Components
182 |
183 |
184 |
185 | True
186 |
187 |
188 | 12
189 |
190 |
191 |
--------------------------------------------------------------------------------
/DelphiSettingManager.res:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Arvur/DelphiSettingManager/9f2f111b1d0c5a7ff64435f9ba2c32898138be82/DelphiSettingManager.res
--------------------------------------------------------------------------------
/Design Patterns/IntfObserver.pas:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Arvur/DelphiSettingManager/9f2f111b1d0c5a7ff64435f9ba2c32898138be82/Design Patterns/IntfObserver.pas
--------------------------------------------------------------------------------
/Design Patterns/Subject.pas:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Arvur/DelphiSettingManager/9f2f111b1d0c5a7ff64435f9ba2c32898138be82/Design Patterns/Subject.pas
--------------------------------------------------------------------------------
/Documentation/EditASetting.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Arvur/DelphiSettingManager/9f2f111b1d0c5a7ff64435f9ba2c32898138be82/Documentation/EditASetting.PNG
--------------------------------------------------------------------------------
/Documentation/EditKey.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Arvur/DelphiSettingManager/9f2f111b1d0c5a7ff64435f9ba2c32898138be82/Documentation/EditKey.PNG
--------------------------------------------------------------------------------
/Documentation/EditNames.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Arvur/DelphiSettingManager/9f2f111b1d0c5a7ff64435f9ba2c32898138be82/Documentation/EditNames.PNG
--------------------------------------------------------------------------------
/Documentation/MainForm.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Arvur/DelphiSettingManager/9f2f111b1d0c5a7ff64435f9ba2c32898138be82/Documentation/MainForm.PNG
--------------------------------------------------------------------------------
/Documentation/MultiEdit.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Arvur/DelphiSettingManager/9f2f111b1d0c5a7ff64435f9ba2c32898138be82/Documentation/MultiEdit.PNG
--------------------------------------------------------------------------------
/Documentation/Template.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Arvur/DelphiSettingManager/9f2f111b1d0c5a7ff64435f9ba2c32898138be82/Documentation/Template.PNG
--------------------------------------------------------------------------------
/Documentation/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Delphi Setting Manager Readme
5 |
6 |
7 | Delphi / C# Builder
8 | Setting
9 | Manager
10 |
11 | Last Update : 07/01/2005.
12 | Delphi / C#Builder Setting Manager Release 1.2 is released.
13 |
14 | Disclaimer:
15 | This utility is a freeware with source and provided as is, use it at
16 | your own risk.
17 | What is Delphi Setting Manager?
18 | Delphi / C# Builder Setting Manager (or, Delphi Setting Manager) is
19 | a utility to manage custom settings for
20 | Galileo IDEs (Delphi 6, Delphi 7, C#Builder, Delphi 8, and Delphi
21 | 2005). It reads data from the
22 | HKEY_CURRENT_USER\Software\Borland\BDS\X.X for BDS IDEs, or it reads
23 | data from HKEY_CURRENT_USER\Software\Delphi\X.X.
24 | This utility only writes keys and values under
25 | HKEY_CURRENT_USER\Software\Borland\CustomSettings. The expected
26 | behavior of this key, you will not be able to alter your default Delphi
27 | setting,
28 | and corrupt your default Delphi setting by accident. If this utility
29 | corrupts or alter the Delphi default setting, that is a bug. Please let
30 | me know if you found a bug.
31 |
32 | The settings for each IDE is stored under
33 | HKEY_CURRENT_USER\Software\Borland\CustomSettings\<IDE
34 | Identifier>\<Setting Name>, the File - Save Setting to File
35 | will create a .reg file of the selected custom setting. The .reg file
36 | can be imported into different PC using regedit. The .reg file does not
37 | contain the license key, and authorization code.
38 |
39 | I hope you find this utility useful.
40 | Erwien Saputra
41 | http://blogs.slcdug.org/esaputra
42 | http://www.codeline.net
43 |
44 | Downloads:
45 | Binary Only
46 | (Release 1.2 - 07/01/2005)
47 | Source only
48 | download (Release 1.2 - 07/01/2005)
49 |
50 | Feature Summary
51 |
52 |
53 | Supports Delphi 6, Delphi 7, Delphi 8, Delphi 2005, and C#Builder.
54 | Saves all custom settings under one key.
55 | Create shortcut to launch the custom setting.
56 | Launch Delphi from within Delphi Setting Manager.
57 |
58 | Create a new custom setting with the option to use Delphi default
59 | setting for the new setting.
60 | Copy, rename, delete the existing custom setting.
61 | Saves a custom setting as a .reg file (License information are
62 | not saved to the .reg file).
63 | Remember the last selected Delphi version and last selected
64 | custom setting.
65 |
66 | Edit custom setting, copy, synchronize, or delete keys and values
67 | between custom setting or with Delphi default setting.
68 |
69 | Edit between two custom settings by selecting two custom
70 | settings and choose Edit.
71 | Edit between a custom setting and Delphi default setting by
72 | setting a custom setting and choose Edit (Delphi default setting is
73 | read-only).
74 | Use right-click (pop-up menu) to access the menu.
75 | Different registry values will be displayed in different color.
76 |
77 | Create a new custom setting using a set of templates.
78 |
79 | Thanks
80 |
81 | Thanks to Lachlan Gemmell for the idea and the original code for the
82 | edit setting functionality.
83 | http://lachlan.gemmell.com
84 | Change Log
85 | Delphi Setting Manager 1.2 - 07/01/2005
86 | This version includes support for template. One or more template can
87 | be
88 | applied to the new setting. The settings are stored as TEMPLATE.XML.
89 | There are several pre-defined settings, Barebone for Delphi 7, Delphi
90 | 8, and C# Builder 1.0. Barebone template is useful to create very fast
91 | text editor with syntax highlighting.
92 | For Delphi 2005, the available pre-defined templates are Win32,
93 | Delphi.Net, C#, Refactoring, Unit Testing, Error Insight (Win32
94 | Personality), Starteam, Together, CaliberRM, Borland Exception package,
95 | Crystal Report, and Rave Report.
96 |
97 | Delphi Setting Manager 1.1 - 03/12/2005
98 |
99 | This version is released because I think the improvement on the Edit
100 | Setting will be very helpful. In this version, buttons are available to
101 | synchronize two settings. Popup menu was not that intuitive. I released
102 | this because I found a problem with custom settings (not related to
103 | this utility). Check out my blog for more detail.
104 |
105 |
106 | Added buttons to the Edit Setting form.
107 |
108 | Delphi Setting Manager 1.0 - 02/25/2005
109 |
110 | Added keyboard shortcuts for Edit Setting form (Thanks, Jouni
111 | Aro).
112 | Added keyboard shortcuts for the main form.
113 | Fixed bug when running setting with spaces.
114 | Fixed bug when clearing a name value.
115 |
116 | Prevent invalid characters creating/renaming/copying a custom
117 | setting.
118 | Replaces invalid character with underscore '_' when saving a
119 | shortcut and exporting a custom setting to a .reg file.
120 | Set main form's Scaled property to false, as workaround for
121 | desktop with different DPI/font size (Thanks, Michael).
122 | Added Edit Setting to the menu.
123 | Added minimum size constraint to the main form.
124 | Fixed bug that crashed the application when the ini file contains
125 | invalid information.
126 | Known bug / limitation:
127 |
128 | The forms for creating new setting, renaming or copying an
129 | existing setting may not be displayed correctly with desktop with
130 | desktop with extreme DPI / Font size. There is bug with Delphi form
131 | when Scaled property is set to true and controls have anchors. QC: 10068 .
133 |
134 |
135 |
136 | Delphi Setting Manager 0.9 (beta 3) - 02/16/2005
137 |
138 | Improved features and stability of the edit custom setting
139 | feature.
140 |
141 |
142 | Copy registry keys between custom settings or from Delphi
143 | default setting.
144 | Delete custom setting keys.
145 | Copy value names between custom settings or from Delphi default
146 | setting.
147 | Delete or clear custom setting value.
148 | No more exception. :)
149 |
150 |
151 | Delphi Setting Manager 0.9 (beta) - 01/03/2005
152 |
153 | Added the ability to save a custom setting as a .reg file (the
154 | license information is removed from the .reg file).
155 |
156 | Delphi Setting Manager remembers the last selected tab, the last
157 | selected custom setting, the size and location of the main window.
158 |
159 | Added the functionality to edit a custom setting using the
160 | default Delphi configuration as template.
161 | Added menu on the form.
162 |
163 |
164 | Delphi Setting Manager (beta) - 12/15/2004
165 |
166 | It has the ability to manage custom settings for Delphi 6, Delphi
167 | 7, C#Builder, Delphi 8, and Delphi 2005.
168 | It has the ability to create a shortcut to launch Delphi using a
169 | specific custom setting.
170 | It has the ability to launch Delphi using a selected custom
171 | setting.
172 | It has the ability to create a new setting based on the default
173 | Delphi setting.
174 | It has the ability to detect which IDE is installed.
175 |
176 | Main form screen shot:
177 |
178 |
179 | Select two custom settings and click edit to synchronize or to edit
180 | between two settings. Use right click on TreeView and ListBox to access
181 | the menu.
182 |
183 |
184 | Copy and delete key values.
185 |
186 |
187 | Select one custom setting and click edit to synchronize it with Delphi
188 | default setting. Delphi default setting will be read-only.
189 | Look that the values that are different will be displayed in green.
190 |
191 |
192 | Use template to easily create a custom setting.
193 |
195 |
196 |
197 |
198 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | DelphiSettingManager
2 | ====================
3 |
4 | What is Delphi Setting Manager?
5 |
6 | Delphi / C# Builder Setting Manager (or, Delphi Setting Manager) is a utility to manage custom settings for IDEs (from Delphi 5 up to Delphi 10 Seattle). It reads data from the HKEY_CURRENT_USER\Software\Borland\BDS\X.X for BDS IDEs, or it reads data from HKEY_CURRENT_USER\Software\Delphi\X.X.
7 |
8 | This utility only writes keys and values under HKEY_CURRENT_USER\Software\Borland\CustomSettings. The expected behavior of this key, you will not be able to alter your default Delphi setting, and corrupt your default Delphi setting by accident. If this utility corrupts or alter the Delphi default setting, that is a bug. Please let me know if you found a bug.
9 |
10 | The settings for each IDE is stored under HKEY_CURRENT_USER\Software\Borland\CustomSettings\\, the File - Save Setting to File will create a .reg file of the selected custom setting. The .reg file can be imported into different PC using regedit. The .reg file does not contain the license key, and authorization code.
11 |
--------------------------------------------------------------------------------
/Resources/Glyphs/copy_clipboard16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Arvur/DelphiSettingManager/9f2f111b1d0c5a7ff64435f9ba2c32898138be82/Resources/Glyphs/copy_clipboard16.png
--------------------------------------------------------------------------------
/Resources/Glyphs/copy_clipboard16_d.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Arvur/DelphiSettingManager/9f2f111b1d0c5a7ff64435f9ba2c32898138be82/Resources/Glyphs/copy_clipboard16_d.png
--------------------------------------------------------------------------------
/Resources/Glyphs/copy_clipboard16_h.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Arvur/DelphiSettingManager/9f2f111b1d0c5a7ff64435f9ba2c32898138be82/Resources/Glyphs/copy_clipboard16_h.png
--------------------------------------------------------------------------------
/Resources/Glyphs/delete_x16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Arvur/DelphiSettingManager/9f2f111b1d0c5a7ff64435f9ba2c32898138be82/Resources/Glyphs/delete_x16.png
--------------------------------------------------------------------------------
/Resources/Glyphs/delete_x16_d.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Arvur/DelphiSettingManager/9f2f111b1d0c5a7ff64435f9ba2c32898138be82/Resources/Glyphs/delete_x16_d.png
--------------------------------------------------------------------------------
/Resources/Glyphs/delete_x16_h.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Arvur/DelphiSettingManager/9f2f111b1d0c5a7ff64435f9ba2c32898138be82/Resources/Glyphs/delete_x16_h.png
--------------------------------------------------------------------------------
/Resources/Glyphs/exit16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Arvur/DelphiSettingManager/9f2f111b1d0c5a7ff64435f9ba2c32898138be82/Resources/Glyphs/exit16.png
--------------------------------------------------------------------------------
/Resources/Glyphs/exit16_d.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Arvur/DelphiSettingManager/9f2f111b1d0c5a7ff64435f9ba2c32898138be82/Resources/Glyphs/exit16_d.png
--------------------------------------------------------------------------------
/Resources/Glyphs/exit16_h.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Arvur/DelphiSettingManager/9f2f111b1d0c5a7ff64435f9ba2c32898138be82/Resources/Glyphs/exit16_h.png
--------------------------------------------------------------------------------
/Resources/Glyphs/link16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Arvur/DelphiSettingManager/9f2f111b1d0c5a7ff64435f9ba2c32898138be82/Resources/Glyphs/link16.png
--------------------------------------------------------------------------------
/Resources/Glyphs/link16_d.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Arvur/DelphiSettingManager/9f2f111b1d0c5a7ff64435f9ba2c32898138be82/Resources/Glyphs/link16_d.png
--------------------------------------------------------------------------------
/Resources/Glyphs/link16_h.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Arvur/DelphiSettingManager/9f2f111b1d0c5a7ff64435f9ba2c32898138be82/Resources/Glyphs/link16_h.png
--------------------------------------------------------------------------------
/Resources/Glyphs/new_document16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Arvur/DelphiSettingManager/9f2f111b1d0c5a7ff64435f9ba2c32898138be82/Resources/Glyphs/new_document16.png
--------------------------------------------------------------------------------
/Resources/Glyphs/new_document16_d.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Arvur/DelphiSettingManager/9f2f111b1d0c5a7ff64435f9ba2c32898138be82/Resources/Glyphs/new_document16_d.png
--------------------------------------------------------------------------------
/Resources/Glyphs/new_document16_h.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Arvur/DelphiSettingManager/9f2f111b1d0c5a7ff64435f9ba2c32898138be82/Resources/Glyphs/new_document16_h.png
--------------------------------------------------------------------------------
/Resources/Glyphs/play_blue16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Arvur/DelphiSettingManager/9f2f111b1d0c5a7ff64435f9ba2c32898138be82/Resources/Glyphs/play_blue16.png
--------------------------------------------------------------------------------
/Resources/Glyphs/play_blue16_d.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Arvur/DelphiSettingManager/9f2f111b1d0c5a7ff64435f9ba2c32898138be82/Resources/Glyphs/play_blue16_d.png
--------------------------------------------------------------------------------
/Resources/Glyphs/play_blue16_h.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Arvur/DelphiSettingManager/9f2f111b1d0c5a7ff64435f9ba2c32898138be82/Resources/Glyphs/play_blue16_h.png
--------------------------------------------------------------------------------
/Resources/Glyphs/rename16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Arvur/DelphiSettingManager/9f2f111b1d0c5a7ff64435f9ba2c32898138be82/Resources/Glyphs/rename16.png
--------------------------------------------------------------------------------
/Resources/Glyphs/rename16_d.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Arvur/DelphiSettingManager/9f2f111b1d0c5a7ff64435f9ba2c32898138be82/Resources/Glyphs/rename16_d.png
--------------------------------------------------------------------------------
/Resources/Glyphs/rename16_h.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Arvur/DelphiSettingManager/9f2f111b1d0c5a7ff64435f9ba2c32898138be82/Resources/Glyphs/rename16_h.png
--------------------------------------------------------------------------------
/Resources/Glyphs/save16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Arvur/DelphiSettingManager/9f2f111b1d0c5a7ff64435f9ba2c32898138be82/Resources/Glyphs/save16.png
--------------------------------------------------------------------------------
/Resources/Glyphs/save16_d.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Arvur/DelphiSettingManager/9f2f111b1d0c5a7ff64435f9ba2c32898138be82/Resources/Glyphs/save16_d.png
--------------------------------------------------------------------------------
/Resources/Glyphs/save16_h.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Arvur/DelphiSettingManager/9f2f111b1d0c5a7ff64435f9ba2c32898138be82/Resources/Glyphs/save16_h.png
--------------------------------------------------------------------------------
/Resources/Glyphs/tick_green16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Arvur/DelphiSettingManager/9f2f111b1d0c5a7ff64435f9ba2c32898138be82/Resources/Glyphs/tick_green16.png
--------------------------------------------------------------------------------
/Resources/Glyphs/tick_green16_d.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Arvur/DelphiSettingManager/9f2f111b1d0c5a7ff64435f9ba2c32898138be82/Resources/Glyphs/tick_green16_d.png
--------------------------------------------------------------------------------
/Resources/Glyphs/tick_green16_h.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Arvur/DelphiSettingManager/9f2f111b1d0c5a7ff64435f9ba2c32898138be82/Resources/Glyphs/tick_green16_h.png
--------------------------------------------------------------------------------
/Resources/Glyphs/treeview_edit16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Arvur/DelphiSettingManager/9f2f111b1d0c5a7ff64435f9ba2c32898138be82/Resources/Glyphs/treeview_edit16.png
--------------------------------------------------------------------------------
/Resources/Glyphs/treeview_edit16_d.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Arvur/DelphiSettingManager/9f2f111b1d0c5a7ff64435f9ba2c32898138be82/Resources/Glyphs/treeview_edit16_d.png
--------------------------------------------------------------------------------
/Resources/Glyphs/treeview_edit16_h.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Arvur/DelphiSettingManager/9f2f111b1d0c5a7ff64435f9ba2c32898138be82/Resources/Glyphs/treeview_edit16_h.png
--------------------------------------------------------------------------------
/Resources/Icons/IDEs/16x16/BDS10.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Arvur/DelphiSettingManager/9f2f111b1d0c5a7ff64435f9ba2c32898138be82/Resources/Icons/IDEs/16x16/BDS10.ico
--------------------------------------------------------------------------------
/Resources/Icons/IDEs/16x16/BDS3.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Arvur/DelphiSettingManager/9f2f111b1d0c5a7ff64435f9ba2c32898138be82/Resources/Icons/IDEs/16x16/BDS3.ico
--------------------------------------------------------------------------------
/Resources/Icons/IDEs/16x16/BDS7.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Arvur/DelphiSettingManager/9f2f111b1d0c5a7ff64435f9ba2c32898138be82/Resources/Icons/IDEs/16x16/BDS7.ico
--------------------------------------------------------------------------------
/Resources/Icons/IDEs/16x16/C#.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Arvur/DelphiSettingManager/9f2f111b1d0c5a7ff64435f9ba2c32898138be82/Resources/Icons/IDEs/16x16/C#.ico
--------------------------------------------------------------------------------
/Resources/Icons/IDEs/16x16/D5.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Arvur/DelphiSettingManager/9f2f111b1d0c5a7ff64435f9ba2c32898138be82/Resources/Icons/IDEs/16x16/D5.ico
--------------------------------------------------------------------------------
/Resources/Icons/IDEs/16x16/D6.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Arvur/DelphiSettingManager/9f2f111b1d0c5a7ff64435f9ba2c32898138be82/Resources/Icons/IDEs/16x16/D6.ico
--------------------------------------------------------------------------------
/Resources/Icons/IDEs/16x16/D7.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Arvur/DelphiSettingManager/9f2f111b1d0c5a7ff64435f9ba2c32898138be82/Resources/Icons/IDEs/16x16/D7.ico
--------------------------------------------------------------------------------
/Resources/Icons/IDEs/16x16/D8.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Arvur/DelphiSettingManager/9f2f111b1d0c5a7ff64435f9ba2c32898138be82/Resources/Icons/IDEs/16x16/D8.ico
--------------------------------------------------------------------------------
/Resources/Icons/IDEs/BDS10.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Arvur/DelphiSettingManager/9f2f111b1d0c5a7ff64435f9ba2c32898138be82/Resources/Icons/IDEs/BDS10.ico
--------------------------------------------------------------------------------
/Resources/Icons/IDEs/BDS3.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Arvur/DelphiSettingManager/9f2f111b1d0c5a7ff64435f9ba2c32898138be82/Resources/Icons/IDEs/BDS3.ico
--------------------------------------------------------------------------------
/Resources/Icons/IDEs/BDS7.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Arvur/DelphiSettingManager/9f2f111b1d0c5a7ff64435f9ba2c32898138be82/Resources/Icons/IDEs/BDS7.ico
--------------------------------------------------------------------------------
/Resources/Icons/IDEs/C#.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Arvur/DelphiSettingManager/9f2f111b1d0c5a7ff64435f9ba2c32898138be82/Resources/Icons/IDEs/C#.ico
--------------------------------------------------------------------------------
/Resources/Icons/IDEs/D5.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Arvur/DelphiSettingManager/9f2f111b1d0c5a7ff64435f9ba2c32898138be82/Resources/Icons/IDEs/D5.ico
--------------------------------------------------------------------------------
/Resources/Icons/IDEs/D6.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Arvur/DelphiSettingManager/9f2f111b1d0c5a7ff64435f9ba2c32898138be82/Resources/Icons/IDEs/D6.ico
--------------------------------------------------------------------------------
/Resources/Icons/IDEs/D7.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Arvur/DelphiSettingManager/9f2f111b1d0c5a7ff64435f9ba2c32898138be82/Resources/Icons/IDEs/D7.ico
--------------------------------------------------------------------------------
/Resources/Icons/IDEs/D8.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Arvur/DelphiSettingManager/9f2f111b1d0c5a7ff64435f9ba2c32898138be82/Resources/Icons/IDEs/D8.ico
--------------------------------------------------------------------------------
/Resources/Icons/Main.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Arvur/DelphiSettingManager/9f2f111b1d0c5a7ff64435f9ba2c32898138be82/Resources/Icons/Main.ico
--------------------------------------------------------------------------------
/Source/DelphiSettingEditor.pas:
--------------------------------------------------------------------------------
1 | unit DelphiSettingEditor;
2 |
3 | interface
4 |
5 | uses
6 | Classes, Registry, SysUtils;
7 |
8 | type
9 | TStringArray = array of string;
10 |
11 | IDelphiSettingKeys = interface
12 | ['{B910A6AD-9BEB-4540-A17B-4D099E7B7AE9}']
13 | function GetSettingPath : string;
14 | function GetCurrentPath : string;
15 | function GetOnCurrentKeyChanged : TNotifyEvent;
16 | procedure SetOnCurrentKeyChanged (const Value : TNotifyEvent);
17 | procedure SetCurrentPath (const APath : string);
18 |
19 | function GetParent (const APath : string) : string;
20 | procedure GetChild (const APath : string; out StringArray : TStringArray);
21 |
22 | procedure OpenSetting (const SettingPath : string);
23 | procedure RefreshCurrentKey (const Recursive : boolean = false);
24 |
25 | function DeleteCurrentKey : string;
26 | procedure AddKey (const APath : string);
27 |
28 | property SettingPath : string read GetSettingPath;
29 | property CurrentPath : string read GetcurrentPath write SetCurrentPath;
30 | property OnCurrentKeyChanged : TNotifyEvent read GetOnCurrentKeyChanged
31 | write SetOnCurrentKeyChanged;
32 | end;
33 |
34 | TDelphiSettingKeys = class (TInterfacedObject, IDelphiSettingKeys)
35 | private
36 | FSettingPath : string;
37 | FNodes : TStringList;
38 | FReg : TRegistry;
39 | FCurrentIndex : integer;
40 | FOnCurrentKeyChanged : TNotifyEvent;
41 |
42 | procedure BuildNodes;
43 | protected
44 | function GetNodeCount : integer;
45 | function GetSettingPath : string;
46 | function GetCurrentPath : string;
47 | function GetOnCurrentKeyChanged : TNotifyEvent;
48 | procedure SetOnCurrentKeyChanged (const Value : TNotifyEvent);
49 | procedure SetCurrentPath (const APath : string);
50 |
51 | function GetParent (const APath : string) : string;
52 | procedure GetChild (const APath : string; out StringArray : TStringArray);
53 |
54 | procedure OpenSetting (const SettingPath : string);
55 | procedure RefreshCurrentKey (const Recursive : boolean = false);
56 |
57 | function DeleteCurrentKey : string;
58 | procedure AddKey (const APath : string);
59 |
60 | public
61 | constructor Create (const APath : string);
62 | destructor Destroy; override;
63 | end;
64 |
65 | implementation
66 |
67 | uses
68 | Contnrs;
69 |
70 | const
71 | NO_CURRENT = -2;
72 | ROOT = -1;
73 |
74 | function GetLastDelimiterIndex (const AValue : string): integer;
75 | const
76 | DELIMITER = '\';
77 | begin
78 | Result := LastDelimiter (DELIMITER, AValue);
79 |
80 | if Result > 1 then
81 | if AValue [Result - 1] = DELIMITER then
82 | Result := GetLastDelimiterIndex (Copy (AValue, 1, Result - 2));
83 |
84 | end;
85 |
86 | function NameValueCompare(List: TStringList; Index1, Index2: Integer): Integer;
87 | begin
88 | Result := AnsiCompareText (List.Names[Index1], List.Names[Index2]);
89 |
90 | if Result = 0 then
91 | Result := AnsiCompareText (List.ValueFromIndex[Index1],
92 | List.ValueFromIndex[Index2]);
93 | end;
94 |
95 | { TDelphiSettingKeys }
96 |
97 | constructor TDelphiSettingKeys.Create(const APath: string);
98 | begin
99 | inherited Create;
100 | FNodes := TStringList.Create;
101 | FReg := TRegistry.Create;
102 | FCurrentIndex := NO_CURRENT;
103 | OpenSetting (APath);
104 | end;
105 |
106 | destructor TDelphiSettingKeys.Destroy;
107 | begin
108 | if Assigned (FNodes) then
109 | FNodes.Free;
110 |
111 | inherited;
112 | end;
113 |
114 | function TDelphiSettingKeys.GetNodeCount: integer;
115 | begin
116 | Result := FNodes.Count;
117 |
118 | if SameText (FSettingPath, EmptyStr) = false then
119 | Inc (Result);
120 | end;
121 |
122 | procedure TDelphiSettingKeys.SetOnCurrentKeyChanged(
123 | const Value: TNotifyEvent);
124 | begin
125 | FOnCurrentKeyChanged := Value;
126 | end;
127 |
128 | function TDelphiSettingKeys.GetSettingPath: string;
129 | begin
130 | Result := FSettingPath;
131 | end;
132 |
133 | function TDelphiSettingKeys.GetOnCurrentKeyChanged: TNotifyEvent;
134 | begin
135 | Result := self.FOnCurrentKeyChanged;
136 | end;
137 |
138 | procedure TDelphiSettingKeys.OpenSetting(const SettingPath: string);
139 | begin
140 | FSettingPath := ExcludeTrailingBackslash (SettingPath);
141 |
142 | //It is important to include backslash at the beginning. The path is always a
143 | //full path under HKCU. Without backslash in the beginning, Regedit.OpenKey
144 | //may try to open a sub key under the current key.
145 | if SameText (FSettingPath[1], '\') = false then
146 | FSettingPath := '\' + FSettingPath;
147 |
148 | if FReg.OpenKey(FSettingPath, false) = false then
149 | raise Exception.Create (FSettingPath + ' does not exist.');
150 |
151 | if Assigned (FOnCurrentKeyChanged) then
152 | FOnCurrentKeyChanged (self);
153 | end;
154 |
155 | procedure TDelphiSettingKeys.RefreshCurrentKey (
156 | const Recursive : boolean = false);
157 | const
158 | NODE_FORMAT = '%s\%s';
159 | var
160 | KeyQueue,
161 | SubKeyList : TStringList;
162 | KeyToProcess : string;
163 | Loop : integer;
164 | begin
165 | KeyQueue := TStringList.Create;
166 | SubKeyList := TStringList.Create;
167 | FNodes.BeginUpdate;
168 | try
169 | Loop := self.FCurrentIndex + 1;
170 |
171 | while Pos (GetCurrentPath, FNodes [Loop]) = 1 do
172 | FNodes.Delete (Loop);
173 |
174 | KeyQueue.Add (GetCurrentPath);
175 |
176 | repeat
177 | KeyToProcess := KeyQueue[0];
178 | KeyQueue.Delete (0);
179 |
180 | if FReg.OpenKeyReadOnly (KeyToProcess) = false then
181 | raise Exception.Create ('Failed opening ' + KeyToProcess);
182 |
183 | FReg.GetKeyNames (SubKeyList);
184 |
185 | for Loop := 0 to SubKeyList.Count - 1 do begin
186 | KeyQueue.Add (Format (NODE_FORMAT, [KeyToProcess, SubKeyList[Loop]]));
187 | FNodes.Add (Format (NODE_FORMAT, [KeyToProcess, SubKeyList[Loop]]));
188 | end
189 |
190 | until (KeyQueue.Count = 0) or (Recursive = false);
191 |
192 | finally
193 | FNodes.EndUpdate;
194 | KeyQueue.Free;
195 | SubKeyList.Free;
196 | end;
197 | end;
198 |
199 | procedure TDelphiSettingKeys.BuildNodes;
200 | begin
201 | end;
202 |
203 | function TDelphiSettingKeys.GetCurrentPath: string;
204 | begin
205 | Result := '\' + self.FReg.CurrentPath;
206 | end;
207 |
208 | procedure TDelphiSettingKeys.SetCurrentPath(const APath: string);
209 | var
210 | NodeIndex,
211 | LastDelimiterIndex : integer;
212 | str : string;
213 | begin
214 | if FReg.OpenKey (APath, false) = false then
215 | raise Exception.Create (APath + ' not found.');
216 |
217 | if Assigned (self.FOnCurrentKeyChanged) then
218 | FOncurrentKeyChanged (self);
219 |
220 | end;
221 |
222 | procedure TDelphiSettingKeys.AddKey(const APath: string);
223 | var
224 | CorrectedPath : string;
225 | begin
226 | CorrectedPath := ExcludeTrailingBackslash (APath);
227 |
228 | if CorrectedPath[1] <> '\' then
229 | CorrectedPath := '\' + CorrectedPath;
230 |
231 | if FReg.KeyExists (CorrectedPath) = false then
232 | if FReg.CreateKey (CorrectedPath) = false then
233 | raise Exception.Create('Cannot Create ' + CorrectedPath);
234 |
235 | FReg.OpenKey (CorrectedPath, false);
236 |
237 | if Assigned (self.FOnCurrentKeyChanged) then
238 | FOncurrentKeyChanged (self);
239 | end;
240 |
241 | function TDelphiSettingKeys.DeleteCurrentKey : string;
242 | var
243 | ParentPath : string;
244 | IsRootPath : boolean;
245 | begin
246 | IsRootPath := SameText (GetCurrentPath, FSettingPath);
247 |
248 | if FReg.DeleteKey (GetCurrentPath) = false then
249 | raise Exception.Create ('Failed to delete ' + GetCurrentPath);
250 |
251 | ParentPath := self.GetParent (GetCurrentPath);
252 | self.SetCurrentPath (ParentPath);
253 | Result := self.GetCurrentPath;
254 | end;
255 |
256 | procedure TDelphiSettingKeys.GetChild(const APath: string;
257 | out StringArray: TStringArray);
258 | var
259 | CurrentPath : string;
260 | List : TStringList;
261 | Loop : integer;
262 | begin
263 | CurrentPath := self.GetCurrentPath;
264 | List := TStringList.Create;
265 | try
266 | if FReg.OpenKey (APath, false) = false then
267 | raise Exception.Create ('Error opening ' + APath);
268 |
269 | FReg.GetKeyNames(List);
270 | SetLength (StringArray, List.Count);
271 |
272 | for Loop := 0 to List.Count - 1 do
273 | StringArray[Loop] := List[Loop];
274 | finally
275 | List.Free;
276 | end;
277 |
278 | end;
279 |
280 | function TDelphiSettingKeys.GetParent(const APath: string): string;
281 | begin
282 | Result := Copy (APath, 1, GetLastDelimiterIndex (APath));
283 | end;
284 |
285 | end.
286 |
287 | procedure TForm1.Button1Click(Sender: TObject);
288 | var
289 | DSK : DelphiSettingEditor.IDelphiSettingKeys;
290 | Childs : TStringArray;
291 | List : TStringList;
292 | ParentNode : TTreeNode;
293 | ChildStr,
294 | str : string;
295 | begin
296 | DSK := TDelphiSettingKeys.Create('Software\Borland\CustomSettings\BDS3\Barebone\3.0\');
297 | List := TStringList.Create;
298 | try
299 | ParentNode := self.TreeView1.Items.AddChild (nil, DSK.CurrentPath);
300 | List.AddObject(DSK.CurrentPath, ParentNode);
301 |
302 | while List.Count > 0 do begin
303 | str := List [0];
304 | ParentNode := List.Objects[0] as TTreeNode;
305 | List.Delete (0);
306 | DSK.GetChild (str, Childs);
307 |
308 | for ChildStr in Childs do begin
309 | List.AddObject (str + '\' + ChildStr,
310 | TreeView1.Items.AddChild (ParentNode, ChildStr));
311 | end;
312 | end;
313 | finally
314 | List.Free;
315 | end;
316 | end;
317 |
318 |
--------------------------------------------------------------------------------
/Source/DelphiSettingRegistry.pas:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Arvur/DelphiSettingManager/9f2f111b1d0c5a7ff64435f9ba2c32898138be82/Source/DelphiSettingRegistry.pas
--------------------------------------------------------------------------------
/Source/LayoutPersistent.pas:
--------------------------------------------------------------------------------
1 | unit LayoutPersistent;
2 |
3 | interface
4 |
5 | type
6 | ILayout = interface
7 | ['{37C7A7D1-7F08-4D69-BDDE-E500AF42BE6A}']
8 | function GetLayoutName : string;
9 | procedure SetLayoutName (const ALayoutName : string);
10 |
11 | function GetValue (const AValueName) : Variant;
12 | procedure SetValue (const AValueName : string; const AValue : Variant);
13 | property LayoutName : string read GetLayoutName write SetLayoutName;
14 | end;
15 |
16 | IFormLayout = interface
17 | ['{70968724-5020-4E5E-9013-8154C46A5D8C}']
18 | function GetTop : integer;
19 | function GetLeft : integer;
20 | function GetWidth : integer;
21 | function GetHeight : integer;
22 | procedure SetTop (const AValue : integer);
23 | procedure SetLeft (const AValue : integer);
24 | procedure SetWidth (const AValue : integer);
25 | procedure SetHeight (const AValue : integer);
26 |
27 | property Top : integer read GetTop write SetTop;
28 | property Left : integer read GetLeft write SetLeft;
29 | property Width : integer read GetWidth write SetWidth;
30 | property Height : integer read GetHeight write SetHeight;
31 | end;
32 |
33 | ILayoutPersistentManager = interface
34 | ['{B910B21F-D2BC-4768-98FE-245A8C7E5200}']
35 | procedure SaveLayout (const Layout : ILayout);
36 | procedure ReadLayout (const LayoutName : string; out Layout : ILayout);
37 | end;
38 |
39 | implementation
40 |
41 | end.
42 |
--------------------------------------------------------------------------------
/Source/LoadSaveCustomSetting.pas:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Arvur/DelphiSettingManager/9f2f111b1d0c5a7ff64435f9ba2c32898138be82/Source/LoadSaveCustomSetting.pas
--------------------------------------------------------------------------------
/Source/SettingCollection.pas:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Arvur/DelphiSettingManager/9f2f111b1d0c5a7ff64435f9ba2c32898138be82/Source/SettingCollection.pas
--------------------------------------------------------------------------------
/Source/SettingPersistent.pas:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Arvur/DelphiSettingManager/9f2f111b1d0c5a7ff64435f9ba2c32898138be82/Source/SettingPersistent.pas
--------------------------------------------------------------------------------
/Source/SettingTemplate.pas:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Arvur/DelphiSettingManager/9f2f111b1d0c5a7ff64435f9ba2c32898138be82/Source/SettingTemplate.pas
--------------------------------------------------------------------------------
/Source/ShellUtilities.pas:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Arvur/DelphiSettingManager/9f2f111b1d0c5a7ff64435f9ba2c32898138be82/Source/ShellUtilities.pas
--------------------------------------------------------------------------------
/Source/TreeViewController.pas:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Arvur/DelphiSettingManager/9f2f111b1d0c5a7ff64435f9ba2c32898138be82/Source/TreeViewController.pas
--------------------------------------------------------------------------------
/Source/ValueNamesProvider.pas:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Arvur/DelphiSettingManager/9f2f111b1d0c5a7ff64435f9ba2c32898138be82/Source/ValueNamesProvider.pas
--------------------------------------------------------------------------------
/Source/dmGlyphs.pas:
--------------------------------------------------------------------------------
1 | unit dmGlyphs;
2 |
3 | interface
4 |
5 | uses
6 | SysUtils, Classes, ImgList, Controls;
7 |
8 | type
9 | Tdm_Glyphs = class(TDataModule)
10 | iLst_Buttons: TImageList;
11 | private
12 | { Private declarations }
13 | public
14 | { Public declarations }
15 | end;
16 |
17 | var
18 | dm_Glyphs: Tdm_Glyphs;
19 |
20 | implementation
21 |
22 | {$R *.dfm}
23 |
24 | end.
25 |
--------------------------------------------------------------------------------
/Source/fAbout.dfm:
--------------------------------------------------------------------------------
1 | object frmAbout: TfrmAbout
2 | Left = 0
3 | Top = 0
4 | BorderIcons = []
5 | BorderStyle = bsDialog
6 | Caption = 'About'
7 | ClientHeight = 192
8 | ClientWidth = 279
9 | Color = clBtnFace
10 | Font.Charset = DEFAULT_CHARSET
11 | Font.Color = clWindowText
12 | Font.Height = -11
13 | Font.Name = 'Tahoma'
14 | Font.Style = []
15 | OldCreateOrder = False
16 | Position = poOwnerFormCenter
17 | Scaled = False
18 | PixelsPerInch = 96
19 | TextHeight = 13
20 | object lblBlog: TLabel
21 | Left = 8
22 | Top = 56
23 | Width = 189
24 | Height = 16
25 | Caption = 'http://blogs.slcdug.org/esaputra'
26 | Font.Charset = DEFAULT_CHARSET
27 | Font.Color = clBlue
28 | Font.Height = -13
29 | Font.Name = 'MS Sans Serif'
30 | Font.Style = []
31 | ParentFont = False
32 | OnClick = lblBlogClick
33 | end
34 | object lblCodeline: TLabel
35 | Left = 8
36 | Top = 40
37 | Width = 135
38 | Height = 16
39 | Caption = 'http://www.codeline.net'
40 | Font.Charset = DEFAULT_CHARSET
41 | Font.Color = clBlue
42 | Font.Height = -13
43 | Font.Name = 'MS Sans Serif'
44 | Font.Style = []
45 | ParentFont = False
46 | OnClick = lblCodelineClick
47 | end
48 | object lblGemmellCom: TLabel
49 | Left = 8
50 | Top = 112
51 | Width = 159
52 | Height = 16
53 | Caption = 'http://lachlan.gemmell.com'
54 | Font.Charset = DEFAULT_CHARSET
55 | Font.Color = clBlue
56 | Font.Height = -13
57 | Font.Name = 'MS Sans Serif'
58 | Font.Style = []
59 | ParentFont = False
60 | OnClick = lblGemmellComClick
61 | end
62 | object btn_Ok: TButton
63 | Left = 196
64 | Top = 159
65 | Width = 75
66 | Height = 25
67 | Cancel = True
68 | Caption = 'OK'
69 | Default = True
70 | DisabledImageIndex = 25
71 | DoubleBuffered = True
72 | HotImageIndex = 26
73 | ImageIndex = 24
74 | ImageMargins.Left = 10
75 | Images = dm_Glyphs.iLst_Buttons
76 | ModalResult = 1
77 | ParentDoubleBuffered = False
78 | TabOrder = 0
79 | end
80 | object StaticText1: TStaticText
81 | Left = 8
82 | Top = 8
83 | Width = 179
84 | Height = 20
85 | Caption = 'Delphi Setting Manager 1.1'
86 | Font.Charset = DEFAULT_CHARSET
87 | Font.Color = clWindowText
88 | Font.Height = -13
89 | Font.Name = 'Tahoma'
90 | Font.Style = [fsBold]
91 | ParentFont = False
92 | TabOrder = 1
93 | end
94 | object StaticText2: TStaticText
95 | Left = 8
96 | Top = 24
97 | Width = 208
98 | Height = 20
99 | Caption = 'Copyright '#169' Erwien Saputra (2005)'
100 | Font.Charset = DEFAULT_CHARSET
101 | Font.Color = clWindowText
102 | Font.Height = -13
103 | Font.Name = 'Tahoma'
104 | Font.Style = []
105 | ParentFont = False
106 | TabOrder = 2
107 | end
108 | object StaticText3: TStaticText
109 | Left = 8
110 | Top = 80
111 | Width = 65
112 | Height = 20
113 | Caption = 'Thanks to:'
114 | Font.Charset = DEFAULT_CHARSET
115 | Font.Color = clWindowText
116 | Font.Height = -13
117 | Font.Name = 'Tahoma'
118 | Font.Style = []
119 | ParentFont = False
120 | TabOrder = 3
121 | end
122 | object StaticText4: TStaticText
123 | Left = 8
124 | Top = 96
125 | Width = 167
126 | Height = 20
127 | Caption = 'Lachlan Gemmell (Edit form)'
128 | Font.Charset = DEFAULT_CHARSET
129 | Font.Color = clWindowText
130 | Font.Height = -13
131 | Font.Name = 'Tahoma'
132 | Font.Style = []
133 | ParentFont = False
134 | TabOrder = 4
135 | end
136 | end
137 |
--------------------------------------------------------------------------------
/Source/fAbout.pas:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Arvur/DelphiSettingManager/9f2f111b1d0c5a7ff64435f9ba2c32898138be82/Source/fAbout.pas
--------------------------------------------------------------------------------
/Source/fEditSetting.dfm:
--------------------------------------------------------------------------------
1 | object frmEditSetting: TfrmEditSetting
2 | Left = 0
3 | Top = 0
4 | Caption = 'Edit Setting'
5 | ClientHeight = 490
6 | ClientWidth = 670
7 | Color = clBtnFace
8 | Font.Charset = DEFAULT_CHARSET
9 | Font.Color = clWindowText
10 | Font.Height = -11
11 | Font.Name = 'Tahoma'
12 | Font.Style = []
13 | OldCreateOrder = False
14 | Position = poDesktopCenter
15 | Scaled = False
16 | OnResize = FormResize
17 | PixelsPerInch = 96
18 | TextHeight = 13
19 | object Splitter1: TSplitter
20 | Left = 0
21 | Top = 225
22 | Width = 670
23 | Height = 8
24 | Cursor = crVSplit
25 | Align = alTop
26 | end
27 | object pnlTop: TPanel
28 | Left = 0
29 | Top = 0
30 | Width = 670
31 | Height = 225
32 | Align = alTop
33 | BevelOuter = bvNone
34 | TabOrder = 0
35 | object spTree: TSplitter
36 | Left = 332
37 | Top = 0
38 | Width = 8
39 | Height = 225
40 | OnCanResize = spTreeCanResize
41 | OnMoved = spTreeMoved
42 | end
43 | object pnlLeft: TPanel
44 | Left = 0
45 | Top = 0
46 | Width = 332
47 | Height = 225
48 | Align = alLeft
49 | Anchors = [akLeft, akTop, akRight, akBottom]
50 | BevelOuter = bvNone
51 | TabOrder = 0
52 | object lblLeft: TLabel
53 | Left = 0
54 | Top = 0
55 | Width = 332
56 | Height = 16
57 | Align = alTop
58 | Caption = 'lblLeft'
59 | Font.Charset = DEFAULT_CHARSET
60 | Font.Color = clWindowText
61 | Font.Height = -13
62 | Font.Name = 'Tahoma'
63 | Font.Style = []
64 | ParentFont = False
65 | end
66 | object tvLeft: TTreeView
67 | Left = 0
68 | Top = 39
69 | Width = 332
70 | Height = 186
71 | Align = alClient
72 | HideSelection = False
73 | Images = imgTree
74 | Indent = 19
75 | PopupMenu = popLeftTree
76 | ReadOnly = True
77 | TabOrder = 0
78 | OnGetImageIndex = tvLeftGetImageIndex
79 | OnGetSelectedIndex = tvLeftGetSelectedIndex
80 | OnKeyDown = TreeViewKeyDown
81 | end
82 | object atbLeftKey: TActionToolBar
83 | Left = 0
84 | Top = 16
85 | Width = 332
86 | Height = 23
87 | ActionManager = acmKeyValue
88 | Caption = 'atbLeftKey'
89 | ColorMap.HighlightColor = 15660791
90 | ColorMap.BtnSelectedColor = clBtnFace
91 | ColorMap.UnusedColor = 15660791
92 | EdgeInner = esNone
93 | Spacing = 0
94 | end
95 | end
96 | object pnlRight: TPanel
97 | Left = 340
98 | Top = 0
99 | Width = 330
100 | Height = 225
101 | Align = alClient
102 | BevelOuter = bvNone
103 | TabOrder = 1
104 | object lblRight: TLabel
105 | Left = 0
106 | Top = 0
107 | Width = 330
108 | Height = 16
109 | Align = alTop
110 | Caption = 'lblRight'
111 | Font.Charset = DEFAULT_CHARSET
112 | Font.Color = clWindowText
113 | Font.Height = -13
114 | Font.Name = 'Tahoma'
115 | Font.Style = []
116 | ParentFont = False
117 | end
118 | object tvRight: TTreeView
119 | Left = 0
120 | Top = 39
121 | Width = 330
122 | Height = 186
123 | Align = alClient
124 | HideSelection = False
125 | Images = imgTree
126 | Indent = 19
127 | PopupMenu = PoRightTree
128 | ReadOnly = True
129 | TabOrder = 0
130 | OnGetImageIndex = tvLeftGetImageIndex
131 | OnGetSelectedIndex = tvLeftGetSelectedIndex
132 | OnKeyDown = TreeViewKeyDown
133 | end
134 | object atbRightKey: TActionToolBar
135 | Left = 0
136 | Top = 16
137 | Width = 330
138 | Height = 23
139 | ActionManager = acmKeyValue
140 | Caption = 'atbRightKey'
141 | ColorMap.HighlightColor = 15660791
142 | ColorMap.BtnSelectedColor = clBtnFace
143 | ColorMap.UnusedColor = 15660791
144 | EdgeInner = esNone
145 | Spacing = 0
146 | end
147 | end
148 | end
149 | object pnlBottom: TPanel
150 | Left = 0
151 | Top = 233
152 | Width = 670
153 | Height = 214
154 | Align = alClient
155 | TabOrder = 1
156 | object spValues: TSplitter
157 | Left = 331
158 | Top = 1
159 | Width = 8
160 | Height = 212
161 | OnCanResize = spTreeCanResize
162 | OnMoved = spTreeMoved
163 | end
164 | object pnlValuesLeft: TPanel
165 | Left = 1
166 | Top = 1
167 | Width = 330
168 | Height = 212
169 | Align = alLeft
170 | BevelOuter = bvNone
171 | TabOrder = 0
172 | object lbLeftValues: TListBox
173 | Left = 0
174 | Top = 23
175 | Width = 330
176 | Height = 150
177 | Align = alTop
178 | Anchors = [akLeft, akTop, akRight, akBottom]
179 | Font.Charset = DEFAULT_CHARSET
180 | Font.Color = clWindowText
181 | Font.Height = -11
182 | Font.Name = 'Courier'
183 | Font.Style = []
184 | ItemHeight = 13
185 | ParentFont = False
186 | PopupMenu = popLeftValue
187 | TabOrder = 0
188 | OnClick = lbLeftValuesClick
189 | OnKeyDown = ValueNamesKeyDown
190 | end
191 | object memValueLeft: TMemo
192 | Left = 0
193 | Top = 173
194 | Width = 330
195 | Height = 39
196 | Align = alClient
197 | Font.Charset = DEFAULT_CHARSET
198 | Font.Color = clWindowText
199 | Font.Height = -11
200 | Font.Name = 'Courier'
201 | Font.Style = []
202 | ParentFont = False
203 | PopupMenu = popLeftMemo
204 | ReadOnly = True
205 | TabOrder = 1
206 | end
207 | object atbLeftNames: TActionToolBar
208 | Left = 0
209 | Top = 0
210 | Width = 330
211 | Height = 23
212 | ActionManager = acmKeyValue
213 | AllowHiding = False
214 | Caption = 'atbLeftNames'
215 | ColorMap.HighlightColor = 15660791
216 | ColorMap.BtnSelectedColor = clBtnFace
217 | ColorMap.UnusedColor = 15660791
218 | EdgeInner = esNone
219 | Spacing = 0
220 | end
221 | end
222 | object pnlValuesRight: TPanel
223 | Left = 339
224 | Top = 1
225 | Width = 330
226 | Height = 212
227 | Align = alClient
228 | BevelOuter = bvNone
229 | TabOrder = 1
230 | object lbRightValues: TListBox
231 | Left = 0
232 | Top = 23
233 | Width = 330
234 | Height = 150
235 | Align = alTop
236 | Anchors = [akLeft, akTop, akRight, akBottom]
237 | Font.Charset = DEFAULT_CHARSET
238 | Font.Color = clWindowText
239 | Font.Height = -11
240 | Font.Name = 'Courier'
241 | Font.Style = []
242 | ItemHeight = 13
243 | ParentFont = False
244 | PopupMenu = popRightValues
245 | TabOrder = 0
246 | OnClick = lbLeftValuesClick
247 | OnKeyDown = ValueNamesKeyDown
248 | end
249 | object memValueRight: TMemo
250 | Left = 0
251 | Top = 173
252 | Width = 330
253 | Height = 39
254 | Align = alClient
255 | Font.Charset = DEFAULT_CHARSET
256 | Font.Color = clWindowText
257 | Font.Height = -11
258 | Font.Name = 'Courier'
259 | Font.Style = []
260 | ParentFont = False
261 | PopupMenu = popRightMemo
262 | ReadOnly = True
263 | TabOrder = 1
264 | end
265 | object atbRightNames: TActionToolBar
266 | Left = 0
267 | Top = 0
268 | Width = 330
269 | Height = 23
270 | ActionManager = acmKeyValue
271 | AllowHiding = False
272 | Caption = 'atbRightNames'
273 | ColorMap.HighlightColor = 15660791
274 | ColorMap.BtnSelectedColor = clBtnFace
275 | ColorMap.UnusedColor = 15660791
276 | EdgeInner = esNone
277 | Spacing = 0
278 | end
279 | end
280 | end
281 | object pnlButton: TPanel
282 | Left = 0
283 | Top = 447
284 | Width = 670
285 | Height = 43
286 | Align = alBottom
287 | DoubleBuffered = True
288 | Padding.Top = 8
289 | Padding.Right = 8
290 | Padding.Bottom = 8
291 | ParentDoubleBuffered = False
292 | TabOrder = 2
293 | object btnClose: TButton
294 | Left = 586
295 | Top = 9
296 | Width = 75
297 | Height = 25
298 | Align = alRight
299 | Cancel = True
300 | Caption = '&Close'
301 | Default = True
302 | DisabledImageIndex = 22
303 | HotImageIndex = 23
304 | ImageIndex = 21
305 | ImageMargins.Left = 5
306 | Images = dm_Glyphs.iLst_Buttons
307 | ModalResult = 11
308 | TabOrder = 0
309 | end
310 | end
311 | object imgTree: TImageList
312 | Left = 224
313 | Top = 88
314 | Bitmap = {
315 | 494C010102000400080010001000FFFFFFFFFF10FFFFFFFFFFFFFFFF424D3600
316 | 0000000000003600000028000000400000001000000001002000000000000010
317 | 00000000000000000000000000000000000000000000008CBD00008CBD00008C
318 | BD00008CBD00008CBD00008CBD00008CBD00008CBD00008CBD00008CBD00008C
319 | BD00008CBD00008CBD00000000000000000000000000008CBD00008CBD00008C
320 | BD00008CBD00008CBD00008CBD00008CBD00008CBD00008CBD00008CBD00008C
321 | BD00008CBD000000000000000000000000000000000000000000000000000000
322 | 0000000000000000000000000000000000000000000000000000000000000000
323 | 0000000000000000000000000000000000000000000000000000000000000000
324 | 0000000000000000000000000000000000000000000000000000000000000000
325 | 000000000000000000000000000000000000008CBD0063CEF700008CBD00A5F7
326 | FF0063CEF70063CEF70063CEF70063CEF70063CEF70063CEF70063CEF70063CE
327 | F70039ADDE00ADF7FF00008CBD0000000000008CBD0021A5CE005ACEEF0084E7
328 | FF0063CEF70063CEF70063CEF70063CEF70063CEF70063CEF70063CEF70063CE
329 | F70039ADDE001094C60000000000000000000000000000000000000000000000
330 | 0000000000000000000000000000000000000000000000000000000000000000
331 | 0000000000000000000000000000000000000000000000000000000000000000
332 | 0000000000000000000000000000000000000000000000000000000000000000
333 | 000000000000000000000000000000000000008CBD006BD6F700008CBD00ADF7
334 | FF006BD6FF006BD6FF006BD6FF006BD6FF006BD6FF006BD6FF006BD6FF006BD6
335 | FF0039ADDE00BDEFF700008CBD0000000000008CBD004ABDE70031ADD60094EF
336 | FF006BD6FF006BD6FF006BD6FF006BD6FF006BD6FF006BD6FF006BD6FF006BD6
337 | FF0039B5DE00CEF7FF00008CBD00000000000000000000000000000000000000
338 | 0000000000000000000000000000000000000000000000000000000000000000
339 | 0000000000000000000000000000000000000000000000000000000000000000
340 | 0000000000000000000000000000000000000000000000000000000000000000
341 | 000000000000000000000000000000000000008CBD0073D6FF00008CBD00ADF7
342 | FF007BDEFF007BDEFF007BDEFF007BDEFF007BDEFF007BDEFF007BDEFF007BDE
343 | FF0042B5DE00BDEFF700008CBD0000000000008CBD0073D6FF00008CBD00ADFF
344 | FF007BDEFF007BDEFF007BDEFF007BDEFF007BDEFF007BDEFF007BDEFF007BDE
345 | FF0042B5DE00CEF7FF00008CBD00000000000000000000000000000000000000
346 | 0000000000000000000000000000000000000000000000000000000000000000
347 | 0000000000000000000000000000000000000000000000000000000000000000
348 | 0000000000000000000000000000000000000000000000000000000000000000
349 | 000000000000000000000000000000000000008CBD007BDEFF00008CBD00B5F7
350 | FF0084E7FF0084E7FF0084E7FF0084E7FF0084E7FF0084E7FF0084E7FF0084E7
351 | FF0042B5DE00C6F7F700008CBD0000000000008CBD007BDEFF001094C60094EF
352 | FF0094EFFF0084E7FF0084E7FF0084E7FF0084E7FF0084E7FF0084E7FF0084E7
353 | FF004ABDE700CEF7FF001094C600000000000000000000000000000000000000
354 | 0000000000000000000000000000000000000000000000000000000000000000
355 | 0000000000000000000000000000000000000000000000000000000000000000
356 | 0000000000000000000000000000000000000000000000000000000000000000
357 | 000000000000000000000000000000000000008CBD0084E7FF00008CBD00BDF7
358 | FF008CEFFF008CEFFF008CEFFF008CEFFF008CEFFF008CEFFF008CEFFF008CEF
359 | FF004ABDE700BDF7FF00008CBD0000000000008CBD0084E7FF0042B5DE005AC6
360 | EF00ADFFFF008CEFFF008CEFFF008CEFFF008CEFFF008CEFFF008CEFFF008CEF
361 | FF004ABDE700CEF7FF00CEF7FF00008CBD000000000000000000000000000000
362 | 0000000000000000000000000000000000000000000000000000000000000000
363 | 0000000000000000000000000000000000000000000000000000000000000000
364 | 0000000000000000000000000000000000000000000000000000000000000000
365 | 000000000000000000000000000000000000008CBD008CEFFF00008CBD00D6F7
366 | FF00CEF7FF00CEF7FF00CEF7FF00CEF7FF00CEF7FF00CEF7FF00CEF7FF00CEF7
367 | FF00BDDEDE00D6F7FF00008CBD0000000000008CBD008CE7FF007BDEFF0021A5
368 | CE00E7FFFF00CEF7FF00CEF7FF00CEF7FF00CEF7FF00CEF7FF00CEF7FF00CEF7
369 | FF0094EFFF00E7FFFF00CEF7FF00008CBD000000000000000000000000000000
370 | 0000000000000000000000000000000000000000000000000000000000000000
371 | 0000000000000000000000000000000000000000000000000000000000000000
372 | 0000000000000000000000000000000000000000000000000000000000000000
373 | 000000000000000000000000000000000000008CBD0094F7FF00008CBD00008C
374 | BD00008CBD00008CBD00008CBD00008CBD00008CBD00008CBD00008CBD00008C
375 | BD00008CBD00008CBD00008CBD0000000000008CBD0094F7FF0094F7FF001094
376 | C600008CBD00008CBD00008CBD00008CBD00008CBD00008CBD00008CBD00008C
377 | BD00008CBD00008CBD00008CBD00008CBD000000000000000000000000000000
378 | 0000000000000000000000000000000000000000000000000000000000000000
379 | 0000000000000000000000000000000000000000000000000000000000000000
380 | 0000000000000000000000000000000000000000000000000000000000000000
381 | 000000000000000000000000000000000000008CBD009CF7FF009CF7FF009CF7
382 | FF009CF7FF009CF7FF009CF7FF009CF7FF009CF7FF009CF7FF009CF7FF009CF7
383 | FF00008CBD00000000000000000000000000008CBD009CF7FF009CF7FF009CF7
384 | FF009CF7FF009CF7FF009CF7FF009CF7FF009CF7FF009CF7FF009CF7FF009CF7
385 | FF00088CBD000000000000000000000000000000000000000000000000000000
386 | 0000000000000000000000000000000000000000000000000000000000000000
387 | 0000000000000000000000000000000000000000000000000000000000000000
388 | 0000000000000000000000000000000000000000000000000000000000000000
389 | 000000000000000000000000000000000000008CBD00D6F7FF00A5F7FF00A5F7
390 | FF00A5F7FF00A5F7FF00A5F7FF00A5F7FF00A5F7FF00A5F7FF00A5F7FF00A5F7
391 | FF00008CBD00000000000000000000000000008CBD00E7FFFF00A5FFFF00A5FF
392 | FF00A5FFFF00A5FFFF00A5FFFF00A5FFFF00A5FFFF00A5FFFF00A5FFFF00A5FF
393 | FF00088CBD000000000000000000000000000000000000000000000000000000
394 | 0000000000000000000000000000000000000000000000000000000000000000
395 | 0000000000000000000000000000000000000000000000000000000000000000
396 | 0000000000000000000000000000000000000000000000000000000000000000
397 | 00000000000000000000000000000000000000000000008CBD00D6F7FF00A5F7
398 | FF00A5F7FF00A5F7FF00008CBD00008CBD00008CBD00008CBD00008CBD00008C
399 | BD000000000000000000000000000000000000000000008CBD00E7FFFF00A5FF
400 | FF00A5FFFF00A5FFFF00008CBD00008CBD00008CBD00008CBD00008CBD00008C
401 | BD00000000000000000000000000000000000000000000000000000000000000
402 | 0000000000000000000000000000000000000000000000000000000000000000
403 | 0000000000000000000000000000000000000000000000000000000000000000
404 | 0000000000000000000000000000000000000000000000000000000000000000
405 | 0000000000000000000000000000000000000000000000000000008CBD00008C
406 | BD00008CBD00008CBD0000000000000000000000000000000000000000000000
407 | 0000000000000000000000000000000000000000000000000000008CBD00008C
408 | BD00008CBD00008CBD0000000000000000000000000000000000000000000000
409 | 0000000000000000000000000000000000000000000000000000000000000000
410 | 0000000000000000000000000000000000000000000000000000000000000000
411 | 0000000000000000000000000000000000000000000000000000000000000000
412 | 0000000000000000000000000000000000000000000000000000000000000000
413 | 0000000000000000000000000000000000000000000000000000000000000000
414 | 0000000000000000000000000000000000000000000000000000000000000000
415 | 0000000000000000000000000000000000000000000000000000000000000000
416 | 0000000000000000000000000000000000000000000000000000000000000000
417 | 0000000000000000000000000000000000000000000000000000000000000000
418 | 0000000000000000000000000000000000000000000000000000000000000000
419 | 0000000000000000000000000000000000000000000000000000000000000000
420 | 0000000000000000000000000000000000000000000000000000000000000000
421 | 0000000000000000000000000000000000000000000000000000000000000000
422 | 0000000000000000000000000000000000000000000000000000000000000000
423 | 0000000000000000000000000000000000000000000000000000000000000000
424 | 0000000000000000000000000000000000000000000000000000000000000000
425 | 0000000000000000000000000000000000000000000000000000000000000000
426 | 0000000000000000000000000000000000000000000000000000000000000000
427 | 0000000000000000000000000000000000000000000000000000000000000000
428 | 0000000000000000000000000000000000000000000000000000000000000000
429 | 0000000000000000000000000000000000000000000000000000000000000000
430 | 0000000000000000000000000000000000000000000000000000000000000000
431 | 0000000000000000000000000000000000000000000000000000000000000000
432 | 0000000000000000000000000000000000000000000000000000000000000000
433 | 0000000000000000000000000000000000000000000000000000000000000000
434 | 0000000000000000000000000000000000000000000000000000000000000000
435 | 0000000000000000000000000000000000000000000000000000000000000000
436 | 0000000000000000000000000000000000000000000000000000000000000000
437 | 0000000000000000000000000000000000000000000000000000000000000000
438 | 0000000000000000000000000000000000000000000000000000000000000000
439 | 0000000000000000000000000000000000000000000000000000000000000000
440 | 0000000000000000000000000000000000000000000000000000000000000000
441 | 0000000000000000000000000000000000000000000000000000000000000000
442 | 0000000000000000000000000000000000000000000000000000000000000000
443 | 0000000000000000000000000000000000000000000000000000000000000000
444 | 0000000000000000000000000000000000000000000000000000000000000000
445 | 000000000000000000000000000000000000424D3E000000000000003E000000
446 | 2800000040000000100000000100010000000000800000000000000000000000
447 | 000000000000000000000000FFFFFF0080038007000000000001000300000000
448 | 0001000100000000000100010000000000010001000000000001000000000000
449 | 0001000000000000000100000000000000070007000000000007000700000000
450 | 800F800F00000000C3FFC3FF00000000FFFFFFFF00000000FFFFFFFF00000000
451 | FFFFFFFF00000000FFFFFFFF0000000000000000000000000000000000000000
452 | 000000000000}
453 | end
454 | object actKeyValue: TActionList
455 | Images = imgKeyValues
456 | Left = 488
457 | Top = 72
458 | object actLeftCopyKeyTo: TAction
459 | Category = 'Left'
460 | Caption = 'Copy Key To'
461 | ImageIndex = 4
462 | OnExecute = actLeftCopyKeyToExecute
463 | end
464 | object actLeftDeleteKey: TAction
465 | Category = 'Left'
466 | Caption = 'Delete Key'
467 | ImageIndex = 2
468 | OnExecute = actLeftDeleteKeyExecute
469 | end
470 | object actLeftCopyNameTo: TAction
471 | Category = 'Left'
472 | Caption = 'Copy Name'
473 | ImageIndex = 0
474 | OnExecute = actLeftCopyNameToExecute
475 | end
476 | object actLeftDeleteName: TAction
477 | Category = 'Left'
478 | Caption = 'Delete Name'
479 | ImageIndex = 2
480 | OnExecute = actLeftDeleteNameExecute
481 | end
482 | object actLeftClearValue: TAction
483 | Category = 'Left'
484 | Caption = 'Clear Value'
485 | ImageIndex = 3
486 | OnExecute = actLeftClearValueExecute
487 | end
488 | object actRightCopyKeyTo: TAction
489 | Category = 'Right'
490 | Caption = 'Copy Key To'
491 | ImageIndex = 5
492 | OnExecute = actRightCopyKeyToExecute
493 | end
494 | object actRightDeleteKey: TAction
495 | Category = 'Right'
496 | Caption = 'Delete Key'
497 | ImageIndex = 2
498 | OnExecute = actRightDeleteKeyExecute
499 | end
500 | object actRightCopyNameTo: TAction
501 | Category = 'Right'
502 | Caption = 'Copy Name'
503 | ImageIndex = 1
504 | OnExecute = actRightCopyNameToExecute
505 | end
506 | object actRightDeleteName: TAction
507 | Category = 'Right'
508 | Caption = 'Delete Name'
509 | ImageIndex = 2
510 | OnExecute = actRightDeleteNameExecute
511 | end
512 | object actRightClearValue: TAction
513 | Category = 'Right'
514 | Caption = 'Clear Value'
515 | ImageIndex = 3
516 | OnExecute = actRightClearValueExecute
517 | end
518 | end
519 | object popLeftTree: TPopupMenu
520 | OnPopup = TreeMenuPopup
521 | Left = 176
522 | Top = 144
523 | object LeftCopyKeyTo: TMenuItem
524 | Action = actLeftCopyKeyTo
525 | end
526 | object LeftDeleteKey: TMenuItem
527 | Action = actLeftDeleteKey
528 | end
529 | end
530 | object PoRightTree: TPopupMenu
531 | OnPopup = TreeMenuPopup
532 | Left = 408
533 | Top = 136
534 | object MenuItem6: TMenuItem
535 | Action = actRightCopyKeyTo
536 | end
537 | object MenuItem7: TMenuItem
538 | Action = actRightDeleteKey
539 | end
540 | end
541 | object popLeftValue: TPopupMenu
542 | OnPopup = popLeftValuePopup
543 | Left = 184
544 | Top = 288
545 | object MenuItem13: TMenuItem
546 | Action = actLeftCopyNameTo
547 | end
548 | object MenuItem14: TMenuItem
549 | Action = actLeftDeleteName
550 | end
551 | object MenuItem15: TMenuItem
552 | Action = actLeftClearValue
553 | end
554 | end
555 | object popRightValues: TPopupMenu
556 | OnPopup = popLeftValuePopup
557 | Left = 408
558 | Top = 296
559 | object MenuItem28: TMenuItem
560 | Action = actRightCopyNameTo
561 | end
562 | object MenuItem29: TMenuItem
563 | Action = actRightDeleteName
564 | end
565 | object MenuItem30: TMenuItem
566 | Action = actRightClearValue
567 | end
568 | end
569 | object popLeftMemo: TPopupMenu
570 | Left = 176
571 | Top = 408
572 | object MenuItem35: TMenuItem
573 | Action = actLeftClearValue
574 | end
575 | end
576 | object popRightMemo: TPopupMenu
577 | Left = 408
578 | Top = 408
579 | object MenuItem50: TMenuItem
580 | Action = actRightClearValue
581 | end
582 | end
583 | object acmKeyValue: TActionManager
584 | ActionBars = <
585 | item
586 | Items = <
587 | item
588 | Action = actLeftCopyNameTo
589 | Caption = '&Copy Name'
590 | ImageIndex = 0
591 | ShowCaption = False
592 | end
593 | item
594 | Action = actLeftDeleteName
595 | Caption = '&Delete Name'
596 | ImageIndex = 2
597 | ShowCaption = False
598 | end
599 | item
600 | Action = actLeftClearValue
601 | Caption = 'C&lear Value'
602 | ImageIndex = 3
603 | ShowCaption = False
604 | end>
605 | ActionBar = atbLeftNames
606 | end
607 | item
608 | Items = <
609 | item
610 | Action = actRightCopyNameTo
611 | Caption = '&Copy Name'
612 | ImageIndex = 1
613 | ShowCaption = False
614 | end
615 | item
616 | Action = actRightDeleteName
617 | Caption = '&Delete Name'
618 | ImageIndex = 2
619 | ShowCaption = False
620 | end
621 | item
622 | Action = actRightClearValue
623 | Caption = 'C&lear Value'
624 | ImageIndex = 3
625 | ShowCaption = False
626 | end>
627 | ActionBar = atbRightNames
628 | end
629 | item
630 | Items = <
631 | item
632 | Action = actLeftCopyKeyTo
633 | Caption = '&Copy Key To'
634 | ImageIndex = 4
635 | ShowCaption = False
636 | end
637 | item
638 | Action = actLeftDeleteKey
639 | Caption = '&Delete Key'
640 | ImageIndex = 2
641 | ShowCaption = False
642 | end>
643 | ActionBar = atbLeftKey
644 | end
645 | item
646 | Items = <
647 | item
648 | Action = actRightCopyKeyTo
649 | Caption = '&Copy Key To'
650 | ImageIndex = 5
651 | ShowCaption = False
652 | end
653 | item
654 | Action = actRightDeleteKey
655 | Caption = '&Delete Key'
656 | ImageIndex = 2
657 | ShowCaption = False
658 | end>
659 | ActionBar = atbRightKey
660 | end>
661 | LinkedActionLists = <
662 | item
663 | ActionList = actKeyValue
664 | Caption = 'actKeyValue'
665 | end>
666 | Left = 488
667 | Top = 128
668 | StyleName = 'XP Style'
669 | end
670 | object imgKeyValues: TImageList
671 | Left = 296
672 | Top = 168
673 | Bitmap = {
674 | 494C010106000900080010001000FFFFFFFFFF10FFFFFFFFFFFFFFFF424D3600
675 | 0000000000003600000028000000400000002000000001002000000000000020
676 | 0000000000000000000000000000000000000000000000000000000000000000
677 | 0000000000000000000000000000000000000000000000000000000000000000
678 | 0000000000000000000000000000000000000000000000000000000000000000
679 | 0000000000000000000000000000000000000000000000000000000000000000
680 | 0000000000000000000000000000000000000000000000000000000000000000
681 | 0000000000000000000000000000000000000000000000000000000000000000
682 | 0000000000000000000000000000000000000000000000000000000000000000
683 | 0000000000000000000000000000000000000000000000000000000000000000
684 | 0000000000000000000000000000000000000000000052BDEF0052C6F7001894
685 | CE000084C6000084C6000084C60000000000000000000000000000000000006B
686 | 0800000000000000000000000000000000000000000000000000000000000000
687 | 0000006B0800000000000000000000000000000000000084C6000084C6000084
688 | C6001894CE0052C6F70052BDEF00000000000000000000000000000000000000
689 | 0000000000000000000000000000000000000000000000000000000000000000
690 | 0000000000000000000000000000000000000000000000000000000000000000
691 | 0000000000000000000000000000000000000000000000000000000000000000
692 | 000000000000000000000000000000000000000000005ABDDE008CE7F7005AD6
693 | FF005AD6FF0052C6F7001894CE000084C6000084C6000084C600000000000873
694 | 1000006B0800000000000000000000000000000000000000000000000000006B
695 | 080008731000000000000084C6000084C6000084C6001894CE0052C6F7005AD6
696 | FF005AD6FF008CE7F7005ABDDE00000000000000000000000000000000000000
697 | 0000000000000000000000000000000000000000000000000000000000000000
698 | 0000000000000000000000000000000000000000000000000000000000000000
699 | 0000000000000000000000000000000000000000000000000000000000000000
700 | 000000000000000000000000000000000000000000001094C60084C6D60052CE
701 | FF0052CEFF0052CEFF00006B080031D6630031CE5A0031BD520018A53100109C
702 | 2100109C2100006B080000000000000000000000000000000000006B0800109C
703 | 2100109C210018A5310031BD520031CE5A0031D66300006B080052CEFF0052CE
704 | FF0052CEFF0084C6D6001094C600000000000000000000000000000000000000
705 | 0000000000000000000000000000000000000000000000000000000000000000
706 | 0000000000000000000000000000000000000000000000000000000000000000
707 | 0000000000000000000000000000000000000000000000000000000000000000
708 | 000000000000000000000000000000000000000000001894CE00299CCE005AD6
709 | FF005AD6FF005AD6FF00006B080039DE730039D66B0031C6520031BD520018A5
710 | 290018A52900087B1000006B08000000000000000000006B0800087B100018A5
711 | 290018A5290031BD520031C6520039D66B0039DE7300006B08005AD6FF005AD6
712 | FF005AD6FF00299CCE001894CE00000000000000000000000000000000000000
713 | 0000000000000000000000000000000000000000000000000000000000000000
714 | 0000000000000000000000000000000000000000000000000000000000000000
715 | 0000000000000000000000000000000000000000000000000000000000000000
716 | 0000000000000000000000000000000000000000000052BDEF001094C600ADEF
717 | EF006BB5D6006BB5D600006B080042DE7B0042DE7B0039DE6B0031D6630031BD
718 | 520018A53100108C2100006B08000000000000000000006B0800108C210018A5
719 | 310031BD520031D6630039DE6B0042DE7B0042DE7B00006B08006BB5D6006BB5
720 | D600ADEFEF001094C60052BDEF00000000000000000000000000000000000000
721 | 0000000000000000000000000000000000000000000000000000000000000000
722 | 0000000000000000000000000000000000000000000000000000000000000000
723 | 0000000000000000000000000000000000000000000000000000000000000000
724 | 0000000000000000000000000000000000000000000052C6F700299CCE00B5EF
725 | EF0094EFEF008CE7F700006B080042DE7B0042DE7B0042DE730039DE6B0031CE
726 | 5A0031C65200006B080000000000000000000000000000000000006B080031C6
727 | 520031CE5A0039DE6B0042DE730042DE7B0042DE7B00006B08008CE7F70094EF
728 | EF00B5EFEF00299CCE0052C6F700000000000000000000000000000000000000
729 | 0000000000000000000000000000000000000000000000000000000000000000
730 | 0000000000000000000000000000000000000000000000000000000000000000
731 | 0000000000000000000000000000000000000000000000000000000000000000
732 | 0000000000000000000000000000000000000000000052CEFF0052C6F7001094
733 | CE00A5EFEF00CEFFFF00CEFFFF00BDF7FF00A5EFEF009CEFEF009CEFEF0018A5
734 | 3100006B08008CE7F700299CCE000000000000000000299CCE008CE7F700006B
735 | 080018A531009CEFEF009CEFEF00A5EFEF00BDF7FF00CEFFFF00CEFFFF00A5EF
736 | EF001094CE0052C6F70052CEFF00000000000000000000000000000000000000
737 | 0000000000000000000000000000000000000000000000000000000000000000
738 | 0000000000000000000000000000000000000000000000000000000000000000
739 | 0000000000000000000000000000000000000000000000000000000000000000
740 | 0000000000000000000000000000000000000000000073DEFF0052C6F70052AD
741 | CE00088CC600088CC600088CC60084C6D600E7FFFF00B5EFEF00B5EFEF00006B
742 | 08006BDEFF00A5EFEF00A5EFEF000000000000000000A5EFEF00A5EFEF006BDE
743 | FF00006B0800B5EFEF00B5EFEF00E7FFFF0084C6D600088CC600088CC600088C
744 | C60052ADCE0052C6F70073DEFF00000000000000000000000000000000000000
745 | 0000000000000000000000000000000000000000000000000000000000000000
746 | 0000000000000000000000000000000000000000000000000000000000000000
747 | 0000000000000000000000000000000000000000000000000000000000000000
748 | 0000000000000000000000000000000000000000000084E7F7005AD6FF00FFF7
749 | E700FFF7E700FFEFD600FFE7CE00C6D6D600219CCE0084C6D600EFFFFF00E7FF
750 | FF00BDF7FF00F7FFFF00FFFFFF000084C6000084C600FFFFFF00F7FFFF00BDF7
751 | FF00E7FFFF00EFFFFF0084C6D600219CCE00C6D6D600FFE7CE00FFEFD600FFF7
752 | E700FFF7E7005AD6FF0084E7F700000000000000000000000000000000000000
753 | 0000000000000000000000000000000000000000000000000000000000000000
754 | 0000000000000000000000000000000000000000000000000000000000000000
755 | 0000000000000000000000000000000000000000000000000000000000000000
756 | 000000000000000000000000000000000000000000008CE7F7005AD6FF00FFF7
757 | EF00FFF7EF00FFEFDE00FFEFDE00FFE7CE00E7DED600299CCE000084C6000084
758 | C6000084C6000084C6000084C6000084C6000084C6000084C6000084C6000084
759 | C6000084C6000084C600299CCE00E7DED600FFE7CE00FFEFDE00FFEFDE00FFF7
760 | EF00FFF7EF005AD6FF008CE7F700000000000000000000000000000000000000
761 | 0000000000000000000000000000000000000000000000000000000000000000
762 | 0000000000000000000000000000000000000000000000000000000000000000
763 | 0000000000000000000000000000000000000000000000000000000000000000
764 | 00000000000000000000000000000000000000000000BDF7F7006BDEFF00FFFF
765 | FF00FFFFFF00FFF7EF00FFF7EF00FFF7E700FFEFDE00FFE7D600FFE7CE00A5EF
766 | EF000084C6000000000000000000000000000000000000000000000000000084
767 | C600A5EFEF00FFE7CE00FFE7D600FFEFDE00FFF7E700FFF7EF00FFF7EF00FFFF
768 | FF00FFFFFF006BDEFF00BDF7F700000000000000000000000000000000000000
769 | 0000000000000000000000000000000000000000000000000000000000000000
770 | 0000000000000000000000000000000000000000000000000000000000000000
771 | 0000000000000000000000000000000000000000000000000000000000000000
772 | 000000000000000000000000000000000000000000008CE7F70084E7F700FFFF
773 | FF00FFFFFF00FFFFFF00FFFFF700FFF7EF00FFF7E700DEDED600C6D6D6000084
774 | C600000000000000000000000000000000000000000000000000000000000000
775 | 00000084C600C6D6D600DEDED600FFF7E700FFF7EF00FFFFF700FFFFFF00FFFF
776 | FF00FFFFFF0084E7F7008CE7F700000000000000000000000000000000000000
777 | 0000000000000000000000000000000000000000000000000000000000000000
778 | 0000000000000000000000000000000000000000000000000000000000000000
779 | 0000000000000000000000000000000000000000000000000000000000000000
780 | 00000000000000000000000000000000000000000000000000000084C600FFFF
781 | FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00AD6B6300D68C5A00D68C5A000000
782 | 0000000000000000000000000000000000000000000000000000000000000000
783 | 000000000000D68C5A00D68C5A00AD6B6300FFFFFF00FFFFFF00FFFFFF00FFFF
784 | FF00FFFFFF000084C60000000000000000000000000000000000000000000000
785 | 0000000000000000000000000000000000000000000000000000000000000000
786 | 0000000000000000000000000000000000000000000000000000000000000000
787 | 0000000000000000000000000000000000000000000000000000000000000000
788 | 000000000000000000000000000000000000000000000000000000000000FFFF
789 | FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00AD6B6300DE946300D6945A000000
790 | 0000000000000000000000000000000000000000000000000000000000000000
791 | 000000000000D6945A00DE946300AD6B6300FFFFFF00FFFFFF00FFFFFF00FFFF
792 | FF00FFFFFF000000000000000000000000000000000000000000000000000000
793 | 0000000000000000000000000000000000000000000000000000000000000000
794 | 0000000000000000000000000000000000000000000000000000000000000000
795 | 0000000000000000000000000000000000000000000000000000000000000000
796 | 000000000000000000000000000000000000000000000000000000000000D69C
797 | 6B00D69C6B00D69C6B00D69C6B00D69C6B00AD6B630000000000000000000000
798 | 0000000000000000000000000000000000000000000000000000000000000000
799 | 0000000000000000000000000000AD6B6300D69C6B00D69C6B00D69C6B00D69C
800 | 6B00D69C6B000000000000000000000000000000000000000000000000000000
801 | 0000000000000000000000000000000000000000000000000000000000000000
802 | 0000000000000000000000000000000000000000000000000000000000000000
803 | 0000000000000000000000000000000000000000000000000000000000000000
804 | 0000000000000000000000000000000000000000000000000000000000000000
805 | 0000000000000031000000310000003100000031000000310000003100000000
806 | 0000000000000000000000000000000000000000000000000000000000000000
807 | 0000000000000039000000390000003900000039000000390000003900000000
808 | 0000000000000000000000000000000000000000000000000000000000000000
809 | 0000000000000000000000000000000000000000000000000000000000000000
810 | 000000000000000000000000000000000000000000000000000094635A00A563
811 | 6B00A5636B00A5636B00A5636B00A5636B00A5636B00A5636B00A5636B00A563
812 | 6B00A5636B00A5636B00A5636B0000000000000000000000000000000000004A
813 | 0000008C080000A50800009C0800009C0800009C0800009C080000A508000084
814 | 0800003100000000000000000000000000000000000000000000000000000042
815 | 00000094080000A50800009C0800009C0800009C0800009C080000A50800008C
816 | 0800003900000000000000000000000000000000000000000000000000000000
817 | 0000000000000000000000000000000000000000000000000000000000000000
818 | 0000000000000000B5000000B50000000000000000000000000094635A00F7DE
819 | BD00F7D6B500EFCEA500EFCE9C00EFC69400EFC68400EFBD7B00EFBD7B00EFBD
820 | 7B00EFBD7B00EFBD7B009C6B6300000000000000000000000000006B080000A5
821 | 100000A50800009C0800009C0800009C0800009C0800009C0800009C080000A5
822 | 0800009C08000031000000000000000000000000000000000000006B080000A5
823 | 100000A50800009C0800009C0800009C0800009C0800009C0800009C080000A5
824 | 0800009C0800003900000000000000000000000000000000B5000000B5000000
825 | 0000000000000000000000000000000000000000000000000000000000000000
826 | 0000000000000000B5000000B50000000000000000000000000094635A00F7DE
827 | C600F7DEBD00EFD6AD00EFCEA500EFC69400EFC69400EFBD8400EFBD7B00EFBD
828 | 7B00EFBD7B00EFBD7B009C6B63000000000000000000006B080010AD290008A5
829 | 180000A5080000A5080000A5080021B54200EFFFEF008CDEA500009C0800009C
830 | 0800009C0800009C0800003100000000000000000000006B080010A5290008A5
831 | 180000A5080000A5080000A50800FFFFFF00EFFFEF0000A50800009C0800009C
832 | 0800009C0800009C08000039000000000000000000000000B5000000B5000000
833 | B5000000B5000000000000000000000000000000000000000000000000000000
834 | B5000000B500000000000000000000000000000000000000000094635A00F7E7
835 | D600F7E7CE00F7DEB500F7D6B500EFCEA500EFCE9C00EFC69400EFC68400EFBD
836 | 7B00EFBD7B00EFBD7B009C6B6300000000000000000010A5290010AD310010AD
837 | 290008A5210008A5180010AD29005ACE8400FFFFFF00FFFFFF008CDEA500009C
838 | 0800009C080000A50800007B0800000000000000000008A5290010AD310010A5
839 | 290000A5080000A5080094DEAD00FFFFFF00FFFFFF0000A51000009C0800009C
840 | 0800009C080000A50800007B08000000000000000000000000000000B5000000
841 | B5000000B50000000000000000000000000000000000000000000000B5000000
842 | B5000000B500000000000000000000000000000000000000000094635A00FFEF
843 | DE00F7E7D600F7DEC600F7DEB500EFD6AD00EFCEA500EFC69400EFC69400EFBD
844 | 7B00EFBD7B00EFBD7B009C6B630000000000009C080021B54A0018AD390018AD
845 | 390010AD310018AD390018AD390010AD290021B54200E7F7EF00FFFFFF008CDE
846 | A500009C0800009C080000A5080000310000009C080018B54A0018AD390018AD
847 | 390000A50800FFFFFF00FFFFFF00ADE7BD0021B5420008A51800009C0800009C
848 | 0800009C0800009C080000A50800003900000000000000000000000000000000
849 | 00000000B5000000B5000000B500000000000000B5000000B5000000B5000000
850 | 00000000000000000000000000000000000000000000000000009C6B6300FFF7
851 | E700FFEFDE00F7E7CE00F7E7CE00F7DEB500F7D6B500EFCEA500EFCE9C00EFC6
852 | 9400EFC68400EFBD7B009C6B630000000000009C080021B54A0018B54A0018B5
853 | 4A0029B5520021B5420018AD390010AD310010AD29005ACE8400FFFFFF00FFFF
854 | FF004AC67300009C080000A5080000310000009C080021B54A0021B54A0021B5
855 | 4A006BCE8C00FFFFFF00FFFFFF0029BD520010AD290008A5210008A5210000A5
856 | 100000A51000009C080000A50800003900000000000000000000000000000000
857 | 0000000000000000B5000000B5000000B5000000B5000000B5000000B5000000
858 | 0000000000000000000000000000000000000000000000000000A5736300FFF7
859 | F700FFEFE700F7E7D600F7E7CE00F7DEBD00F7DEB500EFD6AD00EFCEA500EFC6
860 | 9400EFC69400EFBD7B009C6B630000000000009C080031BD630021B55200FFFF
861 | FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
862 | FF00FFFFFF00009C0800009C080000310000009C080039BD630021B55200FFFF
863 | FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
864 | FF00FFFFFF00009C0800009C0800003900000000000000000000000000000000
865 | 000000000000000000000000B5000000B5000000F70000000000000000000000
866 | 0000000000000000000000000000000000000000000000000000AD736B00FFFF
867 | FF00FFFFF700FFEFE700FFEFDE00F7E7CE00F7E7CE00F7DEB500F7D6B500EFCE
868 | A500EFCE9C00EFC68C00A56B630000000000009C08004AC6730021B55200F7FF
869 | F700FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00DEF7DE00FFFFFF00FFFF
870 | FF00FFFFFF00009C0800009C080000310000009C08004AC6730029B55200D6F7
871 | DE00FFFFFF00FFFFFF00FFFFFF00F7FFF700FFFFFF00FFFFFF00FFFFFF00FFFF
872 | FF00FFFFFF00009C0800009C0800003900000000000000000000000000000000
873 | 0000000000000000B5000000B5000000B5000000B5000000F700000000000000
874 | 0000000000000000000000000000000000000000000000000000AD736B00FFFF
875 | FF00FFFFFF00FFF7EF00FFEFE700F7E7D600F7E7CE00F7DEC600F7DEB500EFD6
876 | AD00EFCEA500EFC69400A573630000000000009C080094DEA50052CE7B0039BD
877 | 630039BD630031BD630031BD5A0029B5520029B55200FFFFFF00FFFFFF009CDE
878 | AD0010AD2900009C080000A5080000310000009C080094DEA50052CE7B0039BD
879 | 630039BD6300FFFFFF00FFFFFF00ADE7BD0029B5520021AD420018AD390010AD
880 | 290010AD2900009C080000A50800003900000000000000000000000000000000
881 | 00000000F7000000F7000000B50000000000000000000000F7000000F7000000
882 | 0000000000000000000000000000000000000000000000000000AD736B00FFFF
883 | FF00FFFFFF00FFFFFF00FFF7F700FFEFE700FFEFDE00F7E7CE00F7DEC600F7DE
884 | B500F7D6B500EFC694008C635A0000000000009C080094DEA50094DEA50039BD
885 | 630039BD630031BD630031BD630042C66B00DEF7DE00FFFFFF00FFFFFF0008A5
886 | 210008A5210000A5100000A5080000310000009C080094DEA50094DEA50039BD
887 | 630039BD6300ADE7BD00FFFFFF00FFFFFF00DEF7E70021B5420010AD290008A5
888 | 210008A5210000A5100000A50800003900000000000000000000000000000000
889 | F7000000F7000000F7000000F70000000000000000000000F7000000F7000000
890 | F700000000000000000000000000000000000000000000000000CE9C7300FFFF
891 | FF00FFFFFF00FFFFFF00FFFFFF00FFF7EF00FFEFE700F7E7D600F7E7CE00F7DE
892 | BD00EFCEAD00A594840084635A00000000000000000029BD5A00A5E7B50063CE
893 | 840039BD630039BD630039BD63005ACE8400FFFFFF0063CE840010AD390010AD
894 | 310008A5210008A51800006B0800000000000000000029BD5200A5E7B5006BCE
895 | 8C0039BD630039BD630039BD6300FFFFFF00FFFFFF0029B5520018AD390010AD
896 | 310008A5210008A52100006B08000000000000000000000000000000F7000000
897 | F7000000F7000000000000000000000000000000000000000000000000000000
898 | F7000000F7000000000000000000000000000000000000000000CE9C7300FFFF
899 | FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFF7F700FFF7E700F7DEC6009C63
900 | 5A0094635A0094635A009C635A000000000000000000009C08005ACE7B00BDEF
901 | CE008CDEA50039BD630039BD630039BD630031BD630029BD5A0021B5420010AD
902 | 310010AD2900008C0800004A00000000000000000000009C08005ACE7B00BDEF
903 | CE006BCE8C0039BD630039BD630039BD630039BD630031BD5A0021B5420010AD
904 | 310010AD290008A518000042000000000000000000000000F7000000F7000000
905 | F7000000F7000000000000000000000000000000000000000000000000000000
906 | 0000000000000000000000000000000000000000000000000000CE9C7300FFFF
907 | FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFF700E7C6AD00D69C
908 | 6B00E79C4A00EF9C4200A56B6B00000000000000000000000000009C08005ACE
909 | 7B00A5E7BD00C6EFCE00A5E7B50063CE84005ACE84005ACE7B0052C6730021B5
910 | 520010A52900006B080000000000000000000000000000000000009C08005ACE
911 | 7B00A5E7BD00C6EFCE00A5E7B5006BCE8C005ACE84005ACE840052C67B0021B5
912 | 520010A52900006B08000000000000000000000000000000F7000000F7000000
913 | 0000000000000000000000000000000000000000000000000000000000000000
914 | 0000000000000000000000000000000000000000000000000000CE9C7300FFFF
915 | FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00E7C6AD00EFB5
916 | 6B00EFA55A00000000000000000000000000000000000000000000000000009C
917 | 080029B552009CE7B500B5EFC600ADE7C600A5E7B50063CE840052CE7B0008A5
918 | 2100006B0800000000000000000000000000000000000000000000000000009C
919 | 080029B552009CE7B500B5EFC600ADE7BD00A5E7B5006BCE8C004AC6730008A5
920 | 210000630800000000000000000000000000000000000000F7000000F7000000
921 | 0000000000000000000000000000000000000000000000000000000000000000
922 | 0000000000000000000000000000000000000000000000000000CE9C7300FFFF
923 | FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00F7E7CE00EFB5
924 | 7300A56B6B000000000000000000000000000000000000000000000000000000
925 | 000000000000009C0800009C0800009C0800009C0800009C0800009C08000000
926 | 0000000000000000000000000000000000000000000000000000000000000000
927 | 000000000000009C0800009C0800009C0800009C0800009C0800009C08000000
928 | 0000000000000000000000000000000000000000000000000000000000000000
929 | 0000000000000000000000000000000000000000000000000000000000000000
930 | 0000000000000000000000000000000000000000000000000000000000000000
931 | 0000000000000000000000000000000000000000000000000000000000000000
932 | 000000000000000000000000000000000000424D3E000000000000003E000000
933 | 2800000040000000200000000100010000000000000100000000000000000000
934 | 000000000000000000000000FFFFFF00FFFFFFFF0000000081EFF78100000000
935 | 8027E401000000008003C0010000000080018001000000008001800100000000
936 | 8003C00100000000800180010000000080018001000000008000000100000000
937 | 80000001000000008007E00100000000800FF00100000000C01FF80300000000
938 | E01FF80700000000E07FFE0700000000F81FF81FFFFFC001E007E007FFF9C001
939 | C003C0039FF9C0018001800187E7C00180018001C7C7C00100000000F11FC001
940 | 00000000F81FC00100000000FC7FC00100000000F83FC00100000000F19FC001
941 | 00000000E18FC00180018001C7E7C0018001800187FFC001C003C0039FFFC007
942 | E007E0079FFFC007F81FF81FFFFFFFFF00000000000000000000000000000000
943 | 000000000000}
944 | end
945 | end
946 |
--------------------------------------------------------------------------------
/Source/fEditSetting.pas:
--------------------------------------------------------------------------------
1 | {-----------------------------------------------------------------------------
2 | Unit Name: fEditSetting
3 | Author: Original code by Lachlan Gemmell (http://lachlan.gemmell.com/),
4 | maintained and improved by Erwien Saputra.
5 | Purpose: Encapsulates all interaction with the Registry.
6 |
7 | History:
8 | 12/27/04 - Received the file from Lachlan.
9 | 01/02/05 - Updated to work with new ISettingCollection.
10 | A lot of updates. Refactored the logic and creates several helper
11 | classes.
12 | 03/01/05 - Added buttons.
13 | 04/08/05 - Updated this form, giving this form the ability to persist its
14 | setting. This form uses my new setting framework.
15 | 06/18/05 - Updated SetTopPanelHeight and GetTopPanelHeight.
16 | -----------------------------------------------------------------------------}
17 | unit fEditSetting;
18 |
19 | interface
20 |
21 | uses
22 | Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
23 | Dialogs, ExtCtrls, StdCtrls, ComCtrls, TreeViewController,
24 | DelphiSettingRegistry, Buttons, ImgList, ValueNamesProvider, ToolWin, ActnMan,
25 | ActnCtrls, XPStyleActnCtrls, ActnList, Menus, SettingPersistent;
26 |
27 | type
28 | TEditSettingProperties = class;
29 |
30 | IEditSetting = interface
31 | ['{D8825E5B-D312-4277-9605-0DC278F65D7B}']
32 | function GetLeftSettingPath : string;
33 | function GetRightSettingPath : string;
34 | function GetLeftSettingName : string;
35 | function GetRightSettingName : string;
36 | procedure SetLeftSettingPath (const APath : string);
37 | procedure SetRightSettingPath (const APath : string);
38 | procedure SetLeftSettingName (const ASettingName : string);
39 | procedure SetRightSettingName (const ASettingName : string);
40 |
41 | procedure Execute;
42 |
43 | property LeftSettingPath : string read GetLeftSettingPath write
44 | SetLeftSettingPath;
45 | property LeftSettingName : string read GetLeftSettingName write
46 | SetLeftSettingName;
47 | property RightSettingPath : string read GetRightSettingPath write
48 | SetRightSettingPath;
49 | property RightSettingName : string read GetRightSettingName write
50 | SetRightSettingName;
51 |
52 | end;
53 |
54 | TfrmEditSetting = class(TForm, IEditSetting)
55 | pnlTop: TPanel;
56 | Splitter1: TSplitter;
57 | pnlValuesLeft: TPanel;
58 | pnlValuesRight: TPanel;
59 | pnlLeft: TPanel;
60 | spTree: TSplitter;
61 | pnlRight: TPanel;
62 | tvLeft: TTreeView;
63 | tvRight: TTreeView;
64 | lblLeft: TLabel;
65 | lblRight: TLabel;
66 | lbLeftValues: TListBox;
67 | lbRightValues: TListBox;
68 | pnlBottom: TPanel;
69 | pnlButton: TPanel;
70 | btnClose: TButton;
71 | imgTree: TImageList;
72 | memValueLeft: TMemo;
73 | memValueRight: TMemo;
74 | actKeyValue: TActionList;
75 | actLeftCopyKeyTo: TAction;
76 | actLeftDeleteKey: TAction;
77 | actLeftCopyNameTo: TAction;
78 | actLeftDeleteName: TAction;
79 | actLeftClearValue: TAction;
80 | actRightCopyKeyTo: TAction;
81 | actRightCopyNameTo: TAction;
82 | actRightDeleteName: TAction;
83 | actRightClearValue: TAction;
84 | spValues: TSplitter;
85 | popLeftTree: TPopupMenu;
86 | actRightDeleteKey: TAction;
87 | LeftCopyKeyTo: TMenuItem;
88 | LeftDeleteKey: TMenuItem;
89 | PoRightTree: TPopupMenu;
90 | MenuItem6: TMenuItem;
91 | MenuItem7: TMenuItem;
92 | popLeftValue: TPopupMenu;
93 | MenuItem13: TMenuItem;
94 | MenuItem14: TMenuItem;
95 | MenuItem15: TMenuItem;
96 | popRightValues: TPopupMenu;
97 | MenuItem28: TMenuItem;
98 | MenuItem29: TMenuItem;
99 | MenuItem30: TMenuItem;
100 | popLeftMemo: TPopupMenu;
101 | MenuItem35: TMenuItem;
102 | popRightMemo: TPopupMenu;
103 | MenuItem50: TMenuItem;
104 | atbLeftNames: TActionToolBar;
105 | atbRightNames: TActionToolBar;
106 | acmKeyValue: TActionManager;
107 | imgKeyValues: TImageList;
108 | atbLeftKey: TActionToolBar;
109 | atbRightKey: TActionToolBar;
110 | procedure ValueNamesKeyDown(Sender: TObject; var Key: Word;
111 | Shift: TShiftState);
112 | procedure TreeViewKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState);
113 | procedure popLeftValuePopup(Sender: TObject);
114 | procedure actRightClearValueExecute(Sender: TObject);
115 | procedure actRightDeleteNameExecute(Sender: TObject);
116 | procedure actRightDeleteKeyExecute(Sender: TObject);
117 | procedure actLeftClearValueExecute(Sender: TObject);
118 | procedure actLeftDeleteNameExecute(Sender: TObject);
119 | procedure actLeftDeleteKeyExecute(Sender: TObject);
120 | procedure FormResize(Sender: TObject);
121 | procedure TreeMenuPopup(Sender: TObject);
122 | procedure actLeftCopyNameToExecute(Sender: TObject);
123 | procedure actRightCopyNameToExecute(Sender: TObject);
124 | procedure actRightCopyKeyToExecute(Sender: TObject);
125 | procedure actLeftCopyKeyToExecute(Sender: TObject);
126 | procedure lbLeftValuesClick(Sender: TObject);
127 | procedure tvLeftGetSelectedIndex(Sender: TObject; Node: TTreeNode);
128 | procedure tvLeftGetImageIndex(Sender: TObject; Node: TTreeNode);
129 | procedure spTreeCanResize(Sender: TObject; var NewSize: Integer;
130 | var Accept: Boolean);
131 | procedure spTreeMoved(Sender: TObject);
132 | private
133 | { Private declarations }
134 | FLeftSettingName : string;
135 | FLeftRegistry : IDelphiSettingRegistry;
136 | FLeftController : ITreeViewController;
137 | FLeftValueNamesProvider : IValueNamesProvider;
138 |
139 | FRightSettingName : string;
140 | FRightRegistry : IDelphiSettingRegistry;
141 | FRightController : ITreeViewController;
142 | FRightValueNamesProvider : IValueNamesProvider;
143 |
144 | FSynchronizer : IDelphiSettingSynchronizer;
145 | FLeftReadOnly: Boolean;
146 | FRightReadOnly: Boolean;
147 |
148 | FSettingProperties : TEditSettingProperties;
149 |
150 | function GetLeftSettingPath : string;
151 | function GetRightSettingPath : string;
152 | function GetLeftSettingName : string;
153 | function GetRightSettingName : string;
154 | procedure SetLeftSettingPath (const APath : string);
155 | procedure SetRightSettingPath (const APath : string);
156 | procedure SetLeftSettingName (const ASettingName : string);
157 | procedure SetRightSettingName (const ASettingName : string);
158 |
159 | procedure Execute;
160 |
161 | procedure BuildListBoxes (const ListA, ListB : TStrings);
162 | procedure UpdateListBox (const Intf : IInterface);
163 | procedure DisplayValue (const Intf : IInterface);
164 | procedure SyncListBox (const ANewSelection, ATopIndex : integer);
165 |
166 | procedure CopyValue (const SourceListBox : TListBox;
167 | const SourceProvider, TargetProvider : IValueNamesProvider);
168 | procedure DeleteCurrentKey (const DelphiRegistry : IDelphiSettingRegistry;
169 | const TreeView : TTreeView);
170 | procedure DeleteSelectedValue (const Provider : IValueNamesProvider;
171 | const SelectedItem, TopItem : integer);
172 | procedure ClearSelectedValue(const Provider: IValueNamesProvider;
173 | const SelectedItem, TopItem: integer);
174 | public
175 | { Public declarations }
176 | constructor Create (AOwner : TComponent); override;
177 | destructor Destroy; override;
178 | end;
179 |
180 | TEditSettingProperties = class (TFormSetting)
181 | private
182 | function GetLeftPanelWidth: integer;
183 | function GetTopPanelHeight: integer;
184 | procedure SetPanelWidth(const Value: integer);
185 | procedure SetTopPanelHeight(const Value: integer);
186 | published
187 | property TopPanelHeight : integer read GetTopPanelHeight write SetTopPanelHeight;
188 | property LeftPanelWidth : integer read GetLeftPanelWidth write SetPanelWidth;
189 | end;
190 |
191 | implementation
192 |
193 | uses
194 | IntfObserver, dmGlyphs;
195 |
196 | const
197 | //Captions for the menus.
198 | COPY_KEY_CAPTION = 'Copy "%0:s" To "%1:s"';
199 | DELETE_KEY_CAPTION = 'Delete Key "%s"';
200 | COPY_NAME_CAPTION = 'Copy "%s" To "%s"';
201 | DELETE_NAME_CAPTION = 'Delete Name "%s"';
202 | CLEAR_VALUE = 'Clear Value';
203 |
204 | READ_ONLY_SUFFIX = ' (Read Only)';
205 |
206 | CAPTION_COLOR : array [false..true] of TColor = (clWindowText, clRed);
207 | {$R *.dfm}
208 |
209 | { TForm1 }
210 |
211 | constructor TfrmEditSetting.Create (AOwner : TComponent);
212 | begin
213 | inherited;
214 | //Create the DelphiSettingRegistry and Disable the observer pattern here.
215 | FLeftRegistry := TDelphiSettingRegistry.Create;
216 | (FLeftRegistry as ISubject).Enabled := false;
217 | //Create the treeview controller, bind the DelphiSettingRegistry and the
218 | //TreeView.
219 | FLeftController := CreateTreeViewController;
220 | FLeftController.BindDelphiSettingRegistry(FLeftRegistry);
221 | FLeftController.BindTreeView (tvLeft);
222 | //Create the ValueNamesProvider. It is bound with the DelphiSettingRegistry.
223 | //Attach the events.
224 | FLeftValueNamesProvider := GetValueNamesProvider (FLeftRegistry);
225 | FLeftValueNamesProvider.OnValueNamesChanged := UpdateListBox;
226 | FLeftValueNamesProvider.OnAsStringChanged := DisplayValue;
227 | (FLeftRegistry as ISubject).Enabled := true;
228 |
229 | //Create the DelphiSettingRegistry and Disable the observer pattern here.
230 | FRightRegistry := TDelphiSettingRegistry.Create;
231 | (FRightRegistry as ISubject).Enabled := false;
232 | //Create the treeview controller, bind the DelphiSettingRegistry and the
233 | //TreeView.
234 | FRightController := CreateTreeViewController;
235 | FRightController.BindTreeView (tvRight);
236 | FRightController.BindDelphiSettingRegistry (FRightRegistry);
237 | //Create the ValueNamesProvider. It is bound with the DelphiSettingRegistry.
238 | //Attach the events.
239 | FRightValueNamesProvider := GetValueNamesProvider (FRightRegistry);
240 | FRightValueNamesProvider.OnValueNamesChanged := UpdateListBox;
241 | FRightValueNamesProvider.OnAsStringChanged := DisplayValue;
242 | (FRightRegistry as ISubject).Enabled := true;
243 |
244 | //Create the synchronizer.
245 | FSynchronizer := GetDelphiSettingSynchronizer;
246 |
247 | self.atbLeftNames.Orientation := boRightToLeft;
248 | self.atbLeftKey.Orientation := boRightToLeft;
249 |
250 | FSettingProperties := TEditSettingProperties.Create (self);
251 | SettingPersistent.GetIniPersistentManager.LoadSetting (FSettingProperties);
252 | end;
253 |
254 | function TfrmEditSetting.GetLeftSettingPath: string;
255 | begin
256 | Result := FLeftRegistry.SettingPath;
257 | end;
258 |
259 | function TfrmEditSetting.GetRightSettingPath: string;
260 | begin
261 | Result := FRightRegistry.SettingPath;
262 | end;
263 |
264 | //Set the left setting path. It opens the FLeftRegistryProvider, setup the
265 | //controller, add the treeview controller to the synchronizer.
266 | procedure TfrmEditSetting.SetLeftSettingPath(const APath: string);
267 | begin
268 | //Open the DelphiSettingRegistry, build the nodes based on the new path.
269 | FLeftRegistry.OpenSetting (APath);
270 | FLeftController.BuildNode (nil);
271 | //Add the controller to the synchronizer.
272 | FSynchronizer.AddTreeViewController (FLeftController);
273 | //Let the ValueNamesProvider knows what is the setting path of the
274 | //DelphiSettingRegistry. This value is necessary to get the relative path for
275 | //the ValueNamesProvider.
276 | FLeftValueNamesProvider.SetSettingPath (FLeftRegistry.SettingPath);
277 |
278 | //If the Path does not contain CustomSetting string, this path is the path to
279 | //the original Delphi IDE key. Disables the menus.
280 | FLeftReadOnly := Pos ('CustomSettings', APath) = 0;
281 |
282 | //Disables the menus when the custom setting is read-only.
283 | if FLeftReadOnly = true then begin
284 | self.actLeftDeleteKey.Enabled := false;
285 | self.actLeftDeleteName.Enabled := false;
286 | self.actLeftClearValue.Enabled := false;
287 | self.actRightCopyKeyTo.Enabled := false;
288 | self.actRightCopyNameTo.Enabled := false;
289 |
290 | SetLeftSettingName (FLeftSettingName);
291 | end;
292 | end;
293 |
294 | //Set the right pane. It opens the FRightRegistryProvider, setup the
295 | //controller, add the treeview controller to the synchronizer.
296 | procedure TfrmEditSetting.SetRightSettingPath(const APath: string);
297 | begin
298 | FRightRegistry.OpenSetting (APath);
299 | FRightController.BuildNode (nil);
300 | FSynchronizer.AddTreeViewController (FRightController);
301 | //Let the ValueNamesProvider knows what is the setting path of the
302 | //DelphiSettingRegistry. This value is necessary to get the relative path for
303 | //the ValueNamesProvider.
304 | FRightValueNamesProvider.SetSettingPath (FRightRegistry.SettingPath);
305 |
306 | //If the Path does not contain CustomSetting string, this path is the path to
307 | //the original Delphi IDE key. Disables the menus.
308 | FRightReadOnly := Pos ('CustomSettings', APath) = 0;
309 | if FRightReadOnly = true then begin
310 | self.actRightDeleteKey.Enabled := false;
311 | self.actRightDeleteName.Enabled := false;
312 | self.actRightClearValue.Enabled := false;
313 | self.actLeftCopyKeyTo.Enabled := false;
314 | self.actLeftCopyNameTo.Enabled := false;
315 |
316 | SetRightSettingName (FRightSettingName);
317 | lblRight.Caption := lblRight.Caption + ' (Read Only)';
318 | end;
319 | end;
320 |
321 | procedure TfrmEditSetting.Execute;
322 | begin
323 | ShowModal;
324 | end;
325 |
326 | function TfrmEditSetting.GetLeftSettingName: string;
327 | begin
328 | Result := FLeftSettingName;
329 | end;
330 |
331 | function TfrmEditSetting.GetRightSettingName: string;
332 | begin
333 | Result := FRightSettingName;
334 | end;
335 |
336 | //UI stuff. Assign the name Delphi Setting Registry on the left pane.
337 | procedure TfrmEditSetting.SetLeftSettingName(const ASettingName: string);
338 | begin
339 | FLeftSettingName := ASettingName;
340 |
341 | if FLeftReadOnly = true then
342 | FLeftSettingName := ASettingName + READ_ONLY_SUFFIX;
343 |
344 | lblLeft.Caption := FLeftSettingName;
345 | lblLeft.Font.Color := CAPTION_COLOR [FLeftReadOnly];
346 |
347 | end;
348 |
349 | //UI stuff. Assign the name Delphi Setting Registry on the right pane.
350 | procedure TfrmEditSetting.SetRightSettingName(const ASettingName: string);
351 | begin
352 | FRightSettingName := ASettingName;
353 |
354 | if FRightReadOnly = true then
355 | FRightSettingName := ASettingName + READ_ONLY_SUFFIX;
356 |
357 | lblRight.Caption := FRightSettingName;
358 | lblRight.Font.Color := CAPTION_COLOR [FRightReadOnly];
359 | end;
360 |
361 | //This event is shared with spTree and spValues. pnlLeft is controlled by spTree
362 | //while pnlValuesLeft is controller by spValues. This event handler synchronizes
363 | //these two panels, that both will always be at the same size.
364 | procedure TfrmEditSetting.spTreeMoved(Sender: TObject);
365 | var
366 | ControlledPanel,
367 | OtherPanel : TPanel;
368 | begin
369 | //Get the other panel that is not controlled by the Sender.
370 | if (Sender = spTree) then begin
371 | ControlledPanel := pnlLeft;
372 | OtherPanel := pnlValuesLeft;
373 | end
374 | else begin
375 | ControlledPanel := pnlValuesLeft;
376 | OtherPanel := pnlLeft;
377 | end;
378 |
379 | //Synchronizes both panel.
380 | OtherPanel.Width := ControlledPanel.Width;
381 | end;
382 |
383 | procedure TfrmEditSetting.spTreeCanResize(Sender: TObject; var NewSize: Integer;
384 | var Accept: Boolean);
385 | begin
386 | Accept := (NewSize > 30);
387 | end;
388 |
389 | //Load the closed folder image if an item is drawn.
390 | procedure TfrmEditSetting.tvLeftGetImageIndex(Sender: TObject; Node: TTreeNode);
391 | begin
392 | Node.ImageIndex := 0;
393 | end;
394 |
395 | //Load the open folder image if an item is selected.
396 | procedure TfrmEditSetting.tvLeftGetSelectedIndex(Sender: TObject;
397 | Node: TTreeNode);
398 | begin
399 | Node.SelectedIndex := 1;
400 | end;
401 |
402 | //This method synchronizes the ListBox values. It compares two TStrings line by
403 | //line, and if two lines are not identical, that means there is a gap. If a gap
404 | //if found, this method will synchronizes the listbox by inserting an empty
405 | //string. The end result, two string list that each line will have same values
406 | //or the counterpart is blank.
407 | //If one TStrings is empty, it will remain empty. It won't be filled with blank
408 | //lines.
409 | //Both string must not be auto sorted.
410 | procedure TfrmEditSetting.BuildListBoxes(const ListA, ListB: TStrings);
411 | var
412 | CompareResult,
413 | LoopA, LoopB : integer;
414 | StrA, StrB : string;
415 | begin
416 | LoopA := 0;
417 | LoopB := 0;
418 |
419 | //Iterates both TStrings.
420 | while (LoopA < ListA.Count) and
421 | (LoopB < ListB.Count) do begin
422 | //Get the string for the first TString
423 | if LoopA < ListA.Count then
424 | StrA := ListA [LoopA]
425 | else
426 | StrA := EmptyStr;
427 |
428 | //Get the string for the second TString
429 | if LoopB < ListB.Count then
430 | StrB := ListB [LoopB]
431 | else
432 | StrB := EmptyStr;
433 |
434 | //Compare both strings. if the result is not identical, insert blank line
435 | //to at the location of the string that has greater value.
436 | CompareResult := CompareText (StrA, StrB);
437 |
438 | if (CompareResult > 0) then
439 | ListA.Insert (LoopA, EmptyStr)
440 | else if (CompareResult < 0) then
441 | ListB.Insert (LoopB, EmptyStr);
442 |
443 | Inc (LoopA);
444 | Inc (LoopB);
445 | end;
446 |
447 | //If both lines do not have same count, that means at the end of one TStrings,
448 | //there is no more text that can be compared. Add blank lines to the TStrings
449 | //that has less line items.
450 | while (ListA.Count <> ListB.Count) and
451 | ((ListA.Count <> 0) and (ListB.Count <> 0)) do
452 | if ListA.Count < ListB.Count then
453 | ListA.Append (EmptyStr)
454 | else
455 | ListB.Append (EmptyStr);
456 | end;
457 |
458 | //Event handler for ValueNamesProvider.OnValueNamesChanged. If the provider
459 | //is changed, this method will populate the listbox. This event handler is
460 | //shared by FLeftValueNamesProvider and FRightValueNamesProvider.
461 | procedure TfrmEditSetting.UpdateListBox(const Intf: IInterface);
462 | var
463 | NamesProvider,
464 | OtherProvider : IValueNamesProvider;
465 | StrActive, strOther : TStrings;
466 | begin
467 | //Get the left and the right provider, based on Intf parameter.
468 | NamesProvider := (Intf as IValueNamesProvider);
469 |
470 | if (NamesProvider = FLeftValueNamesProvider) then begin
471 | StrActive := lbLeftValues.Items;
472 | StrOther := lbRightValues.Items;
473 | OtherProvider := FRightValueNamesProvider;
474 | end
475 | else begin
476 | StrActive := lbRightValues.Items;
477 | StrOther := lbLeftValues.Items;
478 | OtherProvider := FLeftValueNamesProvider;
479 | end;
480 |
481 | if OtherProvider = nil then
482 | Exit;
483 |
484 | StrActive.BeginUpdate;
485 | StrOther.BeginUpdate;
486 | try
487 | //If the LeftProvider and the RightProvider have identical RelativePath,
488 | //this means that both providers have that key and are synchronized. Refresh
489 | //the ListBoxes for both ListBoxes and then synchronize the list boxes.
490 | if NamesProvider.RelativePath = OtherProvider.RelativePath then begin
491 | StrActive.Assign (NamesProvider.ValueNames);
492 | StrOther.Assign (OtherProvider.ValueNames);
493 | BuildListBoxes (StrActive, StrOther);
494 | end
495 | else begin
496 | //If the LeftProvider and the RightProvider does not point to the same
497 | //relative path, assign it to one and clear the other list box. This can
498 | //be one of two things, the "Other" provider does not have the key, or
499 | //both provider are not synchronized yet.
500 | StrActive.Assign (NamesProvider.ValueNames);
501 | StrOther.Clear;
502 | end;
503 |
504 | finally
505 | StrActive.EndUpdate;
506 | StrOther.EndUpdate;
507 | end;
508 | end;
509 |
510 | //Event handler for ValueNamesProvider.OnAsStringChanged. If the names have
511 | //values it will be displayed in the memo. If the left and the right are not
512 | //match, it will be displayed in green. This event handler is shared by
513 | //FLeftValueNamesProvider and FRightValueNamesProvider.
514 | procedure TfrmEditSetting.DisplayValue(const Intf: IInterface);
515 | var
516 | NamesProvider : IValueNamesProvider;
517 | Color : TColor;
518 | begin
519 | NamesProvider := Intf as IValueNamesProvider;
520 |
521 | //Find out which TMemo it should update.
522 | if NamesProvider = FLeftValueNamesProvider then
523 | memValueLeft.Lines.Text := NamesProvider.AsString
524 | else
525 | memValueRight.Lines.Text := NamesProvider.AsString;
526 |
527 | //If both TMemos have same value, set the color to normal, otherwise make it
528 | //green.
529 | if SameText (memValueLeft.Text, memValueRight.Text) then
530 | Color := clWindowText
531 | else
532 | Color := clGreen;
533 |
534 | memValueLeft.Font.Color := Color;
535 | memValueRight.Font.Color := Color;
536 | end;
537 |
538 | //Event handler when the list box is clicked. It will synchronizes both list
539 | //boxes. This event handler is shared by lbLeftValues and lbRightValues.
540 | procedure TfrmEditSetting.lbLeftValuesClick(Sender: TObject);
541 | var
542 | ListBox : TListBox;
543 | begin
544 | ListBox := (Sender as TListBox);
545 | SyncListBox (ListBox.ItemIndex, ListBox.TopIndex);
546 | end;
547 |
548 | //This method synchronizes the list box selection.
549 | procedure TfrmEditSetting.SyncListBox(const ANewSelection, ATopIndex: integer);
550 | procedure SetSelection (ListBox : TListBox;
551 | const NamesProvider : IValueNamesProvider);
552 | var
553 | ClickEvent : TNotifyEvent;
554 | SelectedName : string;
555 | begin
556 | //Disable the event handler, otherwise it might trapped into infinite loop.
557 | ClickEvent := ListBox.OnClick;
558 | ListBox.OnClick := nil;
559 | SelectedName := EmptyStr;
560 |
561 | //Set the ItemIndex and get the name. The name can be an empty string. Empty
562 | //string means that the selected name does not exist in the NameProvider.
563 | if ListBox.Items.Count > ANewSelection then begin
564 | ListBox.ItemIndex := ANewSelection;
565 | SelectedName := ListBox.Items [ANewSelection];
566 | end;
567 |
568 | //Synchronizes the TopIndex. This will synchonizes not only the selection
569 | //but also the item positions.
570 | if ListBox.Items.Count > ATopIndex then
571 | ListBox.TopIndex := ATopIndex;
572 |
573 | //Update the NameProvider.SelectedIndex. Remember, if SelectedName is an
574 | //empty string, the selected index is -1. The value name does not exist.
575 | NamesProvider.SelectedIndex := NamesProvider.GetNameIndex (SelectedName);
576 |
577 | //Restore the event handler.
578 | ListBox.OnClick := ClickEvent;
579 | end;
580 | begin
581 | SetSelection (lbLeftValues, FLeftValueNamesProvider);
582 | SetSelection (lbRightValues, FRightValueNamesProvider);
583 | end;
584 |
585 | //Copy value copies a value name from the SourceProvider to the TargetProvider.
586 | //ListBox parameter is needed, after copying the name/value, the ListBoxes need
587 | //to be synchronized.
588 | //If the Name exist on both SourceProvider, the value will be copied.
589 | procedure TfrmEditSetting.CopyValue(const SourceListBox: TListBox;
590 | const SourceProvider, TargetProvider: IValueNamesProvider);
591 | var
592 | TopIndex,
593 | SelectedIndex : integer;
594 | begin
595 | TopIndex := SourceListBox.TopIndex;
596 | SelectedIndex := SourceListBox.ItemIndex;
597 | TargetProvider.CopySelectedValue (SourceProvider);
598 | SyncListBox (SelectedIndex, TopIndex);
599 | end;
600 |
601 | //Delete a key. There is no check whether the treeview is read-only or not.
602 | procedure TfrmEditSetting.DeleteCurrentKey(
603 | const DelphiRegistry: IDelphiSettingRegistry; const TreeView : TTreeView);
604 | const
605 | CONFIRM_DELETE_KEY = 'Are you sure you want to delete "%s"?';
606 | var
607 | Node : TTreeNode;
608 | KeyName : string;
609 | begin
610 | Node := TreeView.Selected;
611 | KeyName := Node.Text;
612 |
613 | if (MessageDlg (Format (CONFIRM_DELETE_KEY, [KeyName]), mtConfirmation,
614 | [mbYes, mbNo], 0) = mrNo) then
615 | Exit;
616 |
617 | //Delete the current key.
618 | DelphiRegistry.DeleteCurrentKey;
619 | //The Treeview Controller does not rebuild the nodes when a node is deleted.
620 | //It is better to delete the node rather than clears the treeview and rebuild
621 | //everything.
622 | Node.Delete;
623 | end;
624 |
625 | //Delete selected value name, and synchronize the list box selection and top
626 | //position.
627 | procedure TfrmEditSetting.DeleteSelectedValue(
628 | const Provider: IValueNamesProvider; const SelectedItem, TopItem : integer);
629 | begin
630 | Provider.DeleteSelectedValue;
631 |
632 | if (SelectedItem < lbLeftValues.Items.Count) then begin
633 | lbLeftValues.Selected [SelectedItem] := true;
634 | lbLeftValues.TopIndex := TopItem;
635 | end;
636 |
637 | if (SelectedItem < lbRightValues.Items.Count) then begin
638 | lbRightValues.Selected [SelectedItem] := true;
639 | lbRightValues.TopIndex := TopItem;
640 | end;
641 | end;
642 |
643 | //Clear the selected value.
644 | procedure TfrmEditSetting.ClearSelectedValue(
645 | const Provider: IValueNamesProvider; const SelectedItem, TopItem : integer);
646 | begin
647 | Provider.ClearSelectedValue;
648 |
649 | if (SelectedItem < lbLeftValues.Items.Count) then begin
650 | lbLeftValues.Selected [SelectedItem] := true;
651 | lbLeftValues.TopIndex := TopItem;
652 | end;
653 |
654 | if (SelectedItem < lbRightValues.Items.Count) then begin
655 | lbRightValues.Selected [SelectedItem] := true;
656 | lbRightValues.TopIndex := TopItem;
657 | end;
658 | end;
659 |
660 | procedure TfrmEditSetting.actLeftCopyKeyToExecute(Sender: TObject);
661 | begin
662 | //Add Key. DelphiRegistrySetting will add the missing registry key, then it
663 | //will notify the changes and at the same time setting the newly created key
664 | //as the current key. TreeViewController as the observer will fail to find
665 | //related Node, as the key was just created. It then creates the node.
666 | //The OnChange event will get refired as side effect.
667 | FRightRegistry.AddKey (FLeftValueNamesProvider.RelativePath);
668 | end;
669 |
670 | procedure TfrmEditSetting.actRightCopyKeyToExecute(Sender: TObject);
671 | begin
672 | //Look at comment at the actLeftCopyKeyToExecute event handler.
673 | FLeftRegistry.AddKey (FRightValueNamesProvider.RelativePath);
674 | end;
675 |
676 | procedure TfrmEditSetting.actLeftDeleteKeyExecute(Sender: TObject);
677 | begin
678 | DeleteCurrentKey (FLeftRegistry, tvLeft);
679 | end;
680 |
681 | procedure TfrmEditSetting.actRightDeleteKeyExecute(Sender: TObject);
682 | begin
683 | DeleteCurrentKey (FRightRegistry, tvRight);
684 | end;
685 |
686 | procedure TfrmEditSetting.actRightCopyNameToExecute(Sender: TObject);
687 | begin
688 | CopyValue (lbRightValues, FRightValueNamesProvider, FLeftValueNamesProvider);
689 | end;
690 |
691 | procedure TfrmEditSetting.actLeftCopyNameToExecute(Sender: TObject);
692 | begin
693 | CopyValue (lbLeftValues, FLeftValueNamesProvider, FRightValueNamesProvider);
694 | end;
695 |
696 | procedure TfrmEditSetting.actLeftDeleteNameExecute(Sender: TObject);
697 | begin
698 | DeleteSelectedValue (FLeftValueNamesProvider, lbLeftValues.ItemIndex,
699 | lbLeftValues.TopIndex);
700 | end;
701 |
702 | procedure TfrmEditSetting.actRightDeleteNameExecute(Sender: TObject);
703 | begin
704 | DeleteSelectedValue (FRightValueNamesProvider, lbRightValues.ItemIndex,
705 | lbRightValues.TopIndex);
706 | end;
707 |
708 | procedure TfrmEditSetting.actLeftClearValueExecute(Sender: TObject);
709 | begin
710 | ClearSelectedValue (FLeftValueNamesProvider, lbLeftValues.ItemIndex,
711 | lbLeftValues.TopIndex);
712 | end;
713 |
714 | procedure TfrmEditSetting.actRightClearValueExecute(Sender: TObject);
715 | begin
716 | ClearSelectedValue (FRightValueNamesProvider, lbRightValues.ItemIndex,
717 | lbRightValues.TopIndex);
718 | end;
719 |
720 | //This event handler is shared by popLeftTree and popRightTree.
721 | //This menu does not enable or disable the menus based on the read-only property
722 | //as the menus is already disabled on SetLeftSettingPath and SetRightSettingPath
723 | procedure TfrmEditSetting.TreeMenuPopup(Sender: TObject);
724 | begin
725 | if Sender = popLeftTree then begin
726 | actLeftCopyKeyTo.Caption := Format (COPY_KEY_CAPTION,
727 | [tvLeft.Selected.Text, FRightSettingName]);
728 | actLeftDeleteKey.Caption := Format (DELETE_KEY_CAPTION,
729 | [tvLeft.Selected.Text]);
730 | end
731 | else begin
732 | actRightCopyKeyTo.Caption := Format (COPY_KEY_CAPTION,
733 | [tvRight.Selected.Text, FLeftSettingName]);
734 | actRightDeleteKey.Caption := Format (DELETE_KEY_CAPTION,
735 | [tvRight.Selected.Text]);
736 | end;
737 | end;
738 |
739 | //This event handler is shared by popLeftValue and popRightValue.
740 | //This controls what menus will be visible and what is the text for those menus.
741 | procedure TfrmEditSetting.popLeftValuePopup(Sender: TObject);
742 | var
743 | IsValueSelected : boolean;
744 | ValueName : string;
745 | begin
746 | if Sender = popLeftValue then begin
747 | //The blank lines on the ListBox can be a blank line or a missing value name
748 | //If it is a missing value name, SelectedIndex will be -1.
749 |
750 | IsValueSelected := (FLeftValueNamesProvider.SelectedIndex <> -1);
751 |
752 | //Set captions for the menus here.
753 | if (IsValueSelected = true) then begin
754 | ValueName := FLeftValueNamesProvider.ValueNames [FLeftValueNamesProvider.SelectedIndex];
755 | actLeftCopyNameTo.Caption := Format (COPY_NAME_CAPTION,
756 | [ValueName, FRightSettingName]);
757 | actLeftDeleteName.Caption := Format (DELETE_NAME_CAPTION, [ValueName]);
758 | end;
759 |
760 | //Set whether the menus should be disabled or enabled.
761 | actLeftCopyNameTo.Enabled := IsValueSelected and (FRightReadOnly = false);
762 | actLeftDeleteName.Enabled := IsValueSelected and (FLeftReadOnly = false);
763 | actLeftClearValue.Enabled := IsValueSelected and (FLeftReadOnly = false);
764 | end
765 | else begin
766 | IsValueSelected := (FRightValueNamesProvider.SelectedIndex <> -1);
767 |
768 | if (IsValueSelected = true) then begin
769 | ValueName := FRightValueNamesProvider.ValueNames [FRightValueNamesProvider.SelectedIndex];
770 | actRightCopyNameTo.Caption := Format (COPY_NAME_CAPTION,
771 | [ValueName, FLeftSettingName]);
772 | actRightDeleteName.Caption := Format (DELETE_NAME_CAPTION, [ValueName]);
773 | end;
774 |
775 | actRightCopyNameTo.Enabled := IsValueSelected and (FLeftReadOnly = false);
776 | actRightDeleteName.Enabled := IsValueSelected and (FRightReadOnly = false);
777 | actRightClearValue.Enabled := IsValueSelected and (FRightReadOnly = false);
778 |
779 | end;
780 | end;
781 |
782 | procedure TfrmEditSetting.FormResize(Sender: TObject);
783 | begin
784 | pnlValuesLeft.Width := pnlLeft.Width;
785 | end;
786 |
787 | procedure TfrmEditSetting.TreeViewKeyDown(Sender: TObject; var Key: Word;
788 | Shift: TShiftState);
789 | begin
790 | if (Key <> VK_DELETE) then
791 | Exit;
792 |
793 | if (Sender = tvLeft) and
794 | (FLeftReadOnly = false) then
795 | DeleteCurrentKey (FLeftRegistry, tvLeft);
796 |
797 | if (Sender = tvRight) and
798 | (FRightReadOnly = false) then
799 | DeleteCurrentKey (FRightRegistry, tvRight);
800 | end;
801 |
802 | procedure TfrmEditSetting.ValueNamesKeyDown(Sender: TObject; var Key: Word;
803 | Shift: TShiftState);
804 | begin
805 | if (Key <> VK_DELETE) then
806 | Exit;
807 |
808 | if (Sender = lbLeftValues) and
809 | (FLeftReadOnly = false) then
810 | DeleteSelectedValue (FLeftValueNamesProvider, lbLeftValues.ItemIndex,
811 | lbLeftValues.TopIndex);
812 |
813 | if (Sender = lbRightValues) and
814 | (FRightReadOnly = false) then
815 | DeleteSelectedValue (FRightValueNamesProvider, lbRightValues.ItemIndex,
816 | lbRightValues.TopIndex);
817 |
818 | end;
819 |
820 | destructor TfrmEditSetting.Destroy;
821 | begin
822 | if Assigned (FSettingProperties) then begin
823 | SettingPersistent.GetIniPersistentManager.SaveSetting (FSettingProperties);
824 | FreeAndNil (FSettingProperties);
825 | end;
826 |
827 | inherited;
828 | end;
829 |
830 | { TEditSettingProperties }
831 |
832 | function TEditSettingProperties.GetTopPanelHeight: integer;
833 | begin
834 | Result := (Form as TfrmEditSetting).pnlTop.Height;
835 | end;
836 |
837 | procedure TEditSettingProperties.SetTopPanelHeight(const Value: integer);
838 | begin
839 | (Form as TfrmEditSetting).pnlTop.Height := Value;
840 | end;
841 |
842 | function TEditSettingProperties.GetLeftPanelWidth: integer;
843 | begin
844 | Result := (Form as TfrmEditSetting).pnlLeft.Width;
845 | end;
846 |
847 | procedure TEditSettingProperties.SetPanelWidth(const Value: integer);
848 | begin
849 | (Form as TfrmEditSetting).pnlLeft.Width := Value;
850 | end;
851 |
852 | end.
853 |
--------------------------------------------------------------------------------
/Source/fMain.dfm:
--------------------------------------------------------------------------------
1 | object frmMain: TfrmMain
2 | Left = 330
3 | Top = 86
4 | Caption = 'Delphi Setting Manager'
5 | ClientHeight = 312
6 | ClientWidth = 534
7 | Color = clBtnFace
8 | Constraints.MinHeight = 300
9 | Constraints.MinWidth = 350
10 | Font.Charset = DEFAULT_CHARSET
11 | Font.Color = clWindowText
12 | Font.Height = -11
13 | Font.Name = 'MS Sans Serif'
14 | Font.Style = []
15 | Padding.Left = 8
16 | Padding.Top = 8
17 | Padding.Right = 8
18 | Padding.Bottom = 8
19 | Menu = Menu
20 | OldCreateOrder = False
21 | Position = poDesigned
22 | Scaled = False
23 | PixelsPerInch = 96
24 | TextHeight = 13
25 | object pcInstalledIDE: TPageControl
26 | Left = 8
27 | Top = 8
28 | Width = 518
29 | Height = 263
30 | Align = alClient
31 | Images = iLst_IDEs
32 | TabOrder = 0
33 | end
34 | object pnl_Buttons: TPanel
35 | Left = 8
36 | Top = 271
37 | Width = 518
38 | Height = 33
39 | Align = alBottom
40 | BevelOuter = bvNone
41 | DoubleBuffered = True
42 | Padding.Top = 8
43 | ParentDoubleBuffered = False
44 | TabOrder = 1
45 | object btnCreateShortcut: TButton
46 | AlignWithMargins = True
47 | Left = 0
48 | Top = 8
49 | Width = 120
50 | Height = 25
51 | Margins.Left = 0
52 | Margins.Top = 0
53 | Margins.Right = 8
54 | Margins.Bottom = 0
55 | Action = actCreateShortcut
56 | Align = alLeft
57 | DisabledImageIndex = 16
58 | HotImageIndex = 17
59 | ImageMargins.Left = 5
60 | Images = dm_Glyphs.iLst_Buttons
61 | TabOrder = 0
62 | end
63 | object btnClose: TButton
64 | Left = 443
65 | Top = 8
66 | Width = 75
67 | Height = 25
68 | Action = actFileExit
69 | Align = alRight
70 | DisabledImageIndex = 22
71 | HotImageIndex = 23
72 | ImageMargins.Left = 5
73 | Images = dm_Glyphs.iLst_Buttons
74 | TabOrder = 2
75 | end
76 | object btnRunDelphi: TButton
77 | Left = 128
78 | Top = 8
79 | Width = 100
80 | Height = 25
81 | Action = actRunDelphi
82 | Align = alLeft
83 | DisabledImageIndex = 19
84 | HotImageIndex = 20
85 | ImageMargins.Left = 5
86 | Images = dm_Glyphs.iLst_Buttons
87 | TabOrder = 1
88 | end
89 | end
90 | object Menu: TMainMenu
91 | Images = dm_Glyphs.iLst_Buttons
92 | Left = 200
93 | Top = 96
94 | object File1: TMenuItem
95 | Caption = 'File'
96 | object SaveSetting1: TMenuItem
97 | Action = actSaveSetting
98 | end
99 | object N1: TMenuItem
100 | Caption = '-'
101 | end
102 | object Exit1: TMenuItem
103 | Action = actFileExit
104 | end
105 | end
106 | object mnuCustomSetting: TMenuItem
107 | Caption = 'Custom Settings'
108 | object NewCustomSetting: TMenuItem
109 | Action = actNewSetting
110 | end
111 | object DeleteCustomSetting: TMenuItem
112 | Action = actDeleteSetting
113 | end
114 | object RenameCustomSetting: TMenuItem
115 | Action = actRenameSetting
116 | end
117 | object CopyCustomSetting: TMenuItem
118 | Action = actCopySetting
119 | end
120 | object Edit1: TMenuItem
121 | Action = actEditSetting
122 | end
123 | object N2: TMenuItem
124 | Caption = '-'
125 | end
126 | object CreateShortcut1: TMenuItem
127 | Action = actCreateShortcut
128 | end
129 | object RunDelphi1: TMenuItem
130 | Action = actRunDelphi
131 | end
132 | end
133 | object Options1: TMenuItem
134 | Caption = 'Options'
135 | object RestoreDefaultSize1: TMenuItem
136 | Action = actRestoreSize
137 | end
138 | end
139 | object Help1: TMenuItem
140 | Caption = 'Help'
141 | object About1: TMenuItem
142 | Action = actAbout
143 | end
144 | end
145 | end
146 | object dlgSave: TSaveDialog
147 | DefaultExt = 'lnk'
148 | Options = [ofOverwritePrompt, ofHideReadOnly, ofEnableSizing]
149 | Left = 264
150 | Top = 96
151 | end
152 | object ActionList: TActionList
153 | Images = dm_Glyphs.iLst_Buttons
154 | Left = 264
155 | Top = 184
156 | object actFileExit: TFileExit
157 | Category = 'File'
158 | Caption = 'E&xit'
159 | Hint = 'Exit|Quits the application'
160 | ImageIndex = 21
161 | end
162 | object actCreateShortcut: TAction
163 | Category = 'CustomSettings'
164 | Caption = 'Create S&hortcut'
165 | ImageIndex = 15
166 | ShortCut = 16456
167 | OnExecute = actCreateShortcutExecute
168 | end
169 | object actRunDelphi: TAction
170 | Category = 'CustomSettings'
171 | Caption = 'R&un Delphi'
172 | ImageIndex = 18
173 | ShortCut = 16469
174 | OnExecute = actRunDelphiExecute
175 | end
176 | object actNewSetting: TAction
177 | Category = 'CustomSettings'
178 | Caption = '&New'
179 | ImageIndex = 0
180 | ShortCut = 16462
181 | OnExecute = actNewSettingExecute
182 | end
183 | object actDeleteSetting: TAction
184 | Category = 'CustomSettings'
185 | Caption = '&Delete'
186 | ImageIndex = 3
187 | ShortCut = 16452
188 | OnExecute = actDeleteSettingExecute
189 | end
190 | object actRenameSetting: TAction
191 | Category = 'CustomSettings'
192 | Caption = '&Rename'
193 | ImageIndex = 6
194 | ShortCut = 16466
195 | OnExecute = actRenameSettingExecute
196 | end
197 | object actCopySetting: TAction
198 | Category = 'CustomSettings'
199 | Caption = '&Copy'
200 | ImageIndex = 9
201 | ShortCut = 16451
202 | OnExecute = actCopySettingExecute
203 | end
204 | object actRestoreSize: TAction
205 | Category = 'Options'
206 | Caption = 'Restore Default Form Size'
207 | OnExecute = actRestoreSizeExecute
208 | end
209 | object actSaveSetting: TAction
210 | Category = 'File'
211 | Caption = '&Save Setting to File'
212 | ImageIndex = 27
213 | ShortCut = 16467
214 | OnExecute = actSaveSettingExecute
215 | end
216 | object actAbout: TAction
217 | Category = 'Help'
218 | Caption = 'About'
219 | OnExecute = actAboutExecute
220 | end
221 | object actEditSetting: TAction
222 | Category = 'CustomSettings'
223 | Caption = '&Edit'
224 | ImageIndex = 12
225 | ShortCut = 16453
226 | OnExecute = actEditSettingExecute
227 | end
228 | end
229 | object iLst_IDEs: TImageList
230 | ColorDepth = cd32Bit
231 | DrawingStyle = dsTransparent
232 | Left = 132
233 | Top = 184
234 | end
235 | end
236 |
--------------------------------------------------------------------------------
/Source/fMain.pas:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Arvur/DelphiSettingManager/9f2f111b1d0c5a7ff64435f9ba2c32898138be82/Source/fMain.pas
--------------------------------------------------------------------------------
/Source/fNewSetting.dfm:
--------------------------------------------------------------------------------
1 | object frmNewSetting: TfrmNewSetting
2 | Left = 258
3 | Top = 65
4 | Caption = 'New IDE Setting'
5 | ClientHeight = 172
6 | ClientWidth = 388
7 | Color = clBtnFace
8 | Constraints.MinHeight = 150
9 | Constraints.MinWidth = 380
10 | Font.Charset = DEFAULT_CHARSET
11 | Font.Color = clWindowText
12 | Font.Height = -11
13 | Font.Name = 'MS Sans Serif'
14 | Font.Style = []
15 | OldCreateOrder = False
16 | Position = poMainFormCenter
17 | DesignSize = (
18 | 388
19 | 172)
20 | PixelsPerInch = 96
21 | TextHeight = 13
22 | object lblTemplates: TStaticText
23 | Left = 8
24 | Top = 56
25 | Width = 53
26 | Height = 17
27 | Caption = 'Templates'
28 | TabOrder = 5
29 | end
30 | object lblSettingName: TLabeledEdit
31 | Left = 8
32 | Top = 24
33 | Width = 372
34 | Height = 21
35 | Anchors = [akLeft, akTop, akRight]
36 | EditLabel.Width = 64
37 | EditLabel.Height = 13
38 | EditLabel.Caption = 'Setting Name'
39 | MaxLength = 64
40 | TabOrder = 0
41 | OnChange = lblSettingNameChange
42 | OnKeyPress = lblSettingNameKeyPress
43 | end
44 | object btnOK: TButton
45 | Left = 222
46 | Top = 139
47 | Width = 75
48 | Height = 25
49 | Anchors = [akRight, akBottom]
50 | Caption = 'OK'
51 | Default = True
52 | DisabledImageIndex = 25
53 | DoubleBuffered = True
54 | HotImageIndex = 26
55 | ImageIndex = 24
56 | ImageMargins.Left = 10
57 | Images = dm_Glyphs.iLst_Buttons
58 | ModalResult = 1
59 | ParentDoubleBuffered = False
60 | TabOrder = 3
61 | end
62 | object btnCancel: TButton
63 | Left = 305
64 | Top = 139
65 | Width = 75
66 | Height = 25
67 | Anchors = [akRight, akBottom]
68 | Cancel = True
69 | Caption = 'Cancel'
70 | DisabledImageIndex = 4
71 | DoubleBuffered = True
72 | HotImageIndex = 5
73 | ImageIndex = 3
74 | ImageMargins.Left = 5
75 | Images = dm_Glyphs.iLst_Buttons
76 | ModalResult = 2
77 | ParentDoubleBuffered = False
78 | TabOrder = 4
79 | end
80 | object cbCopyCurrentIDESetting: TCheckBox
81 | Left = 222
82 | Top = 56
83 | Width = 158
84 | Height = 17
85 | Hint =
86 | 'Check this if you want to copy your default configuration to thi' +
87 | 's new configuration'
88 | Alignment = taLeftJustify
89 | Anchors = [akTop, akRight]
90 | Caption = 'Copy Current IDE Setting'
91 | Checked = True
92 | ParentShowHint = False
93 | ShowHint = True
94 | State = cbChecked
95 | TabOrder = 2
96 | end
97 | object clbTemplates: TCheckListBox
98 | Left = 8
99 | Top = 72
100 | Width = 206
101 | Height = 92
102 | Anchors = [akLeft, akTop, akRight, akBottom]
103 | ItemHeight = 13
104 | TabOrder = 1
105 | end
106 | end
107 |
--------------------------------------------------------------------------------
/Source/fNewSetting.pas:
--------------------------------------------------------------------------------
1 | {-----------------------------------------------------------------------------
2 | Unit Name: fNewSetting
3 | Author: Erwien Saputra
4 | Purpose: User interface to add a new setting. If the class function returns
5 | true, the NewSettingName is meaningful.
6 | History:
7 | 02/21/2005 - Updated the tab order.
8 | 06/18/2005 - Added support for Setting Template.
9 | 06/22/2005 - Modified the execute method, this form loads the templates first
10 | before assigning the new template name.
11 | -----------------------------------------------------------------------------}
12 |
13 | unit fNewSetting;
14 |
15 | interface
16 |
17 | uses
18 | Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
19 | Dialogs, StdCtrls, Buttons, ExtCtrls, SettingTemplate, SettingCollection,
20 | CheckLst;
21 |
22 | type
23 | TStringArray = array of string;
24 |
25 | TfrmNewSetting = class(TForm)
26 | lblSettingName: TLabeledEdit;
27 | btnOK: TButton;
28 | btnCancel: TButton;
29 | cbCopyCurrentIDESetting: TCheckBox;
30 | clbTemplates: TCheckListBox;
31 | lblTemplates: TStaticText;
32 | procedure lblSettingNameKeyPress(Sender: TObject; var Key: Char);
33 | procedure lblSettingNameChange(Sender: TObject);
34 | private
35 | { Private declarations }
36 | procedure LoadIDETemplates (const AIDEVersion : TIDEVersion);
37 | public
38 | { Public declarations }
39 | constructor Create (AOwner: TComponent); override;
40 | class function Execute (var NewSettingName : string;
41 | const AIDEVersion : TIDEVersion; var UseCurrentIDESetting: boolean;
42 | var AppliedTemplates : TStringArray) : boolean;
43 | end;
44 |
45 | var
46 | frmNewSetting: TfrmNewSetting;
47 |
48 | implementation
49 |
50 | uses
51 | dmGlyphs;
52 |
53 | {$R *.dfm}
54 |
55 | const
56 | DEFAULT_SETTING_HINT =
57 | 'Check this if you want to use the default IDE setting to be copied to ' +
58 | 'your new custom setting.' + sLineBreak +
59 | 'If this option is unchecked, the new custom setting will have the ' +
60 | 'default factory setting.';
61 |
62 | { TfrmNewSetting }
63 | constructor TfrmNewSetting.Create(AOwner: TComponent);
64 | begin
65 | inherited;
66 | cbCopyCurrentIDESetting.Hint := DEFAULT_SETTING_HINT;
67 | self.clbTemplates.MultiSelect := true;
68 | end;
69 |
70 | //Entry point for this form. If NewSettingName is initialized, it will be used
71 | //on the edit box.
72 | //This function returns true if the user clicks OK and the user set the new
73 | //setting name.
74 | class function TfrmNewSetting.Execute(var NewSettingName: string;
75 | const AIDEVersion : TIDEVersion; var UseCurrentIDESetting: boolean;
76 | var AppliedTemplates : TStringArray) : boolean;
77 | var
78 | frm : TfrmNewSetting;
79 | Index,
80 | Loop : integer;
81 | begin
82 | frm := TfrmNewSetting.Create (nil);
83 |
84 | try
85 | //Load the template from the Template persistent. LoadIDETemplate must be
86 | //called before lblSettingName is set, as the lblSettingNameChange event
87 | //handler depends on the state of clbTemplate. Whenever have time, remove
88 | //the coupling from the lblSettingNameChange, do not rely on the event
89 | //handler.
90 | frm.LoadIDETemplates (AIDEVersion);
91 |
92 | if Trim (NewSettingName) <> EmptyStr then
93 | frm.lblSettingName.Text := NewSettingName
94 | else
95 | frm.lblSettingName.Text := EmptyStr;
96 |
97 | frm.lblSettingName.SelectAll;
98 | Result := (frm.ShowModal = MrOK) and
99 | (frm.lblSettingName.Text <> EmptyStr);
100 |
101 | UseCurrentIDESetting := frm.cbCopyCurrentIDESetting.Checked;
102 |
103 | if (Result = true) then begin
104 | NewSettingName := frm.lblSettingName.Text;
105 |
106 | SetLength (AppliedTemplates, frm.clbTemplates.Count);
107 | Index := 0;
108 |
109 | //Return the selected template to the caller.
110 | for Loop := 0 to frm.clbTemplates.Count - 1 do begin
111 | if frm.clbTemplates.Checked[Loop] = true then begin
112 | AppliedTemplates[Index] := frm.clbTemplates.Items[Loop];
113 | Inc (Index);
114 | end;
115 | end;
116 |
117 | //Set the length of the Applied Templates array.
118 | SetLength (AppliedTemplates, Index);
119 | end;
120 |
121 | finally
122 | frm.Release;
123 | end;
124 | end;
125 |
126 | procedure TfrmNewSetting.lblSettingNameChange(Sender: TObject);
127 | var
128 | EnableControl : boolean;
129 | begin
130 | EnableControl := not SameText (Trim (lblSettingName.Text), EmptyStr);
131 | btnOK.Enabled := EnableControl;
132 | cbCopyCurrentIDESetting.Enabled := EnableControl;
133 | clbTemplates.Enabled := EnableControl and (clbTemplates.Count > 0);
134 | lblTemplates.Enabled := clbTemplates.Enabled;
135 | end;
136 |
137 | procedure TfrmNewSetting.lblSettingNameKeyPress(Sender: TObject; var Key: Char);
138 | begin
139 | if Key = '\' then
140 | Key := #0;
141 | end;
142 |
143 | procedure TfrmNewSetting.LoadIDETemplates(const AIDEVersion: TIDEVersion);
144 | var
145 | TemplateCollection : ITemplateCollection;
146 | begin
147 | clbTemplates.Items.Clear;
148 | TemplateCollection := SettingTemplate.GetTemplateCollection;
149 |
150 | if Assigned (TemplateCollection) then
151 | TemplateCollection.GetTemplateNames (AIDEVersion, clbTemplates.Items);
152 | end;
153 |
154 | end.
155 |
--------------------------------------------------------------------------------
/Source/fRenameSetting.dfm:
--------------------------------------------------------------------------------
1 | object frmRenameSetting: TfrmRenameSetting
2 | Left = 477
3 | Top = 188
4 | ActiveControl = lblNewName
5 | BorderStyle = bsDialog
6 | ClientHeight = 135
7 | ClientWidth = 294
8 | Color = clBtnFace
9 | Constraints.MinWidth = 200
10 | Font.Charset = DEFAULT_CHARSET
11 | Font.Color = clWindowText
12 | Font.Height = -11
13 | Font.Name = 'MS Sans Serif'
14 | Font.Style = []
15 | OldCreateOrder = False
16 | Position = poMainFormCenter
17 | DesignSize = (
18 | 294
19 | 135)
20 | PixelsPerInch = 96
21 | TextHeight = 13
22 | object lblOldName: TLabeledEdit
23 | Left = 8
24 | Top = 24
25 | Width = 278
26 | Height = 21
27 | TabStop = False
28 | Anchors = [akLeft, akTop, akRight]
29 | EditLabel.Width = 47
30 | EditLabel.Height = 13
31 | EditLabel.Caption = 'Old Name'
32 | ReadOnly = True
33 | TabOrder = 0
34 | end
35 | object lblNewName: TLabeledEdit
36 | Left = 8
37 | Top = 64
38 | Width = 278
39 | Height = 21
40 | Anchors = [akLeft, akTop, akRight]
41 | EditLabel.Width = 53
42 | EditLabel.Height = 13
43 | EditLabel.Caption = 'New Name'
44 | TabOrder = 1
45 | OnChange = lblNewNameChange
46 | OnKeyPress = lblNewNameKeyPress
47 | end
48 | object btnOK: TButton
49 | Left = 128
50 | Top = 102
51 | Width = 75
52 | Height = 25
53 | Anchors = [akRight, akBottom]
54 | Caption = 'OK'
55 | Default = True
56 | DisabledImageIndex = 25
57 | DoubleBuffered = True
58 | HotImageIndex = 26
59 | ImageIndex = 24
60 | ImageMargins.Left = 10
61 | Images = dm_Glyphs.iLst_Buttons
62 | ModalResult = 1
63 | ParentDoubleBuffered = False
64 | TabOrder = 2
65 | end
66 | object btnCancel: TButton
67 | Left = 211
68 | Top = 102
69 | Width = 75
70 | Height = 25
71 | Anchors = [akRight, akBottom]
72 | Cancel = True
73 | Caption = 'Cancel'
74 | DisabledImageIndex = 4
75 | DoubleBuffered = True
76 | HotImageIndex = 5
77 | ImageIndex = 3
78 | ImageMargins.Left = 5
79 | Images = dm_Glyphs.iLst_Buttons
80 | ModalResult = 2
81 | ParentDoubleBuffered = False
82 | TabOrder = 3
83 | end
84 | end
85 |
--------------------------------------------------------------------------------
/Source/fRenameSetting.pas:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Arvur/DelphiSettingManager/9f2f111b1d0c5a7ff64435f9ba2c32898138be82/Source/fRenameSetting.pas
--------------------------------------------------------------------------------
/Source/frmSetting.dfm:
--------------------------------------------------------------------------------
1 | object frmSettingList: TfrmSettingList
2 | Left = 0
3 | Top = 0
4 | Width = 396
5 | Height = 264
6 | TabOrder = 0
7 | TabStop = True
8 | object lbSettings: TListBox
9 | Left = 0
10 | Top = 0
11 | Width = 311
12 | Height = 264
13 | Align = alClient
14 | ItemHeight = 13
15 | MultiSelect = True
16 | TabOrder = 0
17 | OnClick = lbSettingsClick
18 | OnDblClick = lbSettingsDblClick
19 | OnKeyDown = lbSettingsKeyDown
20 | end
21 | object pnl_Buttons: TPanel
22 | Left = 311
23 | Top = 0
24 | Width = 85
25 | Height = 264
26 | Align = alRight
27 | BevelOuter = bvNone
28 | DoubleBuffered = True
29 | Padding.Left = 5
30 | Padding.Top = 5
31 | Padding.Right = 5
32 | Padding.Bottom = 5
33 | ParentDoubleBuffered = False
34 | TabOrder = 1
35 | object btnNew: TButton
36 | AlignWithMargins = True
37 | Left = 5
38 | Top = 5
39 | Width = 75
40 | Height = 25
41 | Margins.Left = 0
42 | Margins.Top = 0
43 | Margins.Right = 0
44 | Margins.Bottom = 5
45 | Align = alTop
46 | Caption = 'New'
47 | DisabledImageIndex = 1
48 | HotImageIndex = 2
49 | ImageIndex = 0
50 | ImageMargins.Left = 5
51 | Images = dm_Glyphs.iLst_Buttons
52 | TabOrder = 0
53 | OnClick = btnNewClick
54 | end
55 | object btnDelete: TButton
56 | AlignWithMargins = True
57 | Left = 5
58 | Top = 35
59 | Width = 75
60 | Height = 25
61 | Margins.Left = 0
62 | Margins.Top = 0
63 | Margins.Right = 0
64 | Margins.Bottom = 5
65 | Align = alTop
66 | Caption = 'Delete'
67 | DisabledImageIndex = 4
68 | HotImageIndex = 5
69 | ImageIndex = 3
70 | ImageMargins.Left = 5
71 | Images = dm_Glyphs.iLst_Buttons
72 | TabOrder = 1
73 | OnClick = btnDeleteClick
74 | end
75 | object btnRename: TButton
76 | AlignWithMargins = True
77 | Left = 5
78 | Top = 65
79 | Width = 75
80 | Height = 25
81 | Margins.Left = 0
82 | Margins.Top = 0
83 | Margins.Right = 0
84 | Margins.Bottom = 5
85 | Align = alTop
86 | Caption = 'Rename'
87 | DisabledImageIndex = 7
88 | HotImageIndex = 8
89 | ImageIndex = 6
90 | ImageMargins.Left = 5
91 | Images = dm_Glyphs.iLst_Buttons
92 | TabOrder = 2
93 | OnClick = btnRenameClick
94 | end
95 | object btnCopy: TButton
96 | AlignWithMargins = True
97 | Left = 5
98 | Top = 95
99 | Width = 75
100 | Height = 25
101 | Margins.Left = 0
102 | Margins.Top = 0
103 | Margins.Right = 0
104 | Margins.Bottom = 5
105 | Align = alTop
106 | Caption = 'Copy'
107 | DisabledImageIndex = 10
108 | HotImageIndex = 11
109 | ImageIndex = 9
110 | ImageMargins.Left = 5
111 | Images = dm_Glyphs.iLst_Buttons
112 | TabOrder = 3
113 | OnClick = btnCopyClick
114 | end
115 | object btnEdit: TButton
116 | AlignWithMargins = True
117 | Left = 5
118 | Top = 125
119 | Width = 75
120 | Height = 25
121 | Margins.Left = 0
122 | Margins.Top = 0
123 | Margins.Right = 0
124 | Margins.Bottom = 5
125 | Align = alTop
126 | Caption = 'Edit'
127 | DisabledImageIndex = 13
128 | HotImageIndex = 14
129 | ImageIndex = 12
130 | ImageMargins.Left = 5
131 | Images = dm_Glyphs.iLst_Buttons
132 | TabOrder = 4
133 | OnClick = btnEditClick
134 | end
135 | end
136 | end
137 |
--------------------------------------------------------------------------------
/Source/frmSetting.pas:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Arvur/DelphiSettingManager/9f2f111b1d0c5a7ff64435f9ba2c32898138be82/Source/frmSetting.pas
--------------------------------------------------------------------------------