Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
05/25/12 15:36:03 (12 years ago)
Author:
jkarder
Message:

#1711:

  • added resource selection dialog
  • added extension method that returns all descendants of a TreeNode
  • relaxed service access permissions
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Clients.Hive.JobManager/3.3/Views/RefreshableHiveJobView.cs

    r7782 r7910  
    2323using System.ComponentModel;
    2424using System.Linq;
     25using System.Text;
    2526using System.Threading;
    2627using System.Threading.Tasks;
     
    4243  public partial class RefreshableHiveJobView : HeuristicLab.Core.Views.ItemView {
    4344    private ProgressView progressView;
     45    private HiveResourceSelectorDialog hiveResourceSelectorDialog;
    4446
    4547    public new RefreshableJob Content {
     
    149151        this.nameTextBox.ReadOnly = !Content.IsControllable || Content.ExecutionState != ExecutionState.Prepared || alreadyUploaded;
    150152        this.resourceNamesTextBox.ReadOnly = !Content.IsControllable || Content.ExecutionState != ExecutionState.Prepared || alreadyUploaded;
     153        this.searchButton.Enabled = Content.IsControllable && !(Content.ExecutionState != ExecutionState.Prepared || alreadyUploaded);
    151154        this.jobsTreeView.ReadOnly = !Content.IsControllable || Content.ExecutionState != ExecutionState.Prepared || alreadyUploaded;
    152155
     
    332335
    333336    #region Control events
     337    private void searchButton_Click(object sender, EventArgs e) {
     338      if (hiveResourceSelectorDialog == null)
     339        hiveResourceSelectorDialog = new HiveResourceSelectorDialog();
     340      if (hiveResourceSelectorDialog.ShowDialog(this) == DialogResult.OK) {
     341        StringBuilder sb = new StringBuilder();
     342        foreach (Resource resource in hiveResourceSelectorDialog.GetSelectedResources()) {
     343          sb.Append(resource.Name);
     344          sb.Append("; ");
     345        }
     346        resourceNamesTextBox.Text = sb.ToString();
     347      }
     348    }
     349
    334350    private void startButton_Click(object sender, EventArgs e) {
    335351      if (nameTextBox.Text.Trim() == string.Empty) {
Note: See TracChangeset for help on using the changeset viewer.