FrmIncidentAlarmF.cpp 2.3 KB

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