Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
09/12/11 18:04:25 (13 years ago)
Author:
ascheibe
Message:

#1233

  • fixed a bug in the Slave UI
  • finished renaming Webservice and Dao methods to be consistent with Job/Task naming
  • some cosmetic changes and project dependencies cleanups
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.ExperimentManager/3.3/Views/RefreshableHiveExperimentView.cs

    r6725 r6743  
    9393
    9494    private void RegisterHiveJobEvents() {
    95       Content.HiveJobs.ItemsAdded += new CollectionItemsChangedEventHandler<HiveTask>(HiveJobs_ItemsAdded_Removed_Reset);
    96       Content.HiveJobs.ItemsRemoved += new CollectionItemsChangedEventHandler<HiveTask>(HiveJobs_ItemsAdded_Removed_Reset);
    97       Content.HiveJobs.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);
    9898    }
    9999    private void DeregisterHiveJobEvents() {
    100       Content.HiveJobs.ItemsAdded -= new CollectionItemsChangedEventHandler<HiveTask>(HiveJobs_ItemsAdded_Removed_Reset);
    101       Content.HiveJobs.ItemsRemoved -= new CollectionItemsChangedEventHandler<HiveTask>(HiveJobs_ItemsAdded_Removed_Reset);
    102       Content.HiveJobs.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);
    103103    }
    104104
     
    140140      if (Content != null) {
    141141        bool alreadyUploaded = Content.Id != Guid.Empty;
    142         bool jobsLoaded = Content.HiveJobs != 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);
    143143
    144144        this.nameTextBox.ReadOnly = !Content.IsControllable || Content.ExecutionState != ExecutionState.Prepared || alreadyUploaded;
     
    229229        Invoke(new EventHandler(Content_HiveJobChanged), sender, e);
    230230      else {
    231         if (Content != null && Content.HiveJobs != null) {
    232           jobsTreeView.Content = Content.HiveJobs;
     231        if (Content != null && Content.HiveTasks != null) {
     232          jobsTreeView.Content = Content.HiveTasks;
    233233          RegisterHiveJobEvents();
    234234        } else {
     
    297297    #region Control events
    298298    private void startButton_Click(object sender, EventArgs e) {
    299       HiveClient.StartExperiment((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());
    300300    }
    301301    private void pauseButton_Click(object sender, EventArgs e) {
    302       HiveClient.PauseExperiment(Content);
     302      HiveClient.PauseJob(Content);
    303303    }
    304304    private void stopButton_Click(object sender, EventArgs e) {
    305       HiveClient.StopExperiment(Content);
     305      HiveClient.StopJob(Content);
    306306    }
    307307    private void resetButton_Click(object sender, EventArgs e) { }
     
    326326
    327327    private void refreshButton_Click(object sender, EventArgs e) {
    328       var invoker = new Action<RefreshableJob>(HiveClient.LoadExperiment);
     328      var invoker = new Action<RefreshableJob>(HiveClient.LoadJob);
    329329      invoker.BeginInvoke(Content, (ar) => {
    330330        try {
     
    338338
    339339    private void refreshPermissionsButton_Click(object sender, EventArgs e) {
    340       hiveExperimentPermissionListView.Content = HiveClient.GetHiveExperimentPermissions(this.Content.Job.Id);
     340      hiveExperimentPermissionListView.Content = HiveClient.GetJobPermissions(this.Content.Job.Id);
    341341    }
    342342
     
    349349        startButton.Enabled = pauseButton.Enabled = stopButton.Enabled = resetButton.Enabled = false;
    350350      } else {
    351         startButton.Enabled = Content.IsControllable && Content.HiveJobs != 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;
    352352        pauseButton.Enabled = Content.IsControllable && Content.ExecutionState == ExecutionState.Started;
    353353        stopButton.Enabled = Content.IsControllable && Content.ExecutionState == ExecutionState.Started;
     
    406406        var optimizer = obj as IOptimizer;
    407407        if (optimizer != null) {
    408           Content.HiveJobs.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));
    409409        }
    410410      }
Note: See TracChangeset for help on using the changeset viewer.