FrmIncidentAlarmF.cpp 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. //---------------------------------------------------------------------------
  2. #include <vcl.h>
  3. #include "ITSSkinF.h"
  4. #include "ITSUtilF.h"
  5. #include "ITSDbF.h"
  6. #include "AppGlobalF.h"
  7. #include "ITSLangTransF.h"
  8. #pragma hdrstop
  9. #include "WindowMsgF.h"
  10. #include "FrmIncidentAlarmF.h"
  11. #include "FrmLinkGradeSetF.h"
  12. #include "CDSNodeF.h"
  13. #include "CDSLinkF.h"
  14. #include "CDSIfscF.h"
  15. #include "CDSRoadF.h"
  16. #include "CDSTrafficGradeF.h"
  17. //---------------------------------------------------------------------------
  18. #pragma package(smart_init)
  19. #pragma link "FRAME_IncidentAutoListF"
  20. #pragma link "cxContainer"
  21. #pragma link "cxControls"
  22. #pragma link "cxEdit"
  23. #pragma link "cxGraphics"
  24. #pragma link "cxLabel"
  25. #pragma link "cxLookAndFeelPainters"
  26. #pragma link "cxLookAndFeels"
  27. #pragma link "dxSkinBlack"
  28. #pragma link "dxSkinBlue"
  29. #pragma link "dxSkinsCore"
  30. #pragma resource "*.dfm"
  31. TFrmIncidentAlarm *FrmIncidentAlarm = NULL;
  32. //---------------------------------------------------------------------------
  33. __fastcall TFrmIncidentAlarm::TFrmIncidentAlarm(TComponent* Owner)
  34. : TForm(Owner)
  35. {
  36. Width = 920;
  37. Height= 170;
  38. int nHeight = Height;
  39. int nWidth = Width;
  40. LangTrans->Translate(this, ITSDb_GetConnection());
  41. ITSSkin_Load(this);
  42. CMM_LoadForm(g_sFormsDir, this);
  43. Caption = lblCaption->Caption;//" ½Ã½ºÅÛ ÀÚµ¿µ¹¹ß ¾Ë¶÷";
  44. m_sLinkId = "";
  45. m_nLinkLevel = 0;
  46. }
  47. //---------------------------------------------------------------------------
  48. void __fastcall TFrmIncidentAlarm::FormClose(TObject *Sender, TCloseAction &Action)
  49. {
  50. TmrTimeOut->Enabled = false;
  51. try
  52. {
  53. CMM_SaveForm(g_sFormsDir, this);
  54. }
  55. catch(...)
  56. {
  57. }
  58. Action = caFree;
  59. FrmIncidentAlarm = NULL;
  60. }
  61. //---------------------------------------------------------------------------
  62. void __fastcall TFrmIncidentAlarm::ShowIncidentAlarm()
  63. {
  64. TmrTimeOut->Enabled = false;
  65. FRAMEIncidentAutoList1->UpdateList();
  66. TmrTimeOut->Interval = g_AppCfg.Incident.TimeOut * 1000;
  67. TmrTimeOut->Enabled = true;
  68. }
  69. //---------------------------------------------------------------------------
  70. void __fastcall TFrmIncidentAlarm::TmrTimeOutTimer(TObject *Sender)
  71. {
  72. TmrTimeOut->Enabled = false;
  73. Close();
  74. }
  75. //---------------------------------------------------------------------------