Changeset 5536
- Timestamp:
- 02/22/11 14:22:12 (14 years ago)
- Location:
- branches/HeuristicLab.Hive-3.4/sources
- Files:
-
- 3 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.Hive-3.4/sources
- Property svn:ignore
-
old new 2 2 HeuristicLab.Hive-3.4.suo 3 3 TestResults 4 PrecompiledWeb
-
- Property svn:ignore
-
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Slave.ConsoleClient-3.4/HeuristicLab.Clients.Hive.Slave.ConsoleClient-3.4.csproj
r5458 r5536 81 81 <SubType>Designer</SubType> 82 82 </None> 83 <None Include="app - F005PC.config"> 84 <SubType>Designer</SubType> 85 </None> 83 86 </ItemGroup> 84 87 <ItemGroup> -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Slave/3.4/ConfigManager.cs
r5531 r5536 136 136 } 137 137 138 /// <summary> 139 /// MegaBytes 140 /// </summary> 138 141 private static int? GetPhysicalMemory() { 139 int? res = GetWMIValue("Win32_ComputerSystem", "TotalPhysicalMemory");142 long? res = GetWMIValue("Win32_ComputerSystem", "TotalPhysicalMemory"); 140 143 if (res != null) 141 return res / 1024 / 1024;144 return (int)(res / 1024 / 1024); 142 145 else 143 146 return null; 144 147 } 145 148 149 /// <summary> 150 /// Mhz 151 /// </summary> 146 152 private static int? GetCpuSpeed() { 147 return GetWMIValue("Win32_Processor", "MaxClockSpeed");153 return (int)GetWMIValue("Win32_Processor", "MaxClockSpeed"); 148 154 } 149 155 150 private static int? GetWMIValue(string Class, string Property) {151 ManagementClass mgtClass = new ManagementClass( Class);156 private static long? GetWMIValue(string clazz, string property) { 157 ManagementClass mgtClass = new ManagementClass(clazz); 152 158 ManagementObjectCollection mgtCol = mgtClass.GetInstances(); 153 159 154 160 foreach (ManagementObject mgtObj in mgtCol) { 155 161 foreach (var prop in mgtObj.Properties) { 156 if (prop.Value != null && prop.Name == Property) {162 if (prop.Value != null && prop.Name == property) { 157 163 try { 158 return int.Parse(prop.Value.ToString());164 return long.Parse(prop.Value.ToString()); 159 165 } 160 166 catch { -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Slave/3.4/HeuristicLab.Clients.Hive.Slave-3.4.csproj
r5404 r5536 125 125 <Compile Include="WcfService.cs" /> 126 126 <None Include="app.config" /> 127 <None Include="app - F005PC.config" /> 127 128 <None Include="HeuristicLabClientsHiveSlavePlugin.cs.frame" /> 128 129 <Compile Include="HeuristicLabClientsHiveSlavePlugin.cs" /> -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive/3.4/HeuristicLab.Clients.Hive-3.4.csproj
r5535 r5536 113 113 </ItemGroup> 114 114 <ItemGroup> 115 <None Include="app - F005PC.config" /> 115 116 <None Include="HeuristicLabClientsHivePlugin.cs.frame" /> 116 117 <Compile Include="Administration\HiveAdministrationClient.cs" />
Note: See TracChangeset
for help on using the changeset viewer.