Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

158 lines
3.8 KiB

  1. // ActionPolicyResultsView.cpp: implementation of the CActionPolicyResultsView class.
  2. //
  3. //////////////////////////////////////////////////////////////////////
  4. #include "stdafx.h"
  5. #include "snapin.h"
  6. #include "ActionPolicyResultsView.h"
  7. #include "ResultsPane.h"
  8. #include "HMListViewColumn.h"
  9. #ifdef _DEBUG
  10. #undef THIS_FILE
  11. static char THIS_FILE[]=__FILE__;
  12. #define new DEBUG_NEW
  13. #endif
  14. IMPLEMENT_DYNCREATE(CActionPolicyResultsView,CSplitPaneResultsView)
  15. //////////////////////////////////////////////////////////////////////
  16. // Construction/Destruction
  17. //////////////////////////////////////////////////////////////////////
  18. CActionPolicyResultsView::CActionPolicyResultsView()
  19. {
  20. }
  21. CActionPolicyResultsView::~CActionPolicyResultsView()
  22. {
  23. Destroy();
  24. }
  25. //////////////////////////////////////////////////////////////////////
  26. // Create/Destroy
  27. //////////////////////////////////////////////////////////////////////
  28. bool CActionPolicyResultsView::Create(CScopePaneItem* pOwnerItem)
  29. {
  30. TRACEX(_T("CActionPolicyResultsView::Create\n"));
  31. TRACEARGn(pOwnerItem);
  32. if( ! CSplitPaneResultsView::Create(pOwnerItem) )
  33. {
  34. TRACE(_T("FAILED : CSplitPaneResultsView::Create failed.\n"));
  35. return false;
  36. }
  37. // add the upper columns
  38. CHMListViewColumn* pColumn = NULL;
  39. CString sTitle;
  40. DWORD dwFormat = LVCFMT_LEFT;
  41. // name
  42. pColumn = new CHMListViewColumn;
  43. sTitle.LoadString(IDS_STRING_NAME);
  44. pColumn->Create(this,sTitle,75,dwFormat);
  45. pColumn->SetToUpperPane();
  46. AddColumn(pColumn);
  47. // last message
  48. pColumn = new CHMListViewColumn;
  49. sTitle.LoadString(IDS_STRING_LAST_MESSAGE);
  50. pColumn->Create(this,sTitle,125,dwFormat);
  51. pColumn->SetToUpperPane();
  52. AddColumn(pColumn);
  53. // comment
  54. pColumn = new CHMListViewColumn;
  55. sTitle.LoadString(IDS_STRING_COMMENT);
  56. pColumn->Create(this,sTitle,125,dwFormat);
  57. pColumn->SetToUpperPane();
  58. AddColumn(pColumn);
  59. // add the lower columns
  60. // Severity
  61. pColumn = new CHMListViewColumn;
  62. sTitle.LoadString(IDS_STRING_SEVERITY);
  63. pColumn->Create(this,sTitle,75,dwFormat);
  64. pColumn->SetToLowerPane();
  65. AddColumn(pColumn);
  66. // ID
  67. pColumn = new CHMListViewColumn;
  68. sTitle.LoadString(IDS_STRING_ID);
  69. pColumn->Create(this,sTitle,75,dwFormat);
  70. pColumn->SetToLowerPane();
  71. AddColumn(pColumn);
  72. // Date/Time
  73. pColumn = new CHMListViewColumn;
  74. sTitle.LoadString(IDS_STRING_DATETIME);
  75. pColumn->Create(this,sTitle,175,dwFormat);
  76. pColumn->SetToLowerPane();
  77. AddColumn(pColumn);
  78. // Component
  79. pColumn = new CHMListViewColumn;
  80. sTitle.LoadString(IDS_STRING_DATA_POINT);
  81. pColumn->Create(this,sTitle,125,dwFormat);
  82. pColumn->SetToLowerPane();
  83. AddColumn(pColumn);
  84. // System
  85. pColumn = new CHMListViewColumn;
  86. sTitle.LoadString(IDS_STRING_SYSTEM);
  87. pColumn->Create(this,sTitle,75,dwFormat);
  88. pColumn->SetToLowerPane();
  89. AddColumn(pColumn);
  90. // Message
  91. pColumn = new CHMListViewColumn;
  92. sTitle.LoadString(IDS_STRING_MESSAGE);
  93. pColumn->Create(this,sTitle,75,dwFormat);
  94. pColumn->SetToLowerPane();
  95. AddColumn(pColumn);
  96. // add the stats columns
  97. // time
  98. pColumn = new CHMListViewColumn;
  99. sTitle.LoadString(IDS_STRING_DATETIME);
  100. pColumn->Create(this,sTitle,75,dwFormat);
  101. pColumn->SetToStatsPane();
  102. AddColumn(pColumn);
  103. // normal
  104. pColumn = new CHMListViewColumn;
  105. sTitle.LoadString(IDS_STRING_NORMAL);
  106. pColumn->Create(this,sTitle,75,dwFormat);
  107. pColumn->SetToStatsPane();
  108. AddColumn(pColumn);
  109. // warning
  110. pColumn = new CHMListViewColumn;
  111. sTitle.LoadString(IDS_STRING_WARNING);
  112. pColumn->Create(this,sTitle,75,dwFormat);
  113. pColumn->SetToStatsPane();
  114. AddColumn(pColumn);
  115. // critical
  116. pColumn = new CHMListViewColumn;
  117. sTitle.LoadString(IDS_STRING_CRITICAL);
  118. pColumn->Create(this,sTitle,75,dwFormat);
  119. pColumn->SetToStatsPane();
  120. AddColumn(pColumn);
  121. // unknown
  122. pColumn = new CHMListViewColumn;
  123. sTitle.LoadString(IDS_STRING_UNKNOWN);
  124. pColumn->Create(this,sTitle,75,dwFormat);
  125. pColumn->SetToStatsPane();
  126. AddColumn(pColumn);
  127. return true;
  128. }