FrmUtilMainF.h 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136
  1. //---------------------------------------------------------------------------
  2. #ifndef FrmUtilMainFH
  3. #define FrmUtilMainFH
  4. //---------------------------------------------------------------------------
  5. #include <Classes.hpp>
  6. #include <Controls.hpp>
  7. #include <StdCtrls.hpp>
  8. #include <Forms.hpp>
  9. #include "SHDocVw_OCX.h"
  10. #include <OleCtrls.hpp>
  11. #include <ExtCtrls.hpp>
  12. #include <Menus.hpp>
  13. #include <SHDocVw.hpp>
  14. #include <AppEvnts.hpp>
  15. #include <Graphics.hpp>
  16. #include <stdio.h>
  17. #include "cxButtons.hpp"
  18. #include "cxCheckBox.hpp"
  19. #include "cxContainer.hpp"
  20. #include "cxControls.hpp"
  21. #include "cxEdit.hpp"
  22. #include "cxGraphics.hpp"
  23. #include "cxGroupBox.hpp"
  24. #include "cxLabel.hpp"
  25. #include "cxLookAndFeelPainters.hpp"
  26. #include "cxLookAndFeels.hpp"
  27. #include "cxProgressBar.hpp"
  28. #include "cxTextEdit.hpp"
  29. #include "dxSkinsCore.hpp"
  30. #include <ADODB.hpp>
  31. #include <DB.hpp>
  32. #include "dxSkinBlack.hpp"
  33. #include "dxSkinMcSkin.hpp"
  34. #include "dxmdaset.hpp"
  35. //---------------------------------------------------------------------------
  36. //---------------------------------------------------------------------------
  37. typedef struct tag_DbInfo
  38. {
  39. String sProvider;
  40. String sServerName;
  41. String sUserName;
  42. String sPassword;
  43. bool bSqlLog;
  44. } DB_INFO;
  45. typedef struct tag_AppConfig
  46. {
  47. bool bAppClose;
  48. DB_INFO itsdb;
  49. DB_INFO link;
  50. DB_INFO ifsc;
  51. DB_INFO road;
  52. struct
  53. {
  54. String sMainMap;
  55. String sLinkMap;
  56. } flashmap;
  57. } APP_CONFIG;
  58. class TFrmUtilMain : public TForm
  59. {
  60. __published: // IDE-managed Components
  61. TTimer *TmrOnShow;
  62. TTimer *TmrAppState;
  63. TButton *BtnClose;
  64. TcxLabel *cxLabel1;
  65. TcxLabel *cxLabel2;
  66. TcxGroupBox *cxGroupBox1;
  67. TcxButton *cxButton1;
  68. TPanel *PnlProg;
  69. TShape *ShpTitle;
  70. TcxProgressBar *cxProgressBar1;
  71. TcxLabel *LblStatus;
  72. TADOQuery *ADOQuery1;
  73. TcxCheckBox *ChkNode;
  74. TcxCheckBox *ChkLink;
  75. TcxCheckBox *ChkIfsc;
  76. TcxCheckBox *ChkRoad;
  77. TcxCheckBox *ChkLinkVertex;
  78. TcxCheckBox *ChkIfscVertex;
  79. TcxCheckBox *ChkRoadVertex;
  80. TcxButton *cxButton2;
  81. TcxTextEdit *edPath;
  82. TcxLabel *cxLabel3;
  83. TcxCheckBox *ChkRegionVertex;
  84. TdxMemData *dxMemData1;
  85. TADODataSet *ADODataSet1;
  86. void __fastcall FormClose(TObject *Sender, TCloseAction &Action);
  87. void __fastcall FormCreate(TObject *Sender);
  88. void __fastcall FormDestroy(TObject *Sender);
  89. void __fastcall FormShow(TObject *Sender);
  90. void __fastcall FormCloseQuery(TObject *Sender, bool &CanClose);
  91. void __fastcall BtnCloseClick(TObject *Sender);
  92. void __fastcall TmrOnShowTimer(TObject *Sender);
  93. void __fastcall TmrAppStateTimer(TObject *Sender);
  94. void __fastcall cxButton1Click(TObject *Sender);
  95. void __fastcall cxButton2Click(TObject *Sender);
  96. private: // User declarations
  97. TMessageEvent FOnMessage;
  98. public:
  99. void __fastcall CommClose();
  100. public: // User declarations
  101. __fastcall TFrmUtilMain(TComponent* Owner);
  102. void __fastcall OnAppException(TObject *Sender, Exception *exception);
  103. void __fastcall UpdateProgress(int AProg, String AMsg="");
  104. bool __fastcall WriteXmlHead(FILE *AFd, bool AHead=true);
  105. bool __fastcall WriteXmlRecordCount(FILE *AFd, int ARows);
  106. bool __fastcall WriteXmlObject(FILE *AFd, String AObject);
  107. bool __fastcall MakeNodeXml(TADOQuery *pADO);
  108. bool __fastcall MakeLinkXml(TADOQuery *pADO);
  109. bool __fastcall MakeIfscXml(TADOQuery *pADO);
  110. bool __fastcall MakeRoadXml(TADOQuery *pADO);
  111. bool __fastcall MakeLinkVertexXml(TADOQuery *pADO);
  112. bool __fastcall MakeIfscVertexXml(TADOQuery *pADO);
  113. bool __fastcall MakeIfscVertexXml2(TADOQuery *pADO);
  114. bool __fastcall MakeRoadVertexXml(TADOQuery *pADO);
  115. bool __fastcall MakeRegionVertexXml(TADOQuery *pADO);
  116. };
  117. //---------------------------------------------------------------------------
  118. extern PACKAGE TFrmUtilMain *FrmUtilMain;
  119. //---------------------------------------------------------------------------
  120. extern APP_CONFIG g_AppCfg;
  121. bool LoadDefaultConfigInfo(String ACfgFile="");
  122. #endif