Changeset 944 for trunk/sources
- Timestamp:
- 12/10/08 14:48:49 (16 years ago)
- Location:
- trunk/sources
- Files:
-
- 4 added
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Hive.Client.Communication/WcfService.cs
r932 r944 58 58 59 59 public void Connect(String serverIP, int serverPort) { 60 if( !(this.ServerIP == serverIP) && !(this.ServerPort == ServerPort))60 if(this.ServerIP != serverIP || this.ServerPort != ServerPort) 61 61 ServerChanged(this, new EventArgs()); 62 62 this.ServerIP = serverIP; 63 this.ServerPort = serverPort; 63 this.ServerPort = serverPort; 64 64 Connect(); 65 65 } -
trunk/sources/HeuristicLab.Hive.Client.Core/ClientConsoleService/ClientConsoleCommunicator.cs
r932 r944 20 20 21 21 public void SetConnection(ConnectionContainer container) { 22 ConfigManager.Instance.SetServerIPAndPort(container); 22 23 WcfService.Instance.Connect(container.IPAdress, container.Port); 23 24 } -
trunk/sources/HeuristicLab.Hive.Client.Core/ConfigurationManager/ConfigManager.cs
r932 r944 28 28 using HeuristicLab.Hive.Client.Core.ClientConsoleService; 29 29 using HeuristicLab.Hive.Client.Communication; 30 using HeuristicLab.Hive.Client.Core.Properties; 30 31 31 32 namespace HeuristicLab.Hive.Client.Core.ConfigurationManager { … … 53 54 //retrive GUID from XML file, or burn in hell. as in hell. not heaven. 54 55 //this won't work this way. We need a plugin for XML Handling. 55 hardwareInfo = new ClientInfo(); 56 hardwareInfo.ClientId = Guid.NewGuid(); 56 hardwareInfo = new ClientInfo(); 57 58 if (Settings.Default.Guid == Guid.Empty) 59 hardwareInfo.ClientId = Guid.NewGuid(); 60 else 61 hardwareInfo.ClientId = Settings.Default.Guid; 62 57 63 hardwareInfo.NrOfCores = Environment.ProcessorCount; 58 64 hardwareInfo.Memory = 1024; … … 62 68 public ClientInfo GetClientInfo() { 63 69 return hardwareInfo; 70 } 71 72 public ConnectionContainer GetServerIPAndPort() { 73 ConnectionContainer cc = new ConnectionContainer(); 74 cc.IPAdress = Settings.Default.ServerIP; 75 cc.Port = Settings.Default.ServerPort; 76 return cc; 77 } 78 79 public void SetServerIPAndPort(ConnectionContainer cc) { 80 Settings.Default.ServerIP = cc.IPAdress; 81 Settings.Default.ServerPort = cc.Port; 64 82 } 65 83 … … 82 100 return st; 83 101 } 84 85 public void Loggedin() {86 if (hardwareInfo == null) {87 hardwareInfo = new ClientInfo();88 }89 hardwareInfo.Login = DateTime.Now;90 }91 102 } 92 103 } -
trunk/sources/HeuristicLab.Hive.Client.Core/Core.cs
r932 r944 62 62 63 63 wcfService = WcfService.Instance; 64 wcfService.Connect("10.20.53.1", 9000); 65 64 ConnectionContainer cc = ConfigManager.Instance.GetServerIPAndPort(); 65 if (cc.IPAdress == String.Empty || cc.Port == 0) { 66 wcfService.Connect("10.20.53.3", 9000); 67 } 66 68 wcfService.LoginCompleted += new EventHandler<LoginCompletedEventArgs>(wcfService_LoginCompleted); 67 69 wcfService.PullJobCompleted += new EventHandler<PullJobCompletedEventArgs>(wcfService_PullJobCompleted); … … 136 138 void wcfService_LoginCompleted(object sender, LoginCompletedEventArgs e) { 137 139 if (e.Result.Success) { 138 Logging.GetInstance().Info(this.ToString(), "Login completed to Hive Server @ " + DateTime.Now); 139 ConfigManager.Instance.Loggedin(); 140 Logging.GetInstance().Info(this.ToString(), "Login completed to Hive Server @ " + DateTime.Now); 140 141 } else 141 142 Logging.GetInstance().Error(this.ToString(), e.Result.StatusMessage); -
trunk/sources/HeuristicLab.Hive.Client.Core/HeuristicLab.Hive.Client.Core.csproj
r932 r944 83 83 <Compile Include="Heartbeat.cs" /> 84 84 <Compile Include="Properties\AssemblyInfo.cs" /> 85 <Compile Include="Properties\Settings.Designer.cs"> 86 <AutoGen>True</AutoGen> 87 <DesignTimeSharedInput>True</DesignTimeSharedInput> 88 <DependentUpon>Settings.settings</DependentUpon> 89 </Compile> 90 <Compile Include="Settings.cs" /> 85 91 </ItemGroup> 86 92 <ItemGroup> 93 <None Include="app.config" /> 87 94 <None Include="HeuristicLab.snk" /> 88 95 <None Include="Properties\AssemblyInfo.frame" /> 96 <None Include="Properties\Settings.settings"> 97 <Generator>PublicSettingsSingleFileGenerator</Generator> 98 <LastGenOutput>Settings.Designer.cs</LastGenOutput> 99 </None> 89 100 </ItemGroup> 90 101 <ItemGroup> -
trunk/sources/HeuristicLab.sln
r921 r944 931 931 {8B14A35E-DBDF-43EB-B019-23E9FBC5A35E}.CEDMA Debug|x86.ActiveCfg = Debug|x86 932 932 {8B14A35E-DBDF-43EB-B019-23E9FBC5A35E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 933 {8B14A35E-DBDF-43EB-B019-23E9FBC5A35E}.Debug|Any CPU.Build.0 = Debug|Any CPU 933 934 {8B14A35E-DBDF-43EB-B019-23E9FBC5A35E}.Debug|x86.ActiveCfg = Debug|x86 934 935 {8B14A35E-DBDF-43EB-B019-23E9FBC5A35E}.Debug|x86.Build.0 = Debug|x86 -
trunk/sources/HeuristicLab/MergeConfigs.cmd
r856 r944 1 1 ConfigMerger "%SolutionDir%\HeuristicLab.PluginInfrastructure\%Outdir%\HeuristicLab.PluginInfrastructure.dll.config" "HeuristicLab.exe.config" 2 2 ConfigMerger "%SolutionDir%\HeuristicLab.PluginInfrastructure.GUI\%Outdir%\HeuristicLab.PluginInfrastructure.GUI.dll.config" "HeuristicLab.exe.config" 3 ConfigMerger "%SolutionDir%\HeuristicLab.Hive.Client.Core\%Outdir%\HeuristicLab.Hive.Client.Core-3.2.dll.config" "HeuristicLab.exe.config"
Note: See TracChangeset
for help on using the changeset viewer.