Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
07/10/18 23:06:00 (6 years ago)
Author:
jzenisek
Message:

#2839: fixed couple of minor issues

  • changed tags in resource selector
  • added project information in job list and adapted sortation
  • fixed hand-down save by withdrawing additional offset-rights (permissions, resources),...
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2839_HiveProjectManagement/HeuristicLab.Clients.Hive.JobManager/3.3/Views/RefreshableHiveJobView.cs

    r15966 r15992  
    121121        if (Content == null) {
    122122          nameTextBox.Text = string.Empty;
     123          descriptionTextBox.Text = string.Empty;
    123124          executionTimeTextBox.Text = string.Empty;
    124125          projectNameTextBox.Text = string.Empty;
     
    139140
    140141          nameTextBox.Text = Content.Job.Name;
     142          descriptionTextBox.Text = Content.Job.Description;
    141143          executionTimeTextBox.Text = Content.ExecutionTime.ToString();
    142144          refreshAutomaticallyCheckBox.Checked = Content.RefreshAutomatically;
     
    183185      tabControl.Enabled = !Locked;
    184186      nameTextBox.Enabled = !Locked;
     187      descriptionTextBox.Enabled = !Locked;
    185188      projectNameTextBox.Enabled = !Locked;
    186189      searchButton.Enabled = !Locked;
     
    208211
    209212          this.nameTextBox.ReadOnly = Content.IsProgressing;
     213          this.descriptionTextBox.ReadOnly = Content.IsProgressing;
    210214          this.searchButton.Enabled = !Content.IsProgressing && Content.ExecutionState != ExecutionState.Stopped;
    211215          this.jobsTreeView.ReadOnly = !Content.IsControllable || Content.ExecutionState != ExecutionState.Prepared || alreadyUploaded || Content.IsProgressing;
     
    457461    }
    458462
     463    private void descriptionTextBox_Validated(object sender, EventArgs e) {
     464      if (!SuppressEvents && Content.Job != null && Content.Job.Description != descriptionTextBox.Text)
     465        Content.Job.Description = descriptionTextBox.Text;
     466    }
     467
    459468    private void resourceNamesTextBox_Validated(object sender, EventArgs e) {
    460469      //if (!SuppressEvents && Content.Job != null && Content.Job.ResourceNames != resourceNamesTextBox.Text)
     
    478487    }
    479488
     489    private void updateButton_Click2(object sender, EventArgs e) {
     490      if (Content.ExecutionState == ExecutionState.Stopped) {
     491        MessageBox.Show("Job cannot be updated once it stopped.", "HeuristicLab Hive Job Manager", MessageBoxButtons.OK, MessageBoxIcon.Information);
     492        return;
     493      }
     494
     495      HiveClient.UpdateJob(
     496        (Exception ex) => ErrorHandling.ShowErrorDialog(this, "Update failed.", ex),
     497        Content,
     498        new CancellationToken());
     499      UpdateSelectorDialog();
     500    }
     501
    480502    private void updateButton_Click(object sender, EventArgs e) {
    481503      if (Content.ExecutionState == ExecutionState.Stopped) {
     
    484506      }
    485507
    486       HiveClient.UpdateJob(
    487         (Exception ex) => ErrorHandling.ShowErrorDialog(this, "Update failed.", ex),
    488         Content,
    489         new CancellationToken());
     508      var invoker = new Action<RefreshableJob>(HiveClient.UpdateJob);
     509      invoker.BeginInvoke(Content, (ar) => {
     510        try {
     511          invoker.EndInvoke(ar);
     512        } catch (Exception ex) {
     513          ThreadPool.QueueUserWorkItem(delegate (object exception) { ErrorHandling.ShowErrorDialog(this, (Exception)exception); }, ex);
     514        }
     515      }, null);
    490516      UpdateSelectorDialog();
    491517    }
Note: See TracChangeset for help on using the changeset viewer.