CustomCommand.h 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. //---------------------------------------------------------------------------
  2. #ifndef CustomCommandH
  3. #define CustomCommandH
  4. //---------------------------------------------------------------------------
  5. #include <Classes.hpp>
  6. #include <Controls.hpp>
  7. #include <StdCtrls.hpp>
  8. #include <Forms.hpp>
  9. #include "XPThemes.hpp"
  10. #include "HistoryComboBox.hpp"
  11. //---------------------------------------------------------------------------
  12. class TCustomCommands;
  13. //---------------------------------------------------------------------------
  14. class TCustomCommandDialog : public TForm
  15. {
  16. __published:
  17. TXPGroupBox *Group;
  18. TButton *OkButton;
  19. TButton *CancelButton;
  20. TLabel *DescriptionLabel;
  21. TEdit *DescriptionEdit;
  22. TLabel *Label1;
  23. THistoryComboBox *CommandEdit;
  24. TCheckBox *ApplyToDirectoriesCheck;
  25. TCheckBox *RecursiveCheck;
  26. TRadioButton *LocalCommandButton;
  27. TRadioButton *RemoteCommandButton;
  28. TCheckBox *ShowResultsCheck;
  29. TButton *HelpButton;
  30. TCheckBox *CopyResultsCheck;
  31. TStaticText *HintText;
  32. void __fastcall ControlChange(TObject *Sender);
  33. void __fastcall FormShow(TObject *Sender);
  34. void __fastcall FormCloseQuery(TObject *Sender, bool &CanClose);
  35. void __fastcall HelpButtonClick(TObject *Sender);
  36. private:
  37. TCustomCommandsMode FMode;
  38. int FParams;
  39. AnsiString FOrigDescription;
  40. const TCustomCommands * FCustomCommands;
  41. TCustomCommandValidate FOnValidate;
  42. void __fastcall SetCommand(AnsiString value);
  43. AnsiString __fastcall GetCommand();
  44. void __fastcall SetDescription(AnsiString value);
  45. AnsiString __fastcall GetDescription();
  46. void __fastcall SetParams(int value);
  47. int __fastcall GetParams();
  48. protected:
  49. void __fastcall UpdateControls();
  50. public:
  51. __fastcall TCustomCommandDialog(TComponent* Owner);
  52. bool __fastcall Execute();
  53. __property AnsiString Command = { read = GetCommand, write = SetCommand };
  54. __property AnsiString Description = { read = GetDescription, write = SetDescription };
  55. __property int Params = { read = GetParams, write = SetParams };
  56. __property TCustomCommandsMode Mode = { read = FMode, write = FMode };
  57. __property const TCustomCommands * CustomCommands = { read = FCustomCommands, write = FCustomCommands };
  58. __property TCustomCommandValidate OnValidate = { read = FOnValidate, write = FOnValidate };
  59. };
  60. //---------------------------------------------------------------------------
  61. #endif