Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
05/10/11 17:58:59 (13 years ago)
Author:
cneumuel
Message:

#1233

  • added semaphores to ensure an appdomain is never unloaded when the start method has not finished
  • HiveEngine uploading and downloading of jobs works and is displayed in the view
File:
1 edited

Legend:

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

    r6168 r6178  
    6161      base.OnContentChanged();
    6262      if (Content != null && Content.Job != null) {
    63         computeInParallelCheckBox.Checked = Content.JobItem.ComputeInParallel;
     63        computeInParallelCheckBox.Checked = Content.ItemJob.ComputeInParallel;
    6464      } else {
    6565        computeInParallelCheckBox.Checked = false;
     
    7272    protected virtual void RegisterJobEvents() {
    7373      if (Content != null && Content.Job != null) {
    74         Content.JobItem.ComputeInParallelChanged += new EventHandler(OptimizerJob_ComputeInParallelChanged);
    75         Content.JobItem.ItemChanged += new EventHandler(Job_ItemChanged);
     74        Content.ItemJob.ComputeInParallelChanged += new EventHandler(OptimizerJob_ComputeInParallelChanged);
     75        Content.ItemJob.ItemChanged += new EventHandler(Job_ItemChanged);
    7676      }
    7777    }
     
    7979    protected virtual void DeregisterJobEvents() {
    8080      if (Content != null && Content.Job != null) {
    81         Content.JobItem.ComputeInParallelChanged -= new EventHandler(OptimizerJob_ComputeInParallelChanged);
    82         Content.JobItem.ItemChanged -= new EventHandler(Job_ItemChanged);
     81        Content.ItemJob.ComputeInParallelChanged -= new EventHandler(OptimizerJob_ComputeInParallelChanged);
     82        Content.ItemJob.ItemChanged -= new EventHandler(Job_ItemChanged);
    8383      }
    8484    }
     
    111111
    112112    protected virtual void Job_ItemChanged(object sender, EventArgs e) {
    113       if (Content != null && Content.Job != null && Content.JobItem.Item != null) {
    114         optimizerItemView.Content = Content.JobItem.Item;
     113      if (Content != null && Content.Job != null && Content.ItemJob.Item != null) {
     114        optimizerItemView.Content = Content.ItemJob.Item;
    115115      } else {
    116116        optimizerItemView.Content = null;
     
    129129          this.exceptionTextBox.Text = Content.Job.CurrentStateLog != null ? Content.Job.CurrentStateLog.Exception : string.Empty;
    130130          this.lastUpdatedTextBox.Text = Content.Job.LastJobDataUpdate.ToString();
    131           if (Content.JobItem.ComputeInParallel) {
     131          if (Content.ItemJob.ComputeInParallel) {
    132132            this.stateLogViewHost.Content = new StateLogListList(
    133133                this.Content.ChildHiveJobs.Select(child => new StateLogList(child.Job.StateLog)
     
    165165      this.coresNeededTextBox.ReadOnly = this.ReadOnly;
    166166      this.memoryNeededTextBox.ReadOnly = this.ReadOnly;
    167       this.computeInParallelCheckBox.Enabled = !this.ReadOnly && this.Content != null && this.Content.JobItem != null && this.Content.JobItem.IsParallelizable;
    168 
    169       this.modifyItemButton.Enabled = (Content != null && Content.JobItem.Item != null && (Content.Job.State == JobState.Paused || Content.Job.State == JobState.Offline || Content.Job.State == JobState.Finished || Content.Job.State == JobState.Failed || Content.Job.State == JobState.Aborted));
     167      this.computeInParallelCheckBox.Enabled = !this.ReadOnly && this.Content != null && this.Content.ItemJob != null && this.Content.ItemJob.IsParallelizable;
     168
     169      this.modifyItemButton.Enabled = (Content != null && Content.ItemJob.Item != null && (Content.Job.State == JobState.Paused || Content.Job.State == JobState.Offline || Content.Job.State == JobState.Finished || Content.Job.State == JobState.Failed || Content.Job.State == JobState.Aborted));
    170170
    171171      optimizerItemView.ReadOnly = true;
     
    176176        Invoke(new EventHandler(OptimizerJob_ComputeInParallelChanged), sender, e);
    177177      } else {
    178         computeInParallelCheckBox.Checked = Content.JobItem.ComputeInParallel;
     178        computeInParallelCheckBox.Checked = Content.ItemJob.ComputeInParallel;
    179179      }
    180180    }
     
    183183    #region Child Control Events
    184184     protected virtual void computeInParallelCheckBox_CheckedChanged(object sender, EventArgs e) {
    185       if (Content != null && Content.JobItem != null) {
    186         this.Content.JobItem.ComputeInParallel = this.computeInParallelCheckBox.Checked;
     185      if (Content != null && Content.ItemJob != null) {
     186        this.Content.ItemJob.ComputeInParallel = this.computeInParallelCheckBox.Checked;
    187187      }
    188188    }
     
    196196
    197197    protected virtual void modifyItemButton_Click(object sender, EventArgs e) {
    198       MainFormManager.MainForm.ShowContent(Content.JobItem.Item);
     198      MainFormManager.MainForm.ShowContent(Content.ItemJob.Item);
    199199    }
    200200    #endregion
Note: See TracChangeset for help on using the changeset viewer.