FrmUtilMainF.h 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  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. //---------------------------------------------------------------------------
  33. //---------------------------------------------------------------------------
  34. typedef struct tag_AppConfig
  35. {
  36. bool bAppClose;
  37. struct
  38. {
  39. String sProvider;
  40. String sServerName;
  41. String sUserName;
  42. String sPassword;
  43. bool bSqlLog;
  44. } itsdb;
  45. struct
  46. {
  47. String sMainMap;
  48. String sLinkMap;
  49. } flashmap;
  50. } APP_CONFIG;
  51. class TFrmUtilMain : public TForm
  52. {
  53. __published: // IDE-managed Components
  54. TTimer *TmrOnShow;
  55. TTimer *TmrAppState;
  56. TButton *BtnClose;
  57. TcxLabel *cxLabel1;
  58. TcxLabel *cxLabel2;
  59. TcxGroupBox *cxGroupBox1;
  60. TcxButton *cxButton1;
  61. TPanel *PnlProg;
  62. TShape *ShpTitle;
  63. TcxProgressBar *cxProgressBar1;
  64. TcxLabel *LblStatus;
  65. TADOQuery *ADOQuery1;
  66. TcxCheckBox *ChkNode;
  67. TcxCheckBox *ChkLink;
  68. TcxCheckBox *ChkIfsc;
  69. TcxCheckBox *ChkRoad;
  70. TcxCheckBox *ChkLinkVertex;
  71. TcxCheckBox *ChkIfscVertex;
  72. TcxCheckBox *ChkRoadVertex;
  73. TcxButton *cxButton2;
  74. TcxTextEdit *edPath;
  75. TcxLabel *cxLabel3;
  76. TcxCheckBox *ChkRegionVertex;
  77. void __fastcall FormClose(TObject *Sender, TCloseAction &Action);
  78. void __fastcall FormCreate(TObject *Sender);
  79. void __fastcall FormDestroy(TObject *Sender);
  80. void __fastcall FormShow(TObject *Sender);
  81. void __fastcall FormCloseQuery(TObject *Sender, bool &CanClose);
  82. void __fastcall BtnCloseClick(TObject *Sender);
  83. void __fastcall TmrOnShowTimer(TObject *Sender);
  84. void __fastcall TmrAppStateTimer(TObject *Sender);
  85. void __fastcall cxButton1Click(TObject *Sender);
  86. void __fastcall cxButton2Click(TObject *Sender);
  87. private: // User declarations
  88. TMessageEvent FOnMessage;
  89. public:
  90. void __fastcall CommClose();
  91. public: // User declarations
  92. __fastcall TFrmUtilMain(TComponent* Owner);
  93. void __fastcall OnAppException(TObject *Sender, Exception *exception);
  94. void __fastcall UpdateProgress(int AProg, String AMsg="");
  95. bool __fastcall WriteXmlHead(FILE *AFd, bool AHead=true);
  96. bool __fastcall WriteXmlRecordCount(FILE *AFd, int ARows);
  97. bool __fastcall WriteXmlObject(FILE *AFd, String AObject);
  98. bool __fastcall MakeNodeXml(TADOQuery *pADO);
  99. bool __fastcall MakeLinkXml(TADOQuery *pADO);
  100. bool __fastcall MakeIfscXml(TADOQuery *pADO);
  101. bool __fastcall MakeRoadXml(TADOQuery *pADO);
  102. bool __fastcall MakeLinkVertexXml(TADOQuery *pADO);
  103. bool __fastcall MakeIfscVertexXml(TADOQuery *pADO);
  104. bool __fastcall MakeRoadVertexXml(TADOQuery *pADO);
  105. bool __fastcall MakeRegionVertexXml(TADOQuery *pADO);
  106. };
  107. //---------------------------------------------------------------------------
  108. extern PACKAGE TFrmUtilMain *FrmUtilMain;
  109. //---------------------------------------------------------------------------
  110. extern APP_CONFIG g_AppCfg;
  111. bool LoadDefaultConfigInfo(String ACfgFile="");
  112. #endif