- Timestamp:
- 01/26/18 08:51:30 (7 years ago)
- Location:
- branches/HiveProjectManagement/HeuristicLab.Clients.Hive.JobManager/3.3/Views
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HiveProjectManagement/HeuristicLab.Clients.Hive.JobManager/3.3/Views/HiveResourceSelector.cs
r15642 r15658 468 468 private static IEnumerable<Resource> GetAssignedResourcesForProject(Guid projectId) { 469 469 var assignedProjectResources = HiveServiceLocator.Instance.CallHiveService(s => s.GetAssignedResourcesForProject(projectId)); 470 return Hive AdminClient.Instance.Resources.Where(x => assignedProjectResources.Select(y => y.ResourceId).Contains(x.Id));470 return HiveClient.Instance.Resources.Where(x => assignedProjectResources.Select(y => y.ResourceId).Contains(x.Id)); 471 471 } 472 472 473 473 private static IEnumerable<Resource> GetAssignedResourcesForJob(Guid jobId) { 474 474 var assignedJobResources = HiveServiceLocator.Instance.CallHiveService(s => s.GetAssignedResourcesForJob(jobId)); 475 return Hive AdminClient.Instance.Resources.Where(x => assignedJobResources.Select(y => y.ResourceId).Contains(x.Id));475 return HiveClient.Instance.Resources.Where(x => assignedJobResources.Select(y => y.ResourceId).Contains(x.Id)); 476 476 } 477 477 … … 581 581 resourceAncestors.Clear(); 582 582 resourceDescendants.Clear(); 583 var resources = Hive AdminClient.Instance.Resources;583 var resources = HiveClient.Instance.Resources; 584 584 585 585 foreach (var r in resources) { -
branches/HiveProjectManagement/HeuristicLab.Clients.Hive.JobManager/3.3/Views/HiveResourceSelectorDialog.cs
r15642 r15658 80 80 #region Overrides 81 81 protected override void OnLoad(EventArgs e) { 82 Hive AdminClient.Instance.Refreshing += HiveAdminClient_Instance_Refreshing;83 Hive AdminClient.Instance.Refreshed += HiveAdminClient_Instance_Refreshed;82 HiveClient.Instance.Refreshing += HiveClient_Instance_Refreshing; 83 HiveClient.Instance.Refreshed += HiveClient_Instance_Refreshed; 84 84 base.OnLoad(e); 85 85 } 86 86 87 87 protected override void OnClosing(CancelEventArgs e) { 88 Hive AdminClient.Instance.Refreshed -= HiveAdminClient_Instance_Refreshed;89 Hive AdminClient.Instance.Refreshing -= HiveAdminClient_Instance_Refreshing;88 HiveClient.Instance.Refreshed -= HiveClient_Instance_Refreshed; 89 HiveClient.Instance.Refreshing -= HiveClient_Instance_Refreshing; 90 90 base.OnClosing(e); 91 91 } … … 93 93 94 94 #region Event Handlers 95 private void Hive AdminClient_Instance_Refreshing(object sender, EventArgs e) {96 if (InvokeRequired) Invoke((Action<object, EventArgs>)Hive AdminClient_Instance_Refreshing, sender, e);95 private void HiveClient_Instance_Refreshing(object sender, EventArgs e) { 96 if (InvokeRequired) Invoke((Action<object, EventArgs>)HiveClient_Instance_Refreshing, sender, e); 97 97 else { 98 98 var mainForm = MainFormManager.GetMainForm<MainForm.WindowsForms.MainForm>(); … … 102 102 } 103 103 104 private void Hive AdminClient_Instance_Refreshed(object sender, EventArgs e) {105 if (InvokeRequired) Invoke((Action<object, EventArgs>)Hive AdminClient_Instance_Refreshed, sender, e);104 private void HiveClient_Instance_Refreshed(object sender, EventArgs e) { 105 if (InvokeRequired) Invoke((Action<object, EventArgs>)HiveClient_Instance_Refreshed, sender, e); 106 106 else { 107 107 var mainForm = MainFormManager.GetMainForm<MainForm.WindowsForms.MainForm>(); … … 129 129 130 130 await SecurityExceptionUtil.TryAsyncAndReportSecurityExceptions( 131 action: () => Update Projects(),131 action: () => UpdateInstance(), 132 132 finallyCallback: () => updatingProjects = false); 133 133 } … … 151 151 152 152 #region Helpers 153 private void UpdateInstance() { 154 HiveClient.Instance.Refresh(); 155 } 156 153 157 private void UpdateProjects() { 154 Hive AdminClient.Instance.Refresh();158 HiveClient.Instance.RefreshProjectsAndResources(); 155 159 hiveResourceSelector.JobId = jobId; 156 160 hiveResourceSelector.ProjectId = projectId;
Note: See TracChangeset
for help on using the changeset viewer.