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.4 KiB

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