Changeset 16388 for branches/2892_LR-prediction-intervals/HeuristicLab.Clients.Hive.JobManager/3.3/MenuItems
- Timestamp:
- 12/15/18 12:36:08 (6 years ago)
- Location:
- branches/2892_LR-prediction-intervals
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2892_LR-prediction-intervals
- Property svn:ignore
-
old new 1 *.docstates 2 *.psess 3 *.resharper 4 *.suo 5 *.user 6 *.vsp 7 Doxygen 8 FxCopResults.txt 9 Google.ProtocolBuffers-0.9.1.dll 10 Google.ProtocolBuffers-2.4.1.473.dll 11 HeuristicLab 3.3.5.1.ReSharper.user 12 HeuristicLab 3.3.6.0.ReSharper.user 13 HeuristicLab.4.5.resharper.user 14 HeuristicLab.ExtLibs.6.0.ReSharper.user 15 HeuristicLab.Scripting.Development 16 HeuristicLab.resharper.user 17 ProtoGen.exe 1 18 TestResults 19 _ReSharper.HeuristicLab 20 _ReSharper.HeuristicLab 3.3 21 _ReSharper.HeuristicLab 3.3 Tests 22 _ReSharper.HeuristicLab.ExtLibs 23 bin 24 protoc.exe 25 obj 26 .vs
-
- Property svn:mergeinfo changed
-
Property
svn:global-ignores
set to
*.nuget
packages
- Property svn:ignore
-
branches/2892_LR-prediction-intervals/HeuristicLab.Clients.Hive.JobManager
- Property svn:mergeinfo changed
-
branches/2892_LR-prediction-intervals/HeuristicLab.Clients.Hive.JobManager/3.3/MenuItems/JobManagerMenuItem.cs
r15583 r16388 20 20 #endregion 21 21 22 using System; 22 23 using System.Collections.Generic; 23 24 using System.Windows.Forms; 25 using HeuristicLab.Clients.Access; 24 26 using HeuristicLab.MainForm; 25 27 using HeuristicLab.Optimizer; 26 28 27 29 namespace HeuristicLab.Clients.Hive.JobManager { 28 public class JobManagerMenuItem : HeuristicLab.MainForm.WindowsForms.MenuItem, IOptimizerUserInterfaceItemProvider {30 public class JobManagerMenuItem : MainForm.WindowsForms.MenuItem, IOptimizerUserInterfaceItemProvider { 29 31 public override string Name { 30 32 get { return "&Job Manager"; } 31 33 } 34 32 35 public override IEnumerable<string> Structure { 33 36 get { return new string[] { "&Services", "&Hive" }; } 34 37 } 38 35 39 public override void Execute() { 36 MainFormManager.MainForm.ShowContent(HiveClient.Instance); 40 if (HiveRoles.CheckHiveUserPermissions()) { 41 MainFormManager.MainForm.ShowContent(HiveClient.Instance); 42 } else if (!UserInformation.Instance.UserExists) { 43 MessageBox.Show( 44 "Couldn't fetch user information from the server." + Environment.NewLine + 45 "Please verify that you have an existing user and that your user name and password is correct.", 46 "HeuristicLab Hive Job Manager", MessageBoxButtons.OK, MessageBoxIcon.Error); 47 } else { 48 MessageBox.Show( 49 "You do not seem to have the permissions to use the Hive Job Manager." + Environment.NewLine + 50 "If that's not the case or you have any questions please write an email to support@heuristiclab.com", 51 "HeuristicLab Hive Job Manager", MessageBoxButtons.OK, MessageBoxIcon.Error); 52 } 37 53 } 54 38 55 public override int Position { 39 56 get { return 10000; } 40 57 } 58 41 59 public override Keys ShortCutKeys { 42 60 get { return Keys.Control | Keys.H; } -
branches/2892_LR-prediction-intervals/HeuristicLab.Clients.Hive.JobManager/3.3/MenuItems/RunInHiveMenuItem.cs
r15583 r16388 22 22 using System; 23 23 using System.Collections.Generic; 24 using System.Linq; 24 25 using System.Threading; 26 using System.Windows.Forms; 27 using HeuristicLab.Clients.Hive.JobManager.Views; 25 28 using HeuristicLab.Core; 26 29 using HeuristicLab.MainForm; … … 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 var hiveResourceSelectorDialog = new HiveResourceSelectorDialog(rJob.Job.Id, rJob.Job.ProjectId); 87 88 88 HiveClient.StartJob(new Action<Exception>(HandleEx), rJob, new CancellationToken()); 89 if (HiveClient.Instance.Projects.Count == 1) { 90 var project = HiveClient.Instance.Projects.FirstOrDefault(); 91 if (project != null && project.Id != Guid.Empty) 92 hiveResourceSelectorDialog.SelectedProjectId = project.Id; 93 } 94 95 if (hiveResourceSelectorDialog.ShowDialog((UserControl)activeView) == DialogResult.OK) { 96 var selectedProject = hiveResourceSelectorDialog.SelectedProject; 97 if (selectedProject != null) { 98 rJob.Job.ProjectId = selectedProject.Id; 99 rJob.Job.ResourceIds = hiveResourceSelectorDialog.SelectedResources.Select(x => x.Id).ToList(); 100 101 progress = MainFormManager.GetMainForm<MainForm.WindowsForms.MainForm>().AddOperationProgressToContent(this.content, "Uploading to Hive..."); 102 rJob.Progress = progress; 103 progress.ProgressStateChanged += progress_ProgressStateChanged; 104 105 HiveClient.StartJob(new Action<Exception>(HandleEx), rJob, new CancellationToken()); 106 } 107 } 89 108 } 90 109
Note: See TracChangeset
for help on using the changeset viewer.