Preferences.h 7.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194
  1. //----------------------------------------------------------------------------
  2. #ifndef PreferencesH
  3. #define PreferencesH
  4. //----------------------------------------------------------------------------
  5. #include <vcl\System.hpp>
  6. #include <vcl\Windows.hpp>
  7. #include <vcl\SysUtils.hpp>
  8. #include <vcl\Classes.hpp>
  9. #include <vcl\Graphics.hpp>
  10. #include <vcl\StdCtrls.hpp>
  11. #include <vcl\Forms.hpp>
  12. #include <vcl\Controls.hpp>
  13. #include <vcl\Buttons.hpp>
  14. #include <vcl\ExtCtrls.hpp>
  15. #include <ComCtrls.hpp>
  16. #include <Comboedit.hpp>
  17. #include <Mask.hpp>
  18. #include <ComboEdit.hpp>
  19. #include <XPGroupBox.hpp>
  20. #include "CopyParams.h"
  21. #include "GeneralSettings.h"
  22. #include "LogSettings.h"
  23. #include "UpDownEdit.hpp"
  24. #include "IEComboBox.hpp"
  25. //----------------------------------------------------------------------------
  26. class TCustomCommands;
  27. //----------------------------------------------------------------------------
  28. class TPreferencesDialog : public TForm
  29. {
  30. __published:
  31. TButton *OKButton;
  32. TButton *CloseButton;
  33. TPanel *MainPanel;
  34. TPageControl *PageControl;
  35. TTabSheet *PreferencesSheet;
  36. TLabel *RandomSeedFileLabel;
  37. TXPGroupBox *CommonPreferencesGroup;
  38. TCheckBox *CopyOnDoubleClickCheck;
  39. TCheckBox *CopyOnDoubleClickConfirmationCheck;
  40. TCheckBox *ConfirmOverwritingCheck;
  41. TCheckBox *ConfirmDeletingCheck;
  42. TCheckBox *ConfirmClosingSessionCheck;
  43. TCheckBox *DDTransferConfirmationCheck;
  44. TCheckBox *ContinueOnErrorCheck;
  45. TFilenameEdit *RandomSeedFileEdit;
  46. TXPGroupBox *StorageGroup;
  47. TRadioButton *RegistryStorageButton;
  48. TRadioButton *IniFileStorageButton;
  49. TTabSheet *LogSheet;
  50. TLoggingFrame *LoggingFrame;
  51. TTabSheet *GeneralSheet;
  52. TLabel *Label1;
  53. TGeneralSettingsFrame *GeneralSettingsFrame;
  54. TTabSheet *PanelsSheet;
  55. TXPGroupBox *PanelsRemoteDirectoryGroup;
  56. TCheckBox *ShowInaccesibleDirectoriesCheck;
  57. TXPGroupBox *PanelsCommonGroup;
  58. TCheckBox *ShowHiddenFilesCheck;
  59. TCheckBox *DefaultDirIsHomeCheck;
  60. TTabSheet *CommanderSheet;
  61. TLabel *Label3;
  62. TXPGroupBox *PanelsGroup;
  63. TCheckBox *ExplorerStyleSelectionCheck;
  64. TCheckBox *PreserveLocalDirectoryCheck;
  65. TXPGroupBox *CommanderMiscGroup;
  66. TCheckBox *UseLocationProfilesCheck;
  67. TXPGroupBox *CompareCriterionsGroup;
  68. TCheckBox *CompareByTimeCheck;
  69. TCheckBox *CompareBySizeCheck;
  70. TTabSheet *ExplorerSheet;
  71. TLabel *Label4;
  72. TXPGroupBox *GroupBox2;
  73. TCheckBox *ShowFullAddressCheck;
  74. TTabSheet *TransferSheet;
  75. TCopyParamsFrame *CopyParamsFrame;
  76. TXPGroupBox *ResumeBox;
  77. TLabel *ResumeThresholdUnitLabel;
  78. TRadioButton *ResumeOnButton;
  79. TRadioButton *ResumeSmartButton;
  80. TRadioButton *ResumeOffButton;
  81. TUpDownEdit *ResumeThresholdEdit;
  82. TTabSheet *EditorSheet;
  83. TXPGroupBox *EditorGroup;
  84. TRadioButton *EditorInternalButton;
  85. TRadioButton *EditorExternalButton;
  86. TFilenameEdit *ExternalEditorEdit;
  87. TXPGroupBox *EditorFontGroup;
  88. TLabel *EditorFontLabel;
  89. TButton *EditorFontButton;
  90. TXPGroupBox *EditorOptionsGroup;
  91. TCheckBox *EditorWordWrapCheck;
  92. TTabSheet *IntegrationSheet;
  93. TXPGroupBox *ShellIconsGroup;
  94. TLabel *ShellIconsLabel;
  95. TButton *DesktopIconButton;
  96. TButton *QuickLaunchIconButton;
  97. TButton *DesktopIconAllUsersButton;
  98. TButton *SendToHookButton;
  99. TXPGroupBox *ExternalAppsGroup;
  100. TLabel *Label2;
  101. TFilenameEdit *PuttyPathEdit;
  102. TTabSheet *CustomCommandsSheet;
  103. TXPGroupBox *CustomCommandsGroup;
  104. TLabel *LocalDirectoryLabel;
  105. TLabel *RemoteDirectoryLabel;
  106. TLabel *CustomCommandsPatternsLabel;
  107. TEdit *CustomCommandDescEdit;
  108. TEdit *CustomCommandEdit;
  109. TListView *CustomCommandsView;
  110. TButton *AddCommandButton;
  111. TButton *RemoveCommandButton;
  112. TButton *UpCommandButton;
  113. TButton *DownCommandButton;
  114. TButton *SaveCommandButton;
  115. TCheckBox *CustomCommandApplyToDirectoriesCheck;
  116. TCheckBox *CustomCommandRecursiveCheck;
  117. TPanel *LeftPanel;
  118. TTreeView *NavigationTree;
  119. TCheckBox *DeleteToRecycleBinCheck;
  120. TButton *RegisterAsUrlHandlerButton;
  121. TTabSheet *DragDropSheet;
  122. TXPGroupBox *DragDropDownloadsGroup;
  123. TLabel *DDExtEnabledLabel;
  124. TLabel *DDExtDisabledLabel;
  125. TRadioButton *DDExtEnabledButton;
  126. TRadioButton *DDExtDisabledButton;
  127. TPanel *DDExtDisabledPanel;
  128. TRadioButton *DDSystemTemporaryDirectoryButton;
  129. TRadioButton *DDCustomTemporaryDirectoryButton;
  130. TDirectoryEdit *DDTemporaryDirectoryEdit;
  131. TCheckBox *DDWarnLackOfTempSpaceCheck;
  132. TCheckBox *DDWarnOnMoveCheck;
  133. TCheckBox *ConfirmExitOnCompletionCheck;
  134. void __fastcall FormShow(TObject *Sender);
  135. void __fastcall ControlChange(TObject *Sender);
  136. void __fastcall EditorFontButtonClick(TObject *Sender);
  137. void __fastcall ExternalEditorEditExit(TObject *Sender);
  138. void __fastcall ExternalEditorEditAfterDialog(TObject *Sender,
  139. AnsiString &Name, bool &Action);
  140. void __fastcall ExternalEditorEditChange(TObject *Sender);
  141. void __fastcall FormCloseQuery(TObject *Sender, bool &CanClose);
  142. void __fastcall IconButtonClick(TObject *Sender);
  143. void __fastcall CustomCommandsViewData(TObject *Sender, TListItem *Item);
  144. void __fastcall CustomCommandsViewSelectItem(TObject *Sender,
  145. TListItem *Item, bool Selected);
  146. void __fastcall CustomCommandsViewKeyDown(TObject *Sender, WORD &Key,
  147. TShiftState Shift);
  148. void __fastcall AddCommandButtonClick(TObject *Sender);
  149. void __fastcall SaveCommandButtonClick(TObject *Sender);
  150. void __fastcall RemoveCommandButtonClick(TObject *Sender);
  151. void __fastcall UpDownCommandButtonClick(TObject *Sender);
  152. void __fastcall CustomCommandsViewStartDrag(TObject *Sender,
  153. TDragObject *&DragObject);
  154. void __fastcall CustomCommandsViewDragDrop(TObject *Sender,
  155. TObject *Source, int X, int Y);
  156. void __fastcall CustomCommandsViewDragOver(TObject *Sender,
  157. TObject *Source, int X, int Y, TDragState State, bool &Accept);
  158. void __fastcall CompareByTimeCheckClick(TObject *Sender);
  159. void __fastcall CompareBySizeCheckClick(TObject *Sender);
  160. void __fastcall NavigationTreeChange(TObject *Sender, TTreeNode *Node);
  161. void __fastcall PageControlChange(TObject *Sender);
  162. void __fastcall RegisterAsUrlHandlerButtonClick(TObject *Sender);
  163. void __fastcall DDExtLabelClick(TObject *Sender);
  164. private:
  165. TPreferencesMode FPreferencesMode;
  166. TFont * FEditorFont;
  167. TCustomCommands * FCustomCommands;
  168. bool FCustomCommandChanging;
  169. bool FAfterExternalEditorDialog;
  170. int FCustomCommandDragSource;
  171. int FCustomCommandDragDest;
  172. void __fastcall SetPreferencesMode(TPreferencesMode value);
  173. void __fastcall CMDialogKey(TWMKeyDown & Message);
  174. public:
  175. virtual __fastcall ~TPreferencesDialog();
  176. bool __fastcall Execute();
  177. virtual __fastcall TPreferencesDialog(TComponent* AOwner);
  178. __property TPreferencesMode PreferencesMode = { read = FPreferencesMode, write = SetPreferencesMode };
  179. protected:
  180. void __fastcall LoadConfiguration();
  181. void __fastcall LoggingGetDefaultLogFileName(System::TObject * Sender, AnsiString & DefaultLogFileName);
  182. void __fastcall SaveConfiguration();
  183. void __fastcall UpdateControls();
  184. void __fastcall UpdateCustomCommandsView();
  185. AnsiString __fastcall CustomCommandString(int Index = -1);
  186. int __fastcall CustomCommandParams();
  187. void __fastcall CustomCommandMove(int Source, int Dest);
  188. bool __fastcall AllowCustomCommandsDrag(int X, int Y);
  189. void __fastcall PrepareNavigationTree(TTreeView * Tree);
  190. virtual void __fastcall Dispatch(void * Message);
  191. };
  192. //----------------------------------------------------------------------------
  193. #endif