FileFind.h 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  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 <ComCtrls.hpp>
  12. #include <ExtCtrls.hpp>
  13. #include "IEListView.hpp"
  14. #include "NortonLikeListView.hpp"
  15. //---------------------------------------------------------------------------
  16. class TFileFindDialog : public TForm
  17. {
  18. __published:
  19. TGroupBox *FilterGroup;
  20. TButton *CancelButton;
  21. TLabel *MaskLabel;
  22. TLabel *RemoteDirectoryLabel;
  23. THistoryComboBox *RemoteDirectoryEdit;
  24. THistoryComboBox *MaskEdit;
  25. TButton *StartStopButton;
  26. TButton *HelpButton;
  27. TIEListView *FileView;
  28. TStatusBar *StatusBar;
  29. TButton *FocusButton;
  30. TButton *MinimizeButton;
  31. TStaticText *MaskHintText;
  32. TButton *MaskButton;
  33. void __fastcall ControlChange(TObject *Sender);
  34. void __fastcall StartStopButtonClick(TObject *Sender);
  35. void __fastcall StopButtonClick(TObject *Sender);
  36. void __fastcall MinimizeButtonClick(TObject *Sender);
  37. void __fastcall FormShow(TObject *Sender);
  38. void __fastcall FormCloseQuery(TObject *Sender, bool &CanClose);
  39. void __fastcall HelpButtonClick(TObject *Sender);
  40. void __fastcall FormKeyDown(TObject *Sender, WORD &Key,
  41. TShiftState Shift);
  42. void __fastcall MaskEditExit(TObject *Sender);
  43. void __fastcall FileViewDblClick(TObject *Sender);
  44. void __fastcall FocusButtonClick(TObject *Sender);
  45. void __fastcall FileViewSelectItem(TObject *Sender, TListItem *Item,
  46. bool Selected);
  47. void __fastcall MaskButtonClick(TObject *Sender);
  48. public:
  49. __fastcall TFileFindDialog(TComponent * Owner, TFindEvent OnFind);
  50. virtual __fastcall ~TFileFindDialog();
  51. bool __fastcall Execute(UnicodeString Directory, UnicodeString & Path);
  52. protected:
  53. void __fastcall Clear();
  54. void __fastcall Start();
  55. void __fastcall Stop();
  56. bool __fastcall StopIfFinding();
  57. void __fastcall GlobalMinimize(TObject * Sender);
  58. void __fastcall MinimizeApp();
  59. void __fastcall UpdateControls();
  60. bool __fastcall IsFinding();
  61. private:
  62. enum { ffInit, ffFinding, ffAborting, ffAborted, ffDone } FState;
  63. bool FMinimizedByMe;
  64. UnicodeString FFindingInDirectory;
  65. UnicodeString FDirectory;
  66. TFindEvent FOnFind;
  67. TImageList * FSystemImageList;
  68. void __fastcall FileFound(TTerminal * Terminal,
  69. const UnicodeString FileName, const TRemoteFile * File, bool & Cancel);
  70. void __fastcall FindingFile(TTerminal * Terminal, const UnicodeString Directory,
  71. bool & Cancel);
  72. };
  73. //---------------------------------------------------------------------------
  74. #endif