ITS00GEOF.h 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408
  1. //---------------------------------------------------------------------------
  2. #ifndef ITS00GEOFH
  3. #define ITS00GEOFH
  4. //---------------------------------------------------------------------------
  5. #include <Classes.hpp>
  6. #include <Controls.hpp>
  7. #include <StdCtrls.hpp>
  8. #include <Forms.hpp>
  9. #include <DB.hpp>
  10. #include <DBClient.hpp>
  11. #include <Provider.hpp>
  12. #include <ADODB.hpp>
  13. #include <ExtCtrls.hpp>
  14. #include <Graphics.hpp>
  15. #include <ImgList.hpp>
  16. #include <Menus.hpp>
  17. #include <pngimage.hpp>
  18. #include <map.h>
  19. #include <vector.h>
  20. #include "ImageBtn.h"
  21. //---------------------------------------------------------------------------
  22. //---------------------------------------------------------------------------
  23. #include "DataTypesF.h"
  24. #include "WindowMsgF.h"
  25. #include "cxCheckBox.hpp"
  26. #include "cxContainer.hpp"
  27. #include "cxControls.hpp"
  28. #include "cxEdit.hpp"
  29. #include "cxGraphics.hpp"
  30. #include "cxGroupBox.hpp"
  31. #include "cxLabel.hpp"
  32. #include "cxLookAndFeelPainters.hpp"
  33. #include "cxLookAndFeels.hpp"
  34. #include "cxMaskEdit.hpp"
  35. #include "cxProgressBar.hpp"
  36. #include "cxSpinEdit.hpp"
  37. #include "cxTextEdit.hpp"
  38. #include "dxGDIPlusClasses.hpp"
  39. #include "dxSkinBlack.hpp"
  40. #include "dxSkinBlue.hpp"
  41. #include "dxSkinCaramel.hpp"
  42. #include "dxSkinCoffee.hpp"
  43. #include "dxSkinDarkRoom.hpp"
  44. #include "dxSkinDarkSide.hpp"
  45. #include "dxSkinFoggy.hpp"
  46. #include "dxSkinGlassOceans.hpp"
  47. #include "dxSkiniMaginary.hpp"
  48. #include "dxSkinLilian.hpp"
  49. #include "dxSkinLiquidSky.hpp"
  50. #include "dxSkinLondonLiquidSky.hpp"
  51. #include "dxSkinMcSkin.hpp"
  52. #include "dxSkinMoneyTwins.hpp"
  53. #include "dxSkinOffice2007Black.hpp"
  54. #include "dxSkinOffice2007Blue.hpp"
  55. #include "dxSkinOffice2007Green.hpp"
  56. #include "dxSkinOffice2007Pink.hpp"
  57. #include "dxSkinOffice2007Silver.hpp"
  58. #include "dxSkinOffice2010Black.hpp"
  59. #include "dxSkinOffice2010Blue.hpp"
  60. #include "dxSkinOffice2010Silver.hpp"
  61. #include "dxSkinsCore.hpp"
  62. #include "dxSkinSeven.hpp"
  63. #include "dxSkinSharp.hpp"
  64. #include "dxSkinSilver.hpp"
  65. #include "dxSkinStardust.hpp"
  66. #include <OleCtrls.hpp>
  67. #include <SHDocVw.hpp>
  68. #include "GMClasses.hpp"
  69. #include "GMMap.hpp"
  70. #include "GMMapVCL.hpp"
  71. #include "GMLinkedComponents.hpp"
  72. #include "GMRectangle.hpp"
  73. #include "GMRectangleVCL.hpp"
  74. #include <AppEvnts.hpp>
  75. #include "GMGeoCode.hpp"
  76. //---------------------------------------------------------------------------
  77. /*
  78. ******************************************************************************
  79. * Define constant
  80. ******************************************************************************
  81. */
  82. /*
  83. * 소통정보 레이어 최대갯수
  84. */
  85. #define MAX_LAYERS 7
  86. /*
  87. * 이전/다음 구현을 위한 구조체 선언(정적 이중링크로 구현)
  88. */
  89. #define D_EXT_QUEUE_SIZE 256 //512//1024/2048
  90. #define D_EXT_QUEUE_MASK (D_EXT_QUEUE_SIZE-1)
  91. /*
  92. * 레이어 Extent 정보
  93. */
  94. typedef struct
  95. {
  96. bool bExtent;
  97. short userIdx;
  98. short currIdx;
  99. //TDDRect extent[D_EXT_QUEUE_SIZE+1];
  100. } EXTENT_LIST_QUEUE;
  101. //---------------------------------------------------------------------------
  102. class TITS00GEO : public TForm
  103. {
  104. __published: // IDE-managed Components
  105. TImageList *ImgGis;
  106. TTimer *TmrShow;
  107. TPanel *PnlProgress;
  108. TcxProgressBar *PbLoadMap;
  109. TPanel *Panel5;
  110. TImage *ImgBoundary_n;
  111. TImage *ImgPrint_n;
  112. TImage *ImgPrint_c;
  113. TImage *ImgRefresh_c;
  114. TImage *ImgRefresh_n;
  115. TImage *ImgFull_n;
  116. TImage *ImgFull_c;
  117. TImage *ImgSquare_c;
  118. TImage *ImgSquare_n;
  119. TImage *ImgBoundary_c;
  120. TImage *ImgNext_c;
  121. TImage *ImgNext_n;
  122. TImage *ImgPan_n;
  123. TImage *ImgPan_c;
  124. TImage *ImgZoomOut_c;
  125. TImage *ImgZoomOut_n;
  126. TImage *ImgStnd_c;
  127. TImage *ImgSave_n;
  128. TImage *ImgSave_c;
  129. TImage *ImgStnd_n;
  130. TImage *ImgDist_c;
  131. TImage *ImgCircle_n;
  132. TImage *ImgCircle_c;
  133. TImage *ImgDist_n;
  134. TImage *ImgSel_c;
  135. TImage *ImgSel_n;
  136. TImage *ImgPrev_n;
  137. TImage *ImgPrev_c;
  138. TImage *ImgCenter_c;
  139. TImage *ImgCenter_n;
  140. TImage *ImgZoomIn_c;
  141. TImage *ImgZoomIn_n;
  142. TImageBtn *ImgBoundary;
  143. TImageBtn *ImgPrint;
  144. TImageBtn *ImgDist;
  145. TImageBtn *ImgSquare;
  146. TImageBtn *ImgCircle;
  147. TImageBtn *ImgSave;
  148. TTimer *TmrSelect;
  149. TTimer *TmrLinkSelect;
  150. TImage *ImgSelect;
  151. TPanel *PnlToolBar;
  152. TGroupBox *GroupBox1;
  153. TImageBtn *ImgPan;
  154. TImageBtn *ImgZoomIn;
  155. TImageBtn *ImgZoomOut;
  156. TImageBtn *ImgSel;
  157. TImageBtn *ImgCenter;
  158. TImageBtn *ImgPrev;
  159. TImageBtn *ImgNext;
  160. TImageBtn *ImgFull;
  161. TImageBtn *ImgStnd;
  162. TImageBtn *ImgRefresh;
  163. TGroupBox *GroupBox2;
  164. TGroupBox *GroupBox3;
  165. TcxCheckBox *ChkDrawCtv;
  166. TcxCheckBox *ChkDrawVms;
  167. TcxCheckBox *ChkDrawRse;
  168. TcxCheckBox *ChkViewExample;
  169. TcxCheckBox *ChkTrafficLayer;
  170. TcxCheckBox *ChkDrawIncident;
  171. TcxCheckBox *ChkGisSearch;
  172. TcxCheckBox *ChkToolTip;
  173. TGroupBox *GrpPos;
  174. TLabel *Label11;
  175. TLabel *Label12;
  176. TcxSpinEdit *SePosY;
  177. TcxSpinEdit *SePosX;
  178. TcxCheckBox *ChkDrawCenter;
  179. TGroupBox *GroupBox4;
  180. TGroupBox *GroupBox5;
  181. TImage *ImgCurrent;
  182. TcxLabel *LblCurrTemp;
  183. TImage *ImgForecast;
  184. TcxLabel *LblMaxFore;
  185. TcxLabel *LblMinFore;
  186. TcxGroupBox *panRemark;
  187. TGroupBox *GroupBox6;
  188. TGroupBox *GroupBox7;
  189. TGroupBox *GroupBox8;
  190. TGroupBox *GroupBox9;
  191. TGroupBox *GroupBox10;
  192. TImage *ImgRseN;
  193. TImage *ImgRseC;
  194. TcxLabel *cxLabel1;
  195. TcxLabel *cxLabel2;
  196. TImage *ImgCctvN;
  197. TImage *ImgCctvC;
  198. TImage *ImgCctvM;
  199. TcxLabel *cxLabel3;
  200. TcxLabel *cxLabel4;
  201. TcxLabel *cxLabel5;
  202. TImage *ImgVmsN;
  203. TImage *ImgVmsC;
  204. TImage *ImgVmsM;
  205. TcxLabel *cxLabel6;
  206. TcxLabel *cxLabel7;
  207. TcxLabel *cxLabel8;
  208. TImage *ImgInc01;
  209. TImage *ImgInc02;
  210. TImage *ImgInc03;
  211. TImage *ImgInc04;
  212. TcxLabel *cxLabel9;
  213. TcxLabel *cxLabel10;
  214. TcxLabel *cxLabel11;
  215. TcxLabel *cxLabel12;
  216. TPanel *PnlTrf01;
  217. TPanel *PnlTrf02;
  218. TPanel *PnlTrf03;
  219. TPanel *PnlTrf00;
  220. TcxLabel *cxLabel13;
  221. TcxLabel *cxLabel14;
  222. TcxLabel *cxLabel15;
  223. TcxLabel *cxLabel16;
  224. TImage *ImgOffice;
  225. TImage *ImgTemp;
  226. TImage *ImgTurn001;
  227. TImage *ImgTurn002;
  228. TImage *ImgTurn003;
  229. TImage *ImgTurn011;
  230. TImage *ImgTurn012;
  231. TImage *ImgTurn101;
  232. TImage *ImgTurn102;
  233. TImage *ImgTurn103;
  234. TPopupMenu *pmuGis;
  235. TMenuItem *N1;
  236. TMenuItem *pmuGisDefault;
  237. TMenuItem *pmuMove;
  238. TMenuItem *pmuZoomIn;
  239. TMenuItem *pmuZoomOut;
  240. TMenuItem *pmuIconSel;
  241. TMenuItem *pmuMoveCenter;
  242. TMenuItem *N2;
  243. TMenuItem *pmuCalLen;
  244. TMenuItem *pmuCalArea;
  245. TMenuItem *pmuRadius;
  246. TMenuItem *N7;
  247. TMenuItem *MnuSetStdArea;
  248. TMenuItem *MnuDrawAntiAlias;
  249. TMenuItem *MnuViewGray;
  250. TMenuItem *MnuLayerSetting;
  251. TMenuItem *MnuMoveStdArea;
  252. TPopupMenu *pmuCctv;
  253. TMenuItem *MnuCctvId;
  254. TMenuItem *N6;
  255. TMenuItem *mnuStopImage;
  256. TMenuItem *mnuCctvCam;
  257. TMenuItem *mnuCctvPingCtrl;
  258. TPopupMenu *pmuVms;
  259. TMenuItem *mnuVmsMsg;
  260. TMenuItem *mnuVmsCam;
  261. TMenuItem *mnuVmsPingCtrl;
  262. TPopupMenu *pmuRse;
  263. TMenuItem *pmuRsePing;
  264. TPanel *PnlMapInfo;
  265. TImage *ImgDesc27;
  266. TImage *ImgDesc37;
  267. TLabel *Label16;
  268. TLabel *Label3;
  269. TLabel *LblZoomLevel;
  270. TLabel *LblLinkLevel;
  271. TImage *Image1;
  272. TcxLabel *cxLabel17;
  273. TMenuItem *MnuVmsId;
  274. TMenuItem *N3;
  275. TMenuItem *MnuRseId;
  276. TMenuItem *N4;
  277. TMenuItem *NetworkPing1;
  278. TMenuItem *mnuCctvPingCapt;
  279. TMenuItem *mnuCctvPingEncd;
  280. TMenuItem *mnuCctvPingStrm;
  281. TMenuItem *NetworkPing2;
  282. TMenuItem *mnuVmsPingWeb;
  283. TWebBrowser *WebBrowser1;
  284. TGMMap *GMMap1;
  285. TEdit *Edit1;
  286. TEdit *Edit2;
  287. TGMRectangle *GMVehRect;
  288. TApplicationEvents *ApplicationEvents1;
  289. TGMGeoCode *GMGeoCode1;
  290. TMemo *Memo1;
  291. void __fastcall FormDestroy(TObject *Sender);
  292. void __fastcall FormShow(TObject *Sender);
  293. void __fastcall TmrShowTimer(TObject *Sender);
  294. void __fastcall MnuLayerSettingClick(TObject *Sender);
  295. void __fastcall pmuGisCalcClick(TObject *Sender);
  296. void __fastcall pmuControlGisClick(TObject *Sender);
  297. void __fastcall ImgPrevClick(TObject *Sender);
  298. void __fastcall ImgNextClick(TObject *Sender);
  299. void __fastcall ChkTrafficLayerClick(TObject *Sender);
  300. void __fastcall ChkDrawGisClick(TObject *Sender);
  301. void __fastcall ChkToolTipClick(TObject *Sender);
  302. void __fastcall TmrSelectTimer(TObject *Sender);
  303. void __fastcall TmrLinkSelectTimer(TObject *Sender);
  304. void __fastcall MnuSetStdAreaClick(TObject *Sender);
  305. void __fastcall mnuStopImageClick(TObject *Sender);
  306. void __fastcall mnuFacilityPingClick(TObject *Sender);
  307. void __fastcall pmuFacilityPopup(TObject *Sender);
  308. void __fastcall mnuCctvCamClick(TObject *Sender);
  309. void __fastcall mnuVmsMsgClick(TObject *Sender);
  310. void __fastcall mnuVmsCamClick(TObject *Sender);
  311. void __fastcall ChkDrawIncidentClick(TObject *Sender);
  312. void __fastcall ChkGisSearchClick(TObject *Sender);
  313. void __fastcall FormClose(TObject *Sender, TCloseAction &Action);
  314. void __fastcall panRemarkMouseDown(TObject *Sender, TMouseButton Button, TShiftState Shift, int X, int Y);
  315. void __fastcall ChkViewExamplePropertiesChange(TObject *Sender);
  316. void __fastcall GMMap1AfterPageLoaded(TObject *Sender, bool First);
  317. void __fastcall WebBrowser1DocumentComplete(TObject *ASender, const IDispatch *pDisp, OleVariant &URL);
  318. void __fastcall GMMap1ZoomChanged(TObject *Sender, int NewZoom);
  319. void __fastcall ImgStndClick(TObject *Sender);
  320. void __fastcall GMMap1Click(TObject *Sender, TLatLng *LatLng, double X, double Y);
  321. void __fastcall FormCreate(TObject *Sender);
  322. void __fastcall GMMap1MouseMove(TObject *Sender, TLatLng *LatLng, double X, double Y);
  323. void __fastcall GMVehRectMouseUp(TObject *Sender, TLatLng *LatLng, int Index, TLinkedComponent *LinkedComponent);
  324. private: // User declarations
  325. public:
  326. // For Map
  327. int m_nMapLevel;
  328. //마우스 제어 플래그
  329. TPoint m_ptDown;
  330. bool m_bMouseDown;
  331. bool m_bMoveCenter;
  332. bool m_bCalcMode;
  333. bool m_bCalcCont;
  334. public:
  335. /*
  336. * 지도 이전/이후 보기 핸들러, 전자지도엔진에서 함수지원은 하나 기능이 수행안됨
  337. */
  338. EXTENT_LIST_QUEUE m_ExtQ; // 이전/다음 정보를 저장할 전역변수
  339. //TDDRect m_PrevExt;
  340. bool __fastcall PrevExtentQ();
  341. bool __fastcall NextExtentQ();
  342. //bool __fastcall AddExtentQ(TDDRect &curRc);
  343. //void __fastcall SetExtent(TDDRect &curRc);
  344. bool FRectangle;
  345. int FRectangleIdx;
  346. TRectangle *FVehRect;
  347. TLatLngBounds *FVehBounds;
  348. private:
  349. void __fastcall WebMessageHandler(TMsg &Msg, bool &Handled);
  350. public: // User declarations
  351. __fastcall TITS00GEO(TComponent* Owner, TForm *ParentForm);
  352. void __fastcall LoadConfig();
  353. void __fastcall LoadImageFile(String sImgFile, TImage *pImage);
  354. void __fastcall LoadLocalSkin();
  355. void __fastcall CommClose();
  356. bool __fastcall FormInit();
  357. void __fastcall LoadGisMap();
  358. void __fastcall SetGisTrafficColor();
  359. //void __fastcall SetMapOperation(TXiMapOperation nMapOper);
  360. void __fastcall GisMenuCheckClear();
  361. void __fastcall ShowLayerEditForm();
  362. void __fastcall SetTrafficInfo(bool bFlag);
  363. void __fastcall RefreshMapTraffic();
  364. void __fastcall SetTrfLayerShow(bool bShow);
  365. // Object Select
  366. //TDDPoint m_ptSelect;
  367. void __fastcall SelectObjectByPos(double dPosX, double dPosY, bool bArrow=false);
  368. void __fastcall SelectObjectByPos();
  369. String __fastcall GetLinkLayerName();
  370. bool __fastcall GetLevelLinkId(int ALinkLevel, String &sLinkId, int X, int Y);
  371. bool __fastcall SelectLinkById(int ALinkLevel, String sId, bool bHide=false);
  372. bool __fastcall SelectLinkByPos(int X, int Y);
  373. void __fastcall ShowCctvStopImage(String AId, TPoint pt);
  374. void __fastcall ShowCctvCamera(String AId, TPoint pt);
  375. void __fastcall ShowVmsMessage(String AId, TPoint pt);
  376. void __fastcall ShowVmsCamera(String AId, TPoint pt);
  377. void __fastcall ShowLinkDetailInfo(String sLinkId, int nLinkLevel);
  378. void __fastcall UpdateFacilityStatus();
  379. void __fastcall UpdateIncidentStatus();
  380. String FSelId;
  381. };
  382. //---------------------------------------------------------------------------
  383. extern PACKAGE TITS00GEO *ITS00GEO;
  384. //---------------------------------------------------------------------------
  385. #endif