Free cookie consent management tool by TermsFeed Policy Generator

Changeset 5536


Ignore:
Timestamp:
02/22/11 14:22:12 (14 years ago)
Author:
cneumuel
Message:

#1233

  • fixed minor bug in ConfigManager
  • added configs for services.heuristiclab.com
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  
        22HeuristicLab.Hive-3.4.suo
        33TestResults
         4PrecompiledWeb
  • branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Slave.ConsoleClient-3.4/HeuristicLab.Clients.Hive.Slave.ConsoleClient-3.4.csproj

    r5458 r5536  
    8181      <SubType>Designer</SubType>
    8282    </None>
     83    <None Include="app - F005PC.config">
     84      <SubType>Designer</SubType>
     85    </None>
    8386  </ItemGroup>
    8487  <ItemGroup>
  • branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Slave/3.4/ConfigManager.cs

    r5531 r5536  
    136136    }
    137137
     138    /// <summary>
     139    /// MegaBytes
     140    /// </summary>
    138141    private static int? GetPhysicalMemory() {
    139       int? res = GetWMIValue("Win32_ComputerSystem", "TotalPhysicalMemory");
     142      long? res = GetWMIValue("Win32_ComputerSystem", "TotalPhysicalMemory");
    140143      if (res != null)
    141         return res / 1024 / 1024;
     144        return (int)(res / 1024 / 1024);
    142145      else
    143146        return null;
    144147    }
    145148
     149    /// <summary>
     150    /// Mhz
     151    /// </summary>
    146152    private static int? GetCpuSpeed() {
    147       return GetWMIValue("Win32_Processor", "MaxClockSpeed");
     153      return (int)GetWMIValue("Win32_Processor", "MaxClockSpeed");
    148154    }
    149155
    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);
    152158      ManagementObjectCollection mgtCol = mgtClass.GetInstances();
    153159
    154160      foreach (ManagementObject mgtObj in mgtCol) {
    155161        foreach (var prop in mgtObj.Properties) {
    156           if (prop.Value != null && prop.Name == Property) {
     162          if (prop.Value != null && prop.Name == property) {
    157163            try {
    158               return int.Parse(prop.Value.ToString());
     164              return long.Parse(prop.Value.ToString());
    159165            }
    160166            catch {
  • branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Slave/3.4/HeuristicLab.Clients.Hive.Slave-3.4.csproj

    r5404 r5536  
    125125    <Compile Include="WcfService.cs" />
    126126    <None Include="app.config" />
     127    <None Include="app - F005PC.config" />
    127128    <None Include="HeuristicLabClientsHiveSlavePlugin.cs.frame" />
    128129    <Compile Include="HeuristicLabClientsHiveSlavePlugin.cs" />
  • branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive/3.4/HeuristicLab.Clients.Hive-3.4.csproj

    r5535 r5536  
    113113  </ItemGroup>
    114114  <ItemGroup>
     115    <None Include="app - F005PC.config" />
    115116    <None Include="HeuristicLabClientsHivePlugin.cs.frame" />
    116117    <Compile Include="Administration\HiveAdministrationClient.cs" />
Note: See TracChangeset for help on using the changeset viewer.