示例#1
0
 public void Load(XmlNodeList nodes)
 {
     foreach (object obj in nodes)
     {
         XmlNode xmlNode = (XmlNode)obj;
         if (xmlNode.NodeType != XmlNodeType.Comment)
         {
             CpuItem cpuItem = new CpuItem();
             cpuItem.Name          = CpuList.GetValue(xmlNode, "Name");
             cpuItem.SystemProfile = CpuList.GetValue(xmlNode, "SystemProfile");
             cpuItem.ItemProfile   = CpuList.GetValue(xmlNode, "ItemProfile");
             try
             {
                 base.Add(cpuItem.Name, cpuItem);
             }
             catch (Exception)
             {
                 this.SetError(string.Format("{0}: duplicate Name={0} SystemProfile={1} ItemProfile={2}", cpuItem.Name, cpuItem.SystemProfile, cpuItem.ItemProfile));
             }
         }
     }
 }
示例#2
0
        public static string Dump()
        {
            string str  = "";
            string text = "WDC WD2009FYPX-09AAMB0";
            Range  driveTemperatureRange = SystemConfig.GetDriveTemperatureRange(text, "Warning");

            if (driveTemperatureRange != null)
            {
                str += string.Format("Model={0} Warning Min={1} Max={2}", text, driveTemperatureRange.Min, driveTemperatureRange.Max);
            }
            else
            {
                str += string.Format("Cannot find drive model: {0}", text);
            }
            str += Environment.NewLine;
            str += Drivelist.GetInstance().Dump();
            str += DriveMap.GetInstance().Dump();
            str += EthernetPortProfiles.GetInstance().Dump();
            str += CpuList.GetInstance().Dump();
            str += SystemProfiles.GetInstance().Dump();
            str += ItemProfiles.GetInstance().Dump();
            return(str + ThermalProfiles.GetInstance().Dump());
        }
示例#3
0
 public static CpuList GetCpuList()
 {
     return(CpuList.GetInstance());
 }