Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
10/07/17 10:32:07 (7 years ago)
Author:
jkarder
Message:

#2839:

  • worked on resources and projects views
  • changed resource selector to be able to select projects and assigned resources
  • updated service clients
File:
1 edited

Legend:

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

    r15401 r15412  
    2323using System.ComponentModel;
    2424using System.Linq;
    25 using System.Text;
    2625using System.Threading;
    2726using System.Threading.Tasks;
     
    118117          nameTextBox.Text = string.Empty;
    119118          executionTimeTextBox.Text = string.Empty;
    120           resourceNamesTextBox.Text = string.Empty;
     119          projectNameTextBox.Text = string.Empty;
    121120          refreshAutomaticallyCheckBox.Checked = false;
    122121          lock (runCollectionViewLocker) {
     
    137136          }
    138137        }
    139       }
    140       finally {
     138      } finally {
    141139        SuppressEvents = false;
    142140      }
     
    158156      tabControl.Enabled = !Locked;
    159157      nameTextBox.Enabled = !Locked;
    160       resourceNamesTextBox.Enabled = !Locked;
     158      projectNameTextBox.Enabled = !Locked;
    161159      searchButton.Enabled = !Locked;
    162160      jobsTreeView.Enabled = !Locked;
     
    183181
    184182          this.nameTextBox.ReadOnly = !Content.IsControllable || Content.ExecutionState != ExecutionState.Prepared || alreadyUploaded || Content.IsProgressing;
    185           this.resourceNamesTextBox.ReadOnly = !Content.IsControllable || Content.ExecutionState != ExecutionState.Prepared || alreadyUploaded || Content.IsProgressing;
    186183          this.searchButton.Enabled = Content.IsControllable && Content.ExecutionState == ExecutionState.Prepared && !alreadyUploaded && !Content.IsProgressing;
    187184          this.jobsTreeView.ReadOnly = !Content.IsControllable || Content.ExecutionState != ExecutionState.Prepared || alreadyUploaded || Content.IsProgressing;
     
    335332      if (hiveResourceSelectorDialog == null)
    336333        hiveResourceSelectorDialog = new HiveResourceSelectorDialog();
     334
    337335      if (hiveResourceSelectorDialog.ShowDialog(this) == DialogResult.OK) {
    338         StringBuilder sb = new StringBuilder();
    339         //foreach (Project resource in hiveResourceSelectorDialog.GetSelectedResources()) {
    340         //  sb.Append(resource.Name);
    341         //  sb.Append(";");
    342         //}
    343         //resourceNamesTextBox.Text = sb.ToString();
    344         //if (Content.Job.ResourceNames != resourceNamesTextBox.Text)
    345         //  Content.Job.ResourceNames = resourceNamesTextBox.Text;
    346336        var selectedProject = hiveResourceSelectorDialog.SelectedProject;
    347         resourceNamesTextBox.Text = selectedProject.Name;
    348         if (Content.Job.ProjectId != selectedProject.Id)
    349           Content.Job.ProjectId = selectedProject.Id;
     337        projectNameTextBox.Text = selectedProject.Name;
     338        Content.Job.ProjectId = selectedProject.Id;
     339        Content.Job.ResourceIds = hiveResourceSelectorDialog.SelectedResources.Select(x => x.Id).ToList();
    350340      }
    351341    }
     
    421411        try {
    422412          invoker.EndInvoke(ar);
    423         }
    424         catch (Exception ex) {
    425           ThreadPool.QueueUserWorkItem(delegate(object exception) { ErrorHandling.ShowErrorDialog(this, (Exception)exception); }, ex);
     413        } catch (Exception ex) {
     414          ThreadPool.QueueUserWorkItem(delegate (object exception) { ErrorHandling.ShowErrorDialog(this, (Exception)exception); }, ex);
    426415        }
    427416      }, null);
     
    510499          if (subTask is OptimizerHiveTask) {
    511500            OptimizerHiveTask ohTask = subTask as OptimizerHiveTask;
    512             ohTask.ExecuteReadActionOnItemTask(new Action(delegate() {
     501            ohTask.ExecuteReadActionOnItemTask(new Action(delegate () {
    513502              runs.AddRange(ohTask.ItemTask.Item.Runs);
    514503            }));
Note: See TracChangeset for help on using the changeset viewer.