Changeset 6743 for branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.ExperimentManager/3.3/Views/RefreshableHiveExperimentView.cs
- Timestamp:
- 09/12/11 18:04:25 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.ExperimentManager/3.3/Views/RefreshableHiveExperimentView.cs
r6725 r6743 93 93 94 94 private void RegisterHiveJobEvents() { 95 Content.Hive Jobs.ItemsAdded += new CollectionItemsChangedEventHandler<HiveTask>(HiveJobs_ItemsAdded_Removed_Reset);96 Content.Hive Jobs.ItemsRemoved += new CollectionItemsChangedEventHandler<HiveTask>(HiveJobs_ItemsAdded_Removed_Reset);97 Content.Hive Jobs.CollectionReset += new CollectionItemsChangedEventHandler<HiveTask>(HiveJobs_ItemsAdded_Removed_Reset);95 Content.HiveTasks.ItemsAdded += new CollectionItemsChangedEventHandler<HiveTask>(HiveJobs_ItemsAdded_Removed_Reset); 96 Content.HiveTasks.ItemsRemoved += new CollectionItemsChangedEventHandler<HiveTask>(HiveJobs_ItemsAdded_Removed_Reset); 97 Content.HiveTasks.CollectionReset += new CollectionItemsChangedEventHandler<HiveTask>(HiveJobs_ItemsAdded_Removed_Reset); 98 98 } 99 99 private void DeregisterHiveJobEvents() { 100 Content.Hive Jobs.ItemsAdded -= new CollectionItemsChangedEventHandler<HiveTask>(HiveJobs_ItemsAdded_Removed_Reset);101 Content.Hive Jobs.ItemsRemoved -= new CollectionItemsChangedEventHandler<HiveTask>(HiveJobs_ItemsAdded_Removed_Reset);102 Content.Hive Jobs.CollectionReset -= new CollectionItemsChangedEventHandler<HiveTask>(HiveJobs_ItemsAdded_Removed_Reset);100 Content.HiveTasks.ItemsAdded -= new CollectionItemsChangedEventHandler<HiveTask>(HiveJobs_ItemsAdded_Removed_Reset); 101 Content.HiveTasks.ItemsRemoved -= new CollectionItemsChangedEventHandler<HiveTask>(HiveJobs_ItemsAdded_Removed_Reset); 102 Content.HiveTasks.CollectionReset -= new CollectionItemsChangedEventHandler<HiveTask>(HiveJobs_ItemsAdded_Removed_Reset); 103 103 } 104 104 … … 140 140 if (Content != null) { 141 141 bool alreadyUploaded = Content.Id != Guid.Empty; 142 bool jobsLoaded = Content.Hive Jobs != null && Content.HiveJobs.All(x => x.Task.Id != Guid.Empty);142 bool jobsLoaded = Content.HiveTasks != null && Content.HiveTasks.All(x => x.Task.Id != Guid.Empty); 143 143 144 144 this.nameTextBox.ReadOnly = !Content.IsControllable || Content.ExecutionState != ExecutionState.Prepared || alreadyUploaded; … … 229 229 Invoke(new EventHandler(Content_HiveJobChanged), sender, e); 230 230 else { 231 if (Content != null && Content.Hive Jobs != null) {232 jobsTreeView.Content = Content.Hive Jobs;231 if (Content != null && Content.HiveTasks != null) { 232 jobsTreeView.Content = Content.HiveTasks; 233 233 RegisterHiveJobEvents(); 234 234 } else { … … 297 297 #region Control events 298 298 private void startButton_Click(object sender, EventArgs e) { 299 HiveClient.Start Experiment((Exception ex) => ErrorHandling.ShowErrorDialog(this, "Start failed.", ex), Content, new CancellationToken());299 HiveClient.StartJob((Exception ex) => ErrorHandling.ShowErrorDialog(this, "Start failed.", ex), Content, new CancellationToken()); 300 300 } 301 301 private void pauseButton_Click(object sender, EventArgs e) { 302 HiveClient.Pause Experiment(Content);302 HiveClient.PauseJob(Content); 303 303 } 304 304 private void stopButton_Click(object sender, EventArgs e) { 305 HiveClient.Stop Experiment(Content);305 HiveClient.StopJob(Content); 306 306 } 307 307 private void resetButton_Click(object sender, EventArgs e) { } … … 326 326 327 327 private void refreshButton_Click(object sender, EventArgs e) { 328 var invoker = new Action<RefreshableJob>(HiveClient.Load Experiment);328 var invoker = new Action<RefreshableJob>(HiveClient.LoadJob); 329 329 invoker.BeginInvoke(Content, (ar) => { 330 330 try { … … 338 338 339 339 private void refreshPermissionsButton_Click(object sender, EventArgs e) { 340 hiveExperimentPermissionListView.Content = HiveClient.Get HiveExperimentPermissions(this.Content.Job.Id);340 hiveExperimentPermissionListView.Content = HiveClient.GetJobPermissions(this.Content.Job.Id); 341 341 } 342 342 … … 349 349 startButton.Enabled = pauseButton.Enabled = stopButton.Enabled = resetButton.Enabled = false; 350 350 } else { 351 startButton.Enabled = Content.IsControllable && Content.Hive Jobs != null && Content.HiveJobs.Count > 0 && Content.ExecutionState == ExecutionState.Prepared;351 startButton.Enabled = Content.IsControllable && Content.HiveTasks != null && Content.HiveTasks.Count > 0 && Content.ExecutionState == ExecutionState.Prepared; 352 352 pauseButton.Enabled = Content.IsControllable && Content.ExecutionState == ExecutionState.Started; 353 353 stopButton.Enabled = Content.IsControllable && Content.ExecutionState == ExecutionState.Started; … … 406 406 var optimizer = obj as IOptimizer; 407 407 if (optimizer != null) { 408 Content.Hive Jobs.Add(new OptimizerHiveTask(e.Effect.HasFlag(DragDropEffects.Copy) ? (IOptimizer)optimizer.Clone() : optimizer));408 Content.HiveTasks.Add(new OptimizerHiveTask(e.Effect.HasFlag(DragDropEffects.Copy) ? (IOptimizer)optimizer.Clone() : optimizer)); 409 409 } 410 410 }
Note: See TracChangeset
for help on using the changeset viewer.