- Timestamp:
- 05/13/18 20:33:39 (7 years ago)
- Location:
- branches/2839_HiveProjectManagement/HeuristicLab.Clients.Hive.JobManager/3.3
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2839_HiveProjectManagement/HeuristicLab.Clients.Hive.JobManager/3.3/MenuItems/RunInHiveMenuItem.cs
r14185 r15933 28 28 using HeuristicLab.Optimizer; 29 29 using HeuristicLab.PluginInfrastructure; 30 using HeuristicLab.Clients.Hive.JobManager.Views; 31 using System.Windows.Forms; 32 using System.Linq; 30 33 31 34 namespace HeuristicLab.Clients.Hive.JobManager { … … 82 85 task.ItemTask.ComputeInParallel = content is Experiment || content is BatchRun; 83 86 84 progress = MainFormManager.GetMainForm<MainForm.WindowsForms.MainForm>().AddOperationProgressToContent(this.content, "Uploading to Hive...");85 rJob.Progress = progress;86 progress.ProgressStateChanged += progress_ProgressStateChanged;87 87 88 HiveClient.StartJob(new Action<Exception>(HandleEx), rJob, new CancellationToken()); 88 var hiveResourceSelectorDialog = new HiveResourceSelectorDialog(rJob.Job.Id, rJob.Job.ProjectId); 89 if (hiveResourceSelectorDialog.ShowDialog((UserControl)activeView) == DialogResult.OK) { 90 var selectedProject = hiveResourceSelectorDialog.SelectedProject; 91 if (selectedProject != null) { 92 rJob.Job.ProjectId = selectedProject.Id; 93 rJob.Job.ResourceIds = hiveResourceSelectorDialog.SelectedResources.Select(x => x.Id).ToList(); 94 95 progress = MainFormManager.GetMainForm<MainForm.WindowsForms.MainForm>().AddOperationProgressToContent(this.content, "Uploading to Hive..."); 96 rJob.Progress = progress; 97 progress.ProgressStateChanged += progress_ProgressStateChanged; 98 99 HiveClient.StartJob(new Action<Exception>(HandleEx), rJob, new CancellationToken()); 100 } 101 } 89 102 } 90 103 -
branches/2839_HiveProjectManagement/HeuristicLab.Clients.Hive.JobManager/3.3/Views/HiveResourceSelectorDialog.Designer.cs
r15627 r15933 55 55 this.okButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); 56 56 this.okButton.DialogResult = System.Windows.Forms.DialogResult.OK; 57 this.okButton.Enabled = false; 57 58 this.okButton.Location = new System.Drawing.Point(405, 609); 58 59 this.okButton.Name = "okButton"; … … 91 92 this.hiveResourceSelector.Caption = "View"; 92 93 this.hiveResourceSelector.Content = null; 94 this.hiveResourceSelector.JobId = new System.Guid("00000000-0000-0000-0000-000000000000"); 93 95 this.hiveResourceSelector.Location = new System.Drawing.Point(12, 12); 94 96 this.hiveResourceSelector.Name = "hiveResourceSelector"; 97 this.hiveResourceSelector.ProjectId = null; 95 98 this.hiveResourceSelector.ReadOnly = false; 96 99 this.hiveResourceSelector.SelectedProject = null; 100 this.hiveResourceSelector.SelectedProjectId = null; 101 this.hiveResourceSelector.SelectedResourceIds = null; 97 102 this.hiveResourceSelector.Size = new System.Drawing.Size(549, 591); 98 103 this.hiveResourceSelector.TabIndex = 0; -
branches/2839_HiveProjectManagement/HeuristicLab.Clients.Hive.JobManager/3.3/Views/HiveResourceSelectorDialog.cs
r15913 r15933 129 129 130 130 await SecurityExceptionUtil.TryAsyncAndReportSecurityExceptions( 131 action: () => Update Instance(),131 action: () => UpdateProjects(), 132 132 finallyCallback: () => updatingProjects = false); 133 133 } … … 151 151 152 152 #region Helpers 153 private void UpdateInstance() {154 HiveClient.Instance.Refresh();155 }156 157 153 private void UpdateProjects() { 158 154 HiveClient.Instance.RefreshProjectsAndResources();
Note: See TracChangeset
for help on using the changeset viewer.