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.

184 lines
4.5 KiB

  1. // SystemsResultsView.cpp: implementation of the CSystemsResultsView class.
  2. //
  3. //////////////////////////////////////////////////////////////////////
  4. #include "stdafx.h"
  5. #include "SnapIn.h"
  6. #include "SystemsResultsView.h"
  7. #include "SplitPaneResultsView.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(CSystemsResultsView,CSplitPaneResultsView)
  15. //////////////////////////////////////////////////////////////////////
  16. // Construction/Destruction
  17. //////////////////////////////////////////////////////////////////////
  18. CSystemsResultsView::CSystemsResultsView()
  19. {
  20. }
  21. CSystemsResultsView::~CSystemsResultsView()
  22. {
  23. Destroy();
  24. }
  25. //////////////////////////////////////////////////////////////////////
  26. // Create/Destroy
  27. //////////////////////////////////////////////////////////////////////
  28. bool CSystemsResultsView::Create(CScopePaneItem* pOwnerItem)
  29. {
  30. TRACEX(_T("CSystemsResultsView::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. // normal
  48. pColumn = new CHMListViewColumn;
  49. sTitle.LoadString(IDS_STRING_NORMAL);
  50. pColumn->Create(this,sTitle,75,dwFormat);
  51. pColumn->SetToUpperPane();
  52. AddColumn(pColumn);
  53. // warning
  54. pColumn = new CHMListViewColumn;
  55. sTitle.LoadString(IDS_STRING_WARNING);
  56. pColumn->Create(this,sTitle,75,dwFormat);
  57. pColumn->SetToUpperPane();
  58. AddColumn(pColumn);
  59. // critical
  60. pColumn = new CHMListViewColumn;
  61. sTitle.LoadString(IDS_STRING_CRITICAL);
  62. pColumn->Create(this,sTitle,75,dwFormat);
  63. pColumn->SetToUpperPane();
  64. AddColumn(pColumn);
  65. // unknown
  66. pColumn = new CHMListViewColumn;
  67. sTitle.LoadString(IDS_STRING_UNKNOWN);
  68. pColumn->Create(this,sTitle,75,dwFormat);
  69. pColumn->SetToUpperPane();
  70. AddColumn(pColumn);
  71. // last message
  72. pColumn = new CHMListViewColumn;
  73. sTitle.LoadString(IDS_STRING_LAST_MESSAGE);
  74. pColumn->Create(this,sTitle,175,dwFormat);
  75. pColumn->SetToUpperPane();
  76. AddColumn(pColumn);
  77. // comment
  78. pColumn = new CHMListViewColumn;
  79. sTitle.LoadString(IDS_STRING_COMMENT);
  80. pColumn->Create(this,sTitle,175,dwFormat);
  81. pColumn->SetToUpperPane();
  82. AddColumn(pColumn);
  83. // add the lower columns
  84. // Severity
  85. pColumn = new CHMListViewColumn;
  86. sTitle.LoadString(IDS_STRING_SEVERITY);
  87. pColumn->Create(this,sTitle,75,dwFormat);
  88. pColumn->SetToLowerPane();
  89. AddColumn(pColumn);
  90. // ID
  91. pColumn = new CHMListViewColumn;
  92. sTitle.LoadString(IDS_STRING_ID);
  93. pColumn->Create(this,sTitle,75,dwFormat);
  94. pColumn->SetToLowerPane();
  95. AddColumn(pColumn);
  96. // Date/Time
  97. pColumn = new CHMListViewColumn;
  98. sTitle.LoadString(IDS_STRING_DATETIME);
  99. pColumn->Create(this,sTitle,175,dwFormat);
  100. pColumn->SetToLowerPane();
  101. AddColumn(pColumn);
  102. // Component
  103. pColumn = new CHMListViewColumn;
  104. sTitle.LoadString(IDS_STRING_DATA_POINT);
  105. pColumn->Create(this,sTitle,125,dwFormat);
  106. pColumn->SetToLowerPane();
  107. AddColumn(pColumn);
  108. // System
  109. pColumn = new CHMListViewColumn;
  110. sTitle.LoadString(IDS_STRING_SYSTEM);
  111. pColumn->Create(this,sTitle,75,dwFormat);
  112. pColumn->SetToLowerPane();
  113. AddColumn(pColumn);
  114. // Message
  115. pColumn = new CHMListViewColumn;
  116. sTitle.LoadString(IDS_STRING_MESSAGE);
  117. pColumn->Create(this,sTitle,75,dwFormat);
  118. pColumn->SetToLowerPane();
  119. AddColumn(pColumn);
  120. // add the stats columns
  121. // time
  122. pColumn = new CHMListViewColumn;
  123. sTitle.LoadString(IDS_STRING_DATETIME);
  124. pColumn->Create(this,sTitle,75,dwFormat);
  125. pColumn->SetToStatsPane();
  126. AddColumn(pColumn);
  127. // normal
  128. pColumn = new CHMListViewColumn;
  129. sTitle.LoadString(IDS_STRING_NORMAL);
  130. pColumn->Create(this,sTitle,75,dwFormat);
  131. pColumn->SetToStatsPane();
  132. AddColumn(pColumn);
  133. // warning
  134. pColumn = new CHMListViewColumn;
  135. sTitle.LoadString(IDS_STRING_WARNING);
  136. pColumn->Create(this,sTitle,75,dwFormat);
  137. pColumn->SetToStatsPane();
  138. AddColumn(pColumn);
  139. // critical
  140. pColumn = new CHMListViewColumn;
  141. sTitle.LoadString(IDS_STRING_CRITICAL);
  142. pColumn->Create(this,sTitle,75,dwFormat);
  143. pColumn->SetToStatsPane();
  144. AddColumn(pColumn);
  145. // unknown
  146. pColumn = new CHMListViewColumn;
  147. sTitle.LoadString(IDS_STRING_UNKNOWN);
  148. pColumn->Create(this,sTitle,75,dwFormat);
  149. pColumn->SetToStatsPane();
  150. AddColumn(pColumn);
  151. return true;
  152. }