FrmMainF.h 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. //---------------------------------------------------------------------------
  2. #ifndef FrmMainFH
  3. #define FrmMainFH
  4. //---------------------------------------------------------------------------
  5. #include <Classes.hpp>
  6. #include <Controls.hpp>
  7. #include <StdCtrls.hpp>
  8. #include <Forms.hpp>
  9. #include "IdBaseComponent.hpp"
  10. #include "IdComponent.hpp"
  11. #include "IdHTTP.hpp"
  12. #include "IdTCPClient.hpp"
  13. #include "IdTCPConnection.hpp"
  14. #include <ExtCtrls.hpp>
  15. #include <AppEvnts.hpp>
  16. #include <ComCtrls.hpp>
  17. //---------------------------------------------------------------------------
  18. #define POST_MSG(x,y,z,p) ::PostMessage(x, y, (WPARAM)z, (LPARAM)p)
  19. #define WM_DOWNLOAD_JOB (WM_USER + 0xF5)
  20. #define WM_DOWNLOAD_COMPLETE (WM_USER + 0xF6)
  21. #define WM_DOWNLOAD_START (WM_USER + 0xF7)
  22. //---------------------------------------------------------------------------
  23. class TForm1 : public TForm
  24. {
  25. __published: // IDE-managed Components
  26. TMemo *reMsg;
  27. TButton *BtnDownload;
  28. TIdHTTP *IdHTTP1;
  29. TEdit *EdDir;
  30. TLabel *Label4;
  31. TLabel *Label5;
  32. TEdit *EdURL;
  33. TApplicationEvents *ApplicationEvents1;
  34. TProgressBar *ProgressBar1;
  35. TApplicationEvents *ApplicationEvents2;
  36. TTimer *Timer1;
  37. TPanel *Panel1;
  38. TLabel *Label1;
  39. TLabel *Label2;
  40. TLabel *Label3;
  41. TShape *Shape1;
  42. TEdit *Edit1;
  43. TEdit *Edit2;
  44. TEdit *Edit3;
  45. TButton *Button1;
  46. TEdit *EdLat1;
  47. TEdit *EdLat2;
  48. TEdit *EdLon1;
  49. TEdit *EdLon2;
  50. TEdit *EdThreads;
  51. TLabel *Label6;
  52. TComboBox *CbZoom;
  53. TCheckBox *ChkDelOldMap;
  54. TLabel *Label7;
  55. TButton *BtnDownloadAll;
  56. TComboBox *CboType;
  57. void __fastcall Button1Click(TObject *Sender);
  58. void __fastcall BtnDownloadClick(TObject *Sender);
  59. void __fastcall ApplicationEvents2Message(tagMSG &Msg, bool &Handled);
  60. void __fastcall Timer1Timer(TObject *Sender);
  61. void __fastcall BtnDownloadAllClick(TObject *Sender);
  62. void __fastcall CboTypeClick(TObject *Sender);
  63. private: // User declarations
  64. int FThreadCnt;
  65. int FTotalJobCnt;
  66. int FJobCnt;
  67. int FSuccessCnt;
  68. public:
  69. void __fastcall Initialize();
  70. void __fastcall DownloadMap(double Lon1, double Lat1, double Lon2, double Lat2, int Zoom);
  71. String FDownloadUrl;
  72. String FSaveDir;
  73. public: // User declarations
  74. __fastcall TForm1(TComponent* Owner);
  75. };
  76. //---------------------------------------------------------------------------
  77. extern PACKAGE TForm1 *Form1;
  78. //---------------------------------------------------------------------------
  79. #endif