Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
03/05/12 22:29:59 (12 years ago)
Author:
ascheibe
Message:

#1648 adapted client management for use with Hive

Location:
branches/ClientUserManagement/HeuristicLab.Clients.Access/3.3
Files:
2 added
4 edited

Legend:

Unmodified
Added
Removed
  • branches/ClientUserManagement/HeuristicLab.Clients.Access/3.3/ClientInformation.cs

    r7536 r7553  
    5454
    5555    private ClientInformation() {
    56       FetchClientInformationFromServer();
     56      if (ClientInformationUtils.IsClientHeuristicLab()) {
     57        FetchClientInformationFromServer();
     58      } else {
     59        // this means we are executed by an Hive slave, therefore we just get our machine id (e.g. for OKB Algs)
     60        // because the slave has already done the registration process
     61        GenerateLocalClientConfig();
     62      }
     63    }
     64
     65    private void GenerateLocalClientConfig() {
     66      clientExists = true;
     67      errorOccured = false;
     68      occuredException = null;
     69      clientInfo = new Client();
     70      clientInfo.Id = ClientInformationUtils.GetUniqueMachineId();
    5771    }
    5872
  • branches/ClientUserManagement/HeuristicLab.Clients.Access/3.3/ClientInformationUtils.cs

    r7536 r7553  
    6161      FileVersionInfo versionInfo = FileVersionInfo.GetVersionInfo(Assembly.GetExecutingAssembly().Location);
    6262      return versionInfo.FileVersion;
     63    }
     64
     65    public static bool IsClientHeuristicLab() {
     66      return Process.GetCurrentProcess().ProcessName == Settings.Default.HLExeName;
    6367    }
    6468
  • branches/ClientUserManagement/HeuristicLab.Clients.Access/3.3/HeuristicLab.Clients.Access-3.3.csproj

    r7536 r7553  
    138138    <Compile Include="ServiceClients\UserGroup.cs" />
    139139    <Compile Include="ServiceClients\UserGroupBase.cs" />
     140    <Compile Include="Settings.Designer.cs">
     141      <AutoGen>True</AutoGen>
     142      <DesignTimeSharedInput>True</DesignTimeSharedInput>
     143      <DependentUpon>Settings.settings</DependentUpon>
     144    </Compile>
    140145    <Compile Include="UserInformation.cs" />
    141146    <Compile Include="Views\LightweightUserGroupSelectionDialog.cs">
     
    178183    <None Include="Properties\AssemblyInfo.cs.frame" />
    179184    <None Include="ServiceClients\GenerateServiceClients.cmd" />
     185    <None Include="Settings.settings">
     186      <Generator>SettingsSingleFileGenerator</Generator>
     187      <LastGenOutput>Settings.Designer.cs</LastGenOutput>
     188    </None>
    180189    <None Include="UpdateLocalInstallation.cmd" />
    181190  </ItemGroup>
  • branches/ClientUserManagement/HeuristicLab.Clients.Access/3.3/UserInformation.cs

    r7536 r7553  
    2323using System.Collections.Generic;
    2424using System.ServiceModel.Security;
    25 using HeuristicLab.Clients.Common.Properties;
    2625
    2726namespace HeuristicLab.Clients.Access {
     
    8079
    8180    private void FetchUserInformationFromServer() {
    82       userName = Settings.Default.UserName;
     81      userName = HeuristicLab.Clients.Common.Properties.Settings.Default.UserName;
    8382
    8483      try {
Note: See TracChangeset for help on using the changeset viewer.