1
0

FileFind.h 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. //---------------------------------------------------------------------------
  2. #ifndef FileFindH
  3. #define FileFindH
  4. //---------------------------------------------------------------------------
  5. #include <Classes.hpp>
  6. #include <Controls.hpp>
  7. #include <StdCtrls.hpp>
  8. #include <Forms.hpp>
  9. #include <HistoryComboBox.hpp>
  10. #include <WinInterface.h>
  11. #include <GUITools.h>
  12. #include <ComCtrls.hpp>
  13. #include <ExtCtrls.hpp>
  14. #include "IEListView.hpp"
  15. #include "NortonLikeListView.hpp"
  16. #include <Vcl.Imaging.pngimage.hpp>
  17. #include <Vcl.ImgList.hpp>
  18. #include "PngImageList.hpp"
  19. //---------------------------------------------------------------------------
  20. class TFileFindDialog : public TForm
  21. {
  22. __published:
  23. TGroupBox *FilterGroup;
  24. TButton *CancelButton;
  25. TLabel *MaskLabel;
  26. TLabel *RemoteDirectoryLabel;
  27. THistoryComboBox *RemoteDirectoryEdit;
  28. THistoryComboBox *MaskEdit;
  29. TButton *StartStopButton;
  30. TButton *HelpButton;
  31. TIEListView *FileView;
  32. TStatusBar *StatusBar;
  33. TButton *FocusButton;
  34. TButton *MinimizeButton;
  35. TStaticText *MaskHintText;
  36. TButton *MaskButton;
  37. TPaintBox *AnimationPaintBox;
  38. TButton *CopyButton;
  39. void __fastcall ControlChange(TObject *Sender);
  40. void __fastcall StartStopButtonClick(TObject *Sender);
  41. void __fastcall StopButtonClick(TObject *Sender);
  42. void __fastcall MinimizeButtonClick(TObject *Sender);
  43. void __fastcall FormShow(TObject *Sender);
  44. void __fastcall FormCloseQuery(TObject *Sender, bool &CanClose);
  45. void __fastcall HelpButtonClick(TObject *Sender);
  46. void __fastcall FormKeyDown(TObject *Sender, WORD &Key,
  47. TShiftState Shift);
  48. void __fastcall MaskEditExit(TObject *Sender);
  49. void __fastcall FileViewDblClick(TObject *Sender);
  50. void __fastcall FocusButtonClick(TObject *Sender);
  51. void __fastcall FileViewSelectItem(TObject *Sender, TListItem *Item,
  52. bool Selected);
  53. void __fastcall MaskButtonClick(TObject *Sender);
  54. void __fastcall CopyButtonClick(TObject *Sender);
  55. public:
  56. __fastcall TFileFindDialog(TComponent * Owner, TFindEvent OnFind);
  57. virtual __fastcall ~TFileFindDialog();
  58. bool __fastcall Execute(UnicodeString Directory, UnicodeString & Path);
  59. protected:
  60. void __fastcall Clear();
  61. void __fastcall Start();
  62. void __fastcall Stop();
  63. bool __fastcall StopIfFinding();
  64. void __fastcall GlobalMinimize(TObject * Sender);
  65. void __fastcall UpdateControls();
  66. bool __fastcall IsFinding();
  67. virtual void __fastcall Dispatch(void * Message);
  68. private:
  69. enum { ffInit, ffFinding, ffAborting, ffAborted, ffDone } FState;
  70. bool FMinimizedByMe;
  71. UnicodeString FFindingInDirectory;
  72. UnicodeString FDirectory;
  73. TFindEvent FOnFind;
  74. TImageList * FSystemImageList;
  75. TFrameAnimation FFrameAnimation;
  76. void __fastcall FileFound(TTerminal * Terminal,
  77. const UnicodeString FileName, const TRemoteFile * File, bool & Cancel);
  78. void __fastcall FindingFile(TTerminal * Terminal, const UnicodeString Directory,
  79. bool & Cancel);
  80. void __fastcall CopyToClipboard();
  81. };
  82. //---------------------------------------------------------------------------
  83. #endif