- Timestamp:
- 06/21/12 13:42:34 (12 years ago)
- Location:
- trunk/sources
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Clients.Access.Views/3.3/UserViews/UserInformationDialog.cs
r8042 r8076 20 20 #endregion 21 21 22 using System; 22 23 using System.Windows.Forms; 23 24 … … 37 38 } 38 39 39 void Instance_Refreshed(object sender, System.EventArgs e) { 40 closeButton.Enabled = true; 40 void Instance_Refreshed(object sender, EventArgs e) { 41 if (this.InvokeRequired) 42 this.Invoke(new Action<object, EventArgs>(Instance_Refreshed), sender, e); 43 else 44 closeButton.Enabled = true; 41 45 } 42 46 43 void Instance_Refreshing(object sender, System.EventArgs e) { 44 closeButton.Enabled = false; 47 void Instance_Refreshing(object sender, EventArgs e) { 48 if (this.InvokeRequired) 49 this.Invoke(new Action<object, EventArgs>(Instance_Refreshing), sender, e); 50 else 51 closeButton.Enabled = false; 45 52 } 46 53 -
trunk/sources/HeuristicLab.Clients.Access/3.3/ClientInformation.cs
r8042 r8076 22 22 using System; 23 23 using System.ServiceModel.Security; 24 using System.Threading.Tasks; 24 25 25 26 namespace HeuristicLab.Clients.Access { … … 28 29 public static ClientInformation Instance { 29 30 get { 30 if (instance == null) instance = newClientInformation();31 InitializeClientInformation(); 31 32 return instance; 32 33 } … … 54 55 55 56 private ClientInformation() { 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(); 57 if (instance == null) { 58 if (ClientInformationUtils.IsClientHeuristicLab()) { 59 FetchClientInformationFromServer(); 60 } else { 61 // this means we are executed by an Hive slave, therefore we just get our machine id (e.g. for OKB Algs) 62 // because the slave has already done the registration process 63 GenerateLocalClientConfig(); 64 } 62 65 } 63 66 } … … 100 103 FetchClientInformationFromServer(); 101 104 } 105 106 private static void InitializeClientInformation() { 107 if (instance == null) instance = new ClientInformation(); 108 } 109 110 public static void InitializeAsync() { 111 Task.Factory.StartNew(InitializeClientInformation); 112 } 102 113 } 103 114 } -
trunk/sources/HeuristicLab.Clients.Access/3.3/UserInformation.cs
r8043 r8076 22 22 using System; 23 23 using System.ServiceModel.Security; 24 using System.Threading.Tasks; 24 25 25 26 namespace HeuristicLab.Clients.Access { … … 30 31 public static UserInformation Instance { 31 32 get { 32 if (instance == null) instance = newUserInformation();33 InitializeUserInformation(); 33 34 return instance; 34 35 } … … 61 62 62 63 private UserInformation() { 63 //this blocks, so there should be anywhere in the Optimizer startup process64 //a call to FetchUserInformationFromServerAsync which is non-blocking65 FetchUserInformationFromServer();64 if (instance == null) { 65 FetchUserInformationFromServer(); 66 } 66 67 } 67 68 68 69 69 private void FetchUserInformationFromServer() { … … 92 92 FetchUserInformationFromServer(); 93 93 } 94 95 private static void InitializeUserInformation() { 96 if (instance == null) instance = new UserInformation(); 97 } 98 99 public static void InitializeAsync() { 100 Task.Factory.StartNew(InitializeUserInformation); 101 } 94 102 } 95 103 } -
trunk/sources/HeuristicLab.Optimizer/3.3/HeuristicLab.Optimizer-3.3.csproj
r8022 r8076 215 215 </ItemGroup> 216 216 <ItemGroup> 217 <ProjectReference Include="..\..\HeuristicLab.Clients.Access\3.3\HeuristicLab.Clients.Access-3.3.csproj"> 218 <Project>{494F87F4-0F25-4D33-A382-10CDB2174D48}</Project> 219 <Name>HeuristicLab.Clients.Access-3.3</Name> 220 <Private>False</Private> 221 </ProjectReference> 217 222 <ProjectReference Include="..\..\HeuristicLab.Clients.Common\3.3\HeuristicLab.Clients.Common-3.3.csproj"> 218 223 <Project>{730A9104-D4D1-4360-966B-E49B7571DDA3}</Project> -
trunk/sources/HeuristicLab.Optimizer/3.3/Plugin.cs.frame
r7985 r8076 21 21 22 22 using System.Windows.Forms; 23 using HeuristicLab.Clients.Access; 23 24 using HeuristicLab.Optimizer.Properties; 24 25 using HeuristicLab.PluginInfrastructure; … … 41 42 [PluginDependency("HeuristicLab.Persistence", "3.3")] 42 43 [PluginDependency("HeuristicLab.Problems.Instances", "3.3")] 44 [PluginDependency("HeuristicLab.Clients.Access", "3.3")] 43 45 public class HeuristicLabOptimizerPlugin : PluginBase { 44 46 } … … 58 60 59 61 if (mainForm != null) { 62 ClientInformation.InitializeAsync(); 63 UserInformation.InitializeAsync(); 64 60 65 mainForm.ShowContentInViewHost = true; 61 66 Application.Run(mainForm);
Note: See TracChangeset
for help on using the changeset viewer.