WinConfiguration.h 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455
  1. //---------------------------------------------------------------------------
  2. #ifndef WinConfigurationH
  3. #define WinConfigurationH
  4. //---------------------------------------------------------------------------
  5. #include "CustomWinConfiguration.h"
  6. #include "CustomDirView.hpp"
  7. //---------------------------------------------------------------------------
  8. enum TEditor { edInternal, edExternal };
  9. extern const char ShellCommandFileNamePattern[];
  10. //---------------------------------------------------------------------------
  11. #define C(Property) (Property != rhc.Property) ||
  12. struct TScpExplorerConfiguration {
  13. AnsiString WindowParams;
  14. AnsiString DirViewParams;
  15. AnsiString ToolbarsLayout;
  16. bool StatusBar;
  17. AnsiString LastLocalTargetDirectory;
  18. int ViewStyle;
  19. bool ShowFullAddress;
  20. bool DriveView;
  21. int DriveViewWidth;
  22. int SessionComboWidth;
  23. bool __fastcall operator !=(TScpExplorerConfiguration & rhc)
  24. { return C(WindowParams) C(DirViewParams) C(ToolbarsLayout) C(StatusBar)
  25. C(LastLocalTargetDirectory) C(ViewStyle) C(ShowFullAddress)
  26. C(DriveView) C(DriveViewWidth) C(SessionComboWidth) 0; };
  27. };
  28. //---------------------------------------------------------------------------
  29. struct TScpCommanderPanelConfiguration {
  30. AnsiString DirViewParams;
  31. bool StatusBar;
  32. bool DriveView;
  33. int DriveViewHeight;
  34. bool __fastcall operator !=(TScpCommanderPanelConfiguration & rhc)
  35. { return C(DirViewParams) C(StatusBar)
  36. C(DriveView) C(DriveViewHeight) 0; };
  37. };
  38. //---------------------------------------------------------------------------
  39. struct TScpCommanderConfiguration {
  40. AnsiString WindowParams;
  41. float LocalPanelWidth;
  42. AnsiString ToolbarsLayout;
  43. bool StatusBar;
  44. bool CommandLine;
  45. TOperationSide CurrentPanel;
  46. TNortonLikeMode NortonLikeMode;
  47. bool PreserveLocalDirectory;
  48. TScpCommanderPanelConfiguration LocalPanel;
  49. TScpCommanderPanelConfiguration RemotePanel;
  50. bool CompareByTime;
  51. bool CompareBySize;
  52. bool SwappedPanels;
  53. int SessionComboWidth;
  54. bool FullRowSelect;
  55. bool __fastcall operator !=(TScpCommanderConfiguration & rhc)
  56. { return C(WindowParams) C(LocalPanelWidth) C(ToolbarsLayout) C(StatusBar)
  57. C(LocalPanel) C(RemotePanel) C(CurrentPanel) C(CommandLine)
  58. C(NortonLikeMode) C(PreserveLocalDirectory)
  59. C(CompareBySize) C(CompareByTime) C(SwappedPanels)
  60. C(SessionComboWidth) C(FullRowSelect) 0; };
  61. TCompareCriterias __fastcall CompareCriterias()
  62. {
  63. TCompareCriterias Criterias;
  64. if (CompareByTime)
  65. {
  66. Criterias << ccTime;
  67. }
  68. if (CompareBySize)
  69. {
  70. Criterias << ccSize;
  71. }
  72. return Criterias;
  73. }
  74. };
  75. //---------------------------------------------------------------------------
  76. struct TEditorConfiguration {
  77. AnsiString FontName;
  78. int FontHeight;
  79. int FontCharset;
  80. int FontStyle;
  81. bool WordWrap;
  82. AnsiString FindText;
  83. AnsiString ReplaceText;
  84. bool FindMatchCase;
  85. bool FindWholeWord;
  86. bool SingleEditor;
  87. unsigned int MaxEditors;
  88. unsigned int EarlyClose;
  89. bool __fastcall operator !=(TEditorConfiguration & rhc)
  90. { return C(FontName) C(FontHeight)
  91. C(FontCharset) C(FontStyle) C(WordWrap) C(FindText) C(ReplaceText)
  92. C(FindMatchCase) C(FindWholeWord) C(SingleEditor)
  93. C(MaxEditors) C(EarlyClose) 0; };
  94. };
  95. //---------------------------------------------------------------------------
  96. enum TQueueViewShow { qvShow, qvHideWhenEmpty, qvHide };
  97. struct TQueueViewConfiguration {
  98. int Height;
  99. AnsiString Layout;
  100. TQueueViewShow Show;
  101. TQueueViewShow LastHideShow;
  102. bool ToolBar;
  103. bool __fastcall operator !=(TQueueViewConfiguration & rhc)
  104. { return C(Height) C(Layout) C(Show) C(LastHideShow) C(ToolBar) 0; };
  105. };
  106. //---------------------------------------------------------------------------
  107. struct TUpdatesData
  108. {
  109. int ForVersion;
  110. int Version;
  111. AnsiString Message;
  112. bool Critical;
  113. AnsiString Release;
  114. bool Disabled;
  115. AnsiString Url;
  116. AnsiString UrlButton;
  117. bool __fastcall operator !=(TUpdatesData & rhc)
  118. { return C(ForVersion) C(Version) C(Message) C(Critical) C(Release)
  119. C(Disabled) C(Url) C(UrlButton) 0; };
  120. void Reset()
  121. {
  122. ForVersion = 0;
  123. Version = 0;
  124. Message = "";
  125. Critical = false;
  126. Release = "";
  127. Disabled = false;
  128. Url = "";
  129. UrlButton = "";
  130. }
  131. };
  132. //---------------------------------------------------------------------------
  133. struct TUpdatesConfiguration
  134. {
  135. TDateTime Period;
  136. TDateTime LastCheck;
  137. AnsiString ProxyHost;
  138. int ProxyPort;
  139. bool HaveResults;
  140. bool ShownResults;
  141. TUpdatesData Results;
  142. bool __fastcall operator !=(TUpdatesConfiguration & rhc)
  143. { return C(Period) C(LastCheck) C(ProxyHost) C(ProxyPort) C(HaveResults)
  144. C(ShownResults) C(Results) 0; };
  145. };
  146. //---------------------------------------------------------------------------
  147. struct TEditorData
  148. {
  149. TFileMasks FileMask;
  150. TEditor Editor;
  151. AnsiString ExternalEditor;
  152. bool ExternalEditorText;
  153. bool MDIExternalEditor;
  154. bool DetectMDIExternalEditor;
  155. };
  156. //---------------------------------------------------------------------------
  157. #undef C
  158. //---------------------------------------------------------------------------
  159. class TEditorPreferences
  160. {
  161. public:
  162. __fastcall TEditorPreferences();
  163. __fastcall TEditorPreferences(const TEditorPreferences & Source);
  164. bool __fastcall Matches(const AnsiString FileName, bool Local,
  165. const TFileMasks::TParams & Params) const;
  166. void __fastcall Load(THierarchicalStorage * Storage, bool Legacy);
  167. void __fastcall Save(THierarchicalStorage * Storage) const;
  168. void __fastcall LegacyDefaults();
  169. bool __fastcall operator ==(const TEditorPreferences & rhp) const;
  170. __property TEditorData Data = { read = FData, write = FData };
  171. __property AnsiString Name = { read = GetName };
  172. private:
  173. TEditorData FData;
  174. mutable AnsiString FName;
  175. AnsiString __fastcall GetName() const;
  176. };
  177. //---------------------------------------------------------------------------
  178. class TEditorList
  179. {
  180. public:
  181. __fastcall TEditorList();
  182. virtual __fastcall ~TEditorList();
  183. const TEditorPreferences * __fastcall Find(const AnsiString FileName,
  184. bool Local, const TFileMasks::TParams & Params) const;
  185. void __fastcall Load(THierarchicalStorage * Storage);
  186. void __fastcall Save(THierarchicalStorage * Storage) const;
  187. void __fastcall operator=(const TEditorList & rhl);
  188. bool __fastcall operator==(const TEditorList & rhl) const;
  189. void __fastcall Clear();
  190. void __fastcall Add(TEditorPreferences * Editor);
  191. void __fastcall Insert(int Index, TEditorPreferences * Editor);
  192. void __fastcall Change(int Index, TEditorPreferences * Editor);
  193. void __fastcall Move(int CurIndex, int NewIndex);
  194. void __fastcall Delete(int Index);
  195. void __fastcall Saved();
  196. __property int Count = { read = GetCount };
  197. __property const TEditorPreferences * Editors[int Index] = { read = GetEditor };
  198. __property bool Modified = { read = FModified };
  199. private:
  200. TList * FEditors;
  201. bool FModified;
  202. int __fastcall GetCount() const;
  203. void __fastcall Init();
  204. void __fastcall Modify();
  205. const TEditorPreferences * __fastcall GetEditor(int Index) const;
  206. };
  207. //---------------------------------------------------------------------------
  208. class TBookmarks;
  209. class TBookmarkList;
  210. class TCustomCommands;
  211. enum TPathInCaption { picShort, picFull, picNone };
  212. // constants must be compatible with legacy CopyOnDoubleClick
  213. enum TDoubleClickAction { dcaOpen = 0, dcaCopy = 1, dcaEdit = 2 };
  214. //---------------------------------------------------------------------------
  215. class TWinConfiguration : public TCustomWinConfiguration
  216. {
  217. private:
  218. AnsiString FAutoStartSession;
  219. TDoubleClickAction FDoubleClickAction;
  220. bool FCopyOnDoubleClickConfirmation;
  221. bool FDDAllowMove;
  222. bool FDDAllowMoveInit;
  223. bool FDDTransferConfirmation;
  224. bool FDeleteToRecycleBin;
  225. bool FDimmHiddenFiles;
  226. bool FLogWindowOnStartup;
  227. AnsiString FLogWindowParams;
  228. TScpCommanderConfiguration FScpCommander;
  229. TScpExplorerConfiguration FScpExplorer;
  230. bool FSelectDirectories;
  231. AnsiString FSelectMask;
  232. bool FShowHiddenFiles;
  233. bool FShowInaccesibleDirectories;
  234. bool FConfirmDeleting;
  235. bool FConfirmRecycling;
  236. bool FUseLocationProfiles;
  237. AnsiString FDDTemporaryDirectory;
  238. bool FDDWarnLackOfTempSpace;
  239. bool FDDExtEnabled;
  240. int FDDExtInstalled;
  241. int FDDExtTimeout;
  242. bool FConfirmClosingSession;
  243. bool FConfirmExitOnCompletion;
  244. double FDDWarnLackOfTempSpaceRatio;
  245. AnsiString FTemporarySessionFile;
  246. AnsiString FTemporaryKeyFile;
  247. TBookmarks * FBookmarks;
  248. TCustomCommands * FCustomCommands;
  249. bool FCustomCommandsModified;
  250. bool FCustomCommandsDefaults;
  251. TEditorConfiguration FEditor;
  252. TQueueViewConfiguration FQueueView;
  253. bool FEmbeddedSessions;
  254. bool FExpertMode;
  255. bool FDisableOpenEdit;
  256. bool FForceDeleteTempFolder;
  257. bool FDefaultDirIsHome;
  258. int FDDDeleteDelay;
  259. bool FTemporaryDirectoryCleanup;
  260. bool FConfirmTemporaryDirectoryCleanup;
  261. AnsiString FDefaultTranslationFile;
  262. bool FInvalidDefaultTranslation;
  263. AnsiString FInvalidDefaultTranslationMessage;
  264. bool FPreservePanelState;
  265. AnsiString FTheme;
  266. TPathInCaption FPathInCaption;
  267. bool FMinimizeToTray;
  268. bool FBalloonNotifications;
  269. unsigned int FNotificationsTimeout;
  270. unsigned int FNotificationsStickTime;
  271. TUpdatesConfiguration FUpdates;
  272. bool FCopyParamAutoSelectNotice;
  273. bool FSessionToolbarAutoShown;
  274. bool FLockToolbars;
  275. TEditorList * FEditorList;
  276. TEditorPreferences * FLegacyEditor;
  277. AnsiString FDefaultKeyFile;
  278. bool FAutoOpenInPutty;
  279. void __fastcall SetDoubleClickAction(TDoubleClickAction value);
  280. void __fastcall SetCopyOnDoubleClickConfirmation(bool value);
  281. void __fastcall SetDDAllowMove(bool value);
  282. void __fastcall SetDDAllowMoveInit(bool value);
  283. void __fastcall SetDDTransferConfirmation(bool value);
  284. void __fastcall SetDeleteToRecycleBin(bool value);
  285. void __fastcall SetDimmHiddenFiles(bool value);
  286. void __fastcall SetLogWindowOnStartup(bool value);
  287. void __fastcall SetLogWindowParams(AnsiString value);
  288. void __fastcall SetScpCommander(TScpCommanderConfiguration value);
  289. void __fastcall SetScpExplorer(TScpExplorerConfiguration value);
  290. void __fastcall SetSelectDirectories(bool value);
  291. void __fastcall SetShowHiddenFiles(bool value);
  292. void __fastcall SetShowInaccesibleDirectories(bool value);
  293. void __fastcall SetConfirmDeleting(bool value);
  294. void __fastcall SetConfirmRecycling(bool value);
  295. void __fastcall SetUseLocationProfiles(bool value);
  296. void __fastcall SetDDTemporaryDirectory(AnsiString value);
  297. void __fastcall SetDDWarnLackOfTempSpace(bool value);
  298. void __fastcall SetDDExtEnabled(bool value);
  299. void __fastcall SetDDExtTimeout(int value);
  300. void __fastcall SetConfirmClosingSession(bool value);
  301. void __fastcall SetConfirmExitOnCompletion(bool value);
  302. void __fastcall SetForceDeleteTempFolder(bool value);
  303. void __fastcall SetDDWarnLackOfTempSpaceRatio(double value);
  304. void __fastcall SetBookmarks(AnsiString Key, TBookmarkList * value);
  305. TBookmarkList * __fastcall GetBookmarks(AnsiString Key);
  306. void __fastcall SetAutoStartSession(AnsiString value);
  307. void __fastcall SetExpertMode(bool value);
  308. void __fastcall SetDefaultDirIsHome(bool value);
  309. void __fastcall SetEditor(TEditorConfiguration value);
  310. void __fastcall SetQueueView(TQueueViewConfiguration value);
  311. void __fastcall SetCustomCommands(TCustomCommands * value);
  312. void __fastcall SetTemporaryDirectoryCleanup(bool value);
  313. void __fastcall SetConfirmTemporaryDirectoryCleanup(bool value);
  314. void __fastcall SetPreservePanelState(bool value);
  315. void __fastcall SetTheme(AnsiString value);
  316. void __fastcall SetPathInCaption(TPathInCaption value);
  317. void __fastcall SetMinimizeToTray(bool value);
  318. void __fastcall SetBalloonNotifications(bool value);
  319. void __fastcall SetNotificationsTimeout(unsigned int value);
  320. void __fastcall SetNotificationsStickTime(unsigned int value);
  321. void __fastcall SetCopyParamAutoSelectNotice(bool value);
  322. void __fastcall SetSessionToolbarAutoShown(bool value);
  323. TUpdatesConfiguration __fastcall GetUpdates();
  324. void __fastcall SetUpdates(TUpdatesConfiguration value);
  325. void __fastcall SetLockToolbars(bool value);
  326. const TEditorList * __fastcall GetEditorList();
  327. void __fastcall SetEditorList(const TEditorList * value);
  328. void __fastcall SetAutoOpenInPutty(bool value);
  329. bool __fastcall GetDDExtInstalled();
  330. protected:
  331. virtual TStorage __fastcall GetStorage();
  332. virtual void __fastcall Load();
  333. virtual void __fastcall SaveData(THierarchicalStorage * Storage, bool All);
  334. virtual void __fastcall LoadData(THierarchicalStorage * Storage);
  335. virtual void __fastcall LoadAdmin(THierarchicalStorage * Storage);
  336. virtual AnsiString __fastcall GetDefaultKeyFile();
  337. virtual void __fastcall Saved();
  338. bool __fastcall SameStringLists(TStrings * Strings1, TStrings * Strings2);
  339. bool __fastcall InternalReloadComponentRes(const AnsiString ResName,
  340. HINSTANCE HInst, TComponent * Instance);
  341. bool __fastcall InitComponent(TComponent * Instance,
  342. TClass RootAncestor, TClass ClassType);
  343. virtual HINSTANCE __fastcall LoadNewResourceModule(LCID Locale,
  344. AnsiString * FileName = NULL);
  345. virtual void __fastcall SetResourceModule(HINSTANCE Instance);
  346. virtual LCID __fastcall GetLocale();
  347. void __fastcall CheckTranslationVersion(const AnsiString FileName,
  348. bool InternalLocaleOnError);
  349. virtual void __fastcall DefaultLocalized();
  350. bool __fastcall DetectRegistryStorage(HKEY RootKey);
  351. bool __fastcall CanWriteToStorage();
  352. public:
  353. __fastcall TWinConfiguration();
  354. virtual __fastcall ~TWinConfiguration();
  355. virtual void __fastcall Default();
  356. void __fastcall ClearTemporaryLoginData();
  357. virtual THierarchicalStorage * CreateScpStorage(bool SessionList);
  358. AnsiString __fastcall TemporaryDir(bool Mask = false);
  359. TStrings * __fastcall FindTemporaryFolders();
  360. void __fastcall CleanupTemporaryFolders(TStrings * Folders = NULL);
  361. void __fastcall CheckDefaultTranslation();
  362. bool __fastcall ConfirmRemoveDefaultTranslation();
  363. const TEditorPreferences * __fastcall DefaultEditorForFile(
  364. const AnsiString FileName, bool Local, const TFileMasks::TParams & MaskParams);
  365. __property TScpCommanderConfiguration ScpCommander = { read = FScpCommander, write = SetScpCommander };
  366. __property TScpExplorerConfiguration ScpExplorer = { read = FScpExplorer, write = SetScpExplorer };
  367. __property bool SelectDirectories = { read = FSelectDirectories, write = SetSelectDirectories };
  368. __property AnsiString SelectMask = { read = FSelectMask, write = FSelectMask };
  369. __property bool ShowHiddenFiles = { read = FShowHiddenFiles, write = SetShowHiddenFiles };
  370. __property bool ShowInaccesibleDirectories = { read = FShowInaccesibleDirectories, write = SetShowInaccesibleDirectories };
  371. __property TEditorConfiguration Editor = { read = FEditor, write = SetEditor };
  372. __property TQueueViewConfiguration QueueView = { read = FQueueView, write = SetQueueView };
  373. __property TUpdatesConfiguration Updates = { read = GetUpdates, write = SetUpdates };
  374. __property AnsiString AutoStartSession = { read = FAutoStartSession, write = SetAutoStartSession };
  375. __property TDoubleClickAction DoubleClickAction = { read = FDoubleClickAction, write = SetDoubleClickAction };
  376. __property bool CopyOnDoubleClickConfirmation = { read = FCopyOnDoubleClickConfirmation, write = SetCopyOnDoubleClickConfirmation };
  377. __property bool DDAllowMove = { read = FDDAllowMove, write = SetDDAllowMove };
  378. __property bool DDAllowMoveInit = { read = FDDAllowMoveInit, write = SetDDAllowMoveInit };
  379. __property bool DDTransferConfirmation = { read = FDDTransferConfirmation, write = SetDDTransferConfirmation };
  380. __property bool LogWindowOnStartup = { read = FLogWindowOnStartup, write = SetLogWindowOnStartup };
  381. __property bool DeleteToRecycleBin = { read = FDeleteToRecycleBin, write = SetDeleteToRecycleBin };
  382. __property bool DimmHiddenFiles = { read = FDimmHiddenFiles, write = SetDimmHiddenFiles };
  383. __property AnsiString LogWindowParams = { read = FLogWindowParams, write = SetLogWindowParams };
  384. __property bool ConfirmDeleting = { read = FConfirmDeleting, write = SetConfirmDeleting};
  385. __property bool ConfirmRecycling = { read = FConfirmRecycling, write = SetConfirmRecycling};
  386. __property bool UseLocationProfiles = { read = FUseLocationProfiles, write = SetUseLocationProfiles};
  387. __property AnsiString DDTemporaryDirectory = { read=FDDTemporaryDirectory, write=SetDDTemporaryDirectory };
  388. __property bool DDWarnLackOfTempSpace = { read=FDDWarnLackOfTempSpace, write=SetDDWarnLackOfTempSpace };
  389. __property bool DDExtEnabled = { read=FDDExtEnabled, write=SetDDExtEnabled };
  390. __property bool DDExtInstalled = { read=GetDDExtInstalled };
  391. __property int DDExtTimeout = { read=FDDExtTimeout, write=SetDDExtTimeout };
  392. __property bool ConfirmClosingSession = { read=FConfirmClosingSession, write=SetConfirmClosingSession };
  393. __property bool ConfirmExitOnCompletion = { read=FConfirmExitOnCompletion, write=SetConfirmExitOnCompletion };
  394. __property bool ForceDeleteTempFolder = { read=FForceDeleteTempFolder, write=SetForceDeleteTempFolder };
  395. __property double DDWarnLackOfTempSpaceRatio = { read=FDDWarnLackOfTempSpaceRatio, write=SetDDWarnLackOfTempSpaceRatio };
  396. __property TBookmarkList * Bookmarks[AnsiString Key] = { read = GetBookmarks, write = SetBookmarks };
  397. __property bool EmbeddedSessions = { read = FEmbeddedSessions };
  398. __property bool ExpertMode = { read = FExpertMode, write = SetExpertMode };
  399. __property bool DefaultDirIsHome = { read = FDefaultDirIsHome, write = SetDefaultDirIsHome };
  400. __property bool DisableOpenEdit = { read = FDisableOpenEdit };
  401. __property TCustomCommands * CustomCommands = { read = FCustomCommands, write = SetCustomCommands };
  402. __property int DDDeleteDelay = { read = FDDDeleteDelay };
  403. __property bool TemporaryDirectoryCleanup = { read = FTemporaryDirectoryCleanup, write = SetTemporaryDirectoryCleanup };
  404. __property bool ConfirmTemporaryDirectoryCleanup = { read = FConfirmTemporaryDirectoryCleanup, write = SetConfirmTemporaryDirectoryCleanup };
  405. __property bool PreservePanelState = { read = FPreservePanelState, write = SetPreservePanelState };
  406. __property AnsiString Theme = { read = FTheme, write = SetTheme };
  407. __property TPathInCaption PathInCaption = { read = FPathInCaption, write = SetPathInCaption };
  408. __property bool MinimizeToTray = { read = FMinimizeToTray, write = SetMinimizeToTray };
  409. __property bool BalloonNotifications = { read = FBalloonNotifications, write = SetBalloonNotifications };
  410. __property unsigned int NotificationsTimeout = { read = FNotificationsTimeout, write = SetNotificationsTimeout };
  411. __property unsigned int NotificationsStickTime = { read = FNotificationsStickTime, write = SetNotificationsStickTime };
  412. __property bool InvalidDefaultTranslation = { read = FInvalidDefaultTranslation };
  413. __property AnsiString DefaultTranslationFile = { read = FDefaultTranslationFile };
  414. __property bool CopyParamAutoSelectNotice = { read = FCopyParamAutoSelectNotice, write = SetCopyParamAutoSelectNotice };
  415. __property bool SessionToolbarAutoShown = { read = FSessionToolbarAutoShown, write = SetSessionToolbarAutoShown };
  416. __property bool LockToolbars = { read = FLockToolbars, write = SetLockToolbars };
  417. __property bool AutoOpenInPutty = { read = FAutoOpenInPutty, write = SetAutoOpenInPutty };
  418. __property const TEditorList * EditorList = { read = GetEditorList, write = SetEditorList };
  419. __property AnsiString DefaultKeyFile = { read = GetDefaultKeyFile, write = FDefaultKeyFile };
  420. };
  421. //---------------------------------------------------------------------------
  422. class TCustomCommands : public TStringList
  423. {
  424. public:
  425. __property int Params[AnsiString Name] = {read=GetParam, write=SetParam};
  426. bool __fastcall Equals(TCustomCommands * Commands);
  427. private:
  428. int __fastcall GetParam(const AnsiString & Name);
  429. void __fastcall SetParam(const AnsiString & Name, int value);
  430. };
  431. //---------------------------------------------------------------------------
  432. #define WinConfiguration (dynamic_cast<TWinConfiguration *>(Configuration))
  433. //---------------------------------------------------------------------------
  434. #endif