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.

211 lines
5.2 KiB

  1. // AllSystemsResultsView.cpp: implementation of the CAllSystemsResultsView class.
  2. //
  3. //////////////////////////////////////////////////////////////////////
  4. #include "stdafx.h"
  5. #include "snapin.h"
  6. #include "AllSystemsResultsView.h"
  7. #include "HMListViewColumn.h"
  8. #ifdef _DEBUG
  9. #undef THIS_FILE
  10. static char THIS_FILE[]=__FILE__;
  11. #define new DEBUG_NEW
  12. #endif
  13. IMPLEMENT_DYNCREATE(CAllSystemsResultsView,CSplitPaneResultsView)
  14. //////////////////////////////////////////////////////////////////////
  15. // Construction/Destruction
  16. //////////////////////////////////////////////////////////////////////
  17. CAllSystemsResultsView::CAllSystemsResultsView()
  18. {
  19. }
  20. CAllSystemsResultsView::~CAllSystemsResultsView()
  21. {
  22. Destroy();
  23. }
  24. //////////////////////////////////////////////////////////////////////
  25. // Create/Destroy
  26. //////////////////////////////////////////////////////////////////////
  27. bool CAllSystemsResultsView::Create(CScopePaneItem* pOwnerItem)
  28. {
  29. TRACEX(_T("CAllSystemsResultsView::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. // status
  47. pColumn = new CHMListViewColumn;
  48. sTitle.LoadString(IDS_STRING_STATUS);
  49. pColumn->Create(this,sTitle,75,dwFormat);
  50. pColumn->SetToUpperPane();
  51. AddColumn(pColumn);
  52. // Domain
  53. pColumn = new CHMListViewColumn;
  54. sTitle.LoadString(IDS_STRING_DOMAIN);
  55. pColumn->Create(this,sTitle,75,dwFormat);
  56. pColumn->SetToUpperPane();
  57. AddColumn(pColumn);
  58. // OS
  59. pColumn = new CHMListViewColumn;
  60. sTitle.LoadString(IDS_STRING_OS);
  61. pColumn->Create(this,sTitle,75,dwFormat);
  62. pColumn->SetToUpperPane();
  63. AddColumn(pColumn);
  64. // WMI version
  65. pColumn = new CHMListViewColumn;
  66. sTitle.LoadString(IDS_STRING_WMI_VERSION);
  67. pColumn->Create(this,sTitle,75,dwFormat);
  68. pColumn->SetToUpperPane();
  69. AddColumn(pColumn);
  70. // normal
  71. pColumn = new CHMListViewColumn;
  72. sTitle.LoadString(IDS_STRING_NORMAL);
  73. pColumn->Create(this,sTitle,75,dwFormat);
  74. pColumn->SetToUpperPane();
  75. AddColumn(pColumn);
  76. // warning
  77. pColumn = new CHMListViewColumn;
  78. sTitle.LoadString(IDS_STRING_WARNING);
  79. pColumn->Create(this,sTitle,75,dwFormat);
  80. pColumn->SetToUpperPane();
  81. AddColumn(pColumn);
  82. // critical
  83. pColumn = new CHMListViewColumn;
  84. sTitle.LoadString(IDS_STRING_CRITICAL);
  85. pColumn->Create(this,sTitle,75,dwFormat);
  86. pColumn->SetToUpperPane();
  87. AddColumn(pColumn);
  88. // unknown
  89. pColumn = new CHMListViewColumn;
  90. sTitle.LoadString(IDS_STRING_UNKNOWN);
  91. pColumn->Create(this,sTitle,75,dwFormat);
  92. pColumn->SetToUpperPane();
  93. AddColumn(pColumn);
  94. // last message
  95. pColumn = new CHMListViewColumn;
  96. sTitle.LoadString(IDS_STRING_LAST_MESSAGE);
  97. pColumn->Create(this,sTitle,125,dwFormat);
  98. pColumn->SetToUpperPane();
  99. AddColumn(pColumn);
  100. // comment
  101. pColumn = new CHMListViewColumn;
  102. sTitle.LoadString(IDS_STRING_COMMENT);
  103. pColumn->Create(this,sTitle,125,dwFormat);
  104. pColumn->SetToUpperPane();
  105. AddColumn(pColumn);
  106. // add the lower columns
  107. // Severity
  108. pColumn = new CHMListViewColumn;
  109. sTitle.LoadString(IDS_STRING_SEVERITY);
  110. pColumn->Create(this,sTitle,75,dwFormat);
  111. pColumn->SetToLowerPane();
  112. AddColumn(pColumn);
  113. // ID
  114. pColumn = new CHMListViewColumn;
  115. sTitle.LoadString(IDS_STRING_ID);
  116. pColumn->Create(this,sTitle,75,dwFormat);
  117. pColumn->SetToLowerPane();
  118. AddColumn(pColumn);
  119. // Date/Time
  120. pColumn = new CHMListViewColumn;
  121. sTitle.LoadString(IDS_STRING_DATETIME);
  122. pColumn->Create(this,sTitle,175,dwFormat);
  123. pColumn->SetToLowerPane();
  124. AddColumn(pColumn);
  125. // Component
  126. pColumn = new CHMListViewColumn;
  127. sTitle.LoadString(IDS_STRING_DATA_POINT);
  128. pColumn->Create(this,sTitle,125,dwFormat);
  129. pColumn->SetToLowerPane();
  130. AddColumn(pColumn);
  131. // System
  132. pColumn = new CHMListViewColumn;
  133. sTitle.LoadString(IDS_STRING_SYSTEM);
  134. pColumn->Create(this,sTitle,75,dwFormat);
  135. pColumn->SetToLowerPane();
  136. AddColumn(pColumn);
  137. // Message
  138. pColumn = new CHMListViewColumn;
  139. sTitle.LoadString(IDS_STRING_MESSAGE);
  140. pColumn->Create(this,sTitle,75,dwFormat);
  141. pColumn->SetToLowerPane();
  142. AddColumn(pColumn);
  143. // add the stats columns
  144. // time
  145. pColumn = new CHMListViewColumn;
  146. sTitle.LoadString(IDS_STRING_DATETIME);
  147. pColumn->Create(this,sTitle,75,dwFormat);
  148. pColumn->SetToStatsPane();
  149. AddColumn(pColumn);
  150. // normal
  151. pColumn = new CHMListViewColumn;
  152. sTitle.LoadString(IDS_STRING_NORMAL);
  153. pColumn->Create(this,sTitle,75,dwFormat);
  154. pColumn->SetToStatsPane();
  155. AddColumn(pColumn);
  156. // warning
  157. pColumn = new CHMListViewColumn;
  158. sTitle.LoadString(IDS_STRING_WARNING);
  159. pColumn->Create(this,sTitle,75,dwFormat);
  160. pColumn->SetToStatsPane();
  161. AddColumn(pColumn);
  162. // critical
  163. pColumn = new CHMListViewColumn;
  164. sTitle.LoadString(IDS_STRING_CRITICAL);
  165. pColumn->Create(this,sTitle,75,dwFormat);
  166. pColumn->SetToStatsPane();
  167. AddColumn(pColumn);
  168. // unknown
  169. pColumn = new CHMListViewColumn;
  170. sTitle.LoadString(IDS_STRING_UNKNOWN);
  171. pColumn->Create(this,sTitle,75,dwFormat);
  172. pColumn->SetToStatsPane();
  173. AddColumn(pColumn);
  174. return true;
  175. }