- Timestamp:
- 07/18/14 13:34:37 (11 years ago)
- Location:
- branches/HiveStatistics/sources/HeuristicLab.Clients.Hive.JobManager
- Files:
-
- 21 edited
- 2 copied
Legend:
- Unmodified
- Added
- Removed
-
branches/HiveStatistics/sources/HeuristicLab.Clients.Hive.JobManager
-
Property
svn:mergeinfo
set to
(toggle deleted branches)
/trunk/sources/HeuristicLab.Clients.Hive.JobManager merged eligible /branches/Algorithms.GradientDescent/HeuristicLab.Clients.Hive.JobManager 5516-5520 /branches/Benchmarking/sources/HeuristicLab.Clients.Hive.JobManager 6917-7005 /branches/CloningRefactoring/HeuristicLab.Clients.Hive.JobManager 4656-4721 /branches/DataAnalysis Refactoring/HeuristicLab.Clients.Hive.JobManager 5471-5808 /branches/DataAnalysis SolutionEnsembles/HeuristicLab.Clients.Hive.JobManager 5815-6180 /branches/DataAnalysis/HeuristicLab.Clients.Hive.JobManager 4458-4459,4462,4464 /branches/GP.Grammar.Editor/HeuristicLab.Clients.Hive.JobManager 6284-6795 /branches/GP.Symbols (TimeLag, Diff, Integral)/HeuristicLab.Clients.Hive.JobManager 5060 /branches/NET40/sources/HeuristicLab.Clients.Hive.JobManager 5138-5162 /branches/ParallelEngine/HeuristicLab.Clients.Hive.JobManager 5175-5192 /branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Clients.Hive.JobManager 7568-7810 /branches/QAPAlgorithms/HeuristicLab.Clients.Hive.JobManager 6350-6627 /branches/Restructure trunk solution/HeuristicLab.Clients.Hive.JobManager 6828 /branches/RuntimeOptimizer/HeuristicLab.Clients.Hive.JobManager 8943-9078 /branches/ScatterSearch (trunk integration)/HeuristicLab.Clients.Hive.JobManager 7787-8333 /branches/SlaveShutdown/HeuristicLab.Clients.Hive.JobManager 8944-8956 /branches/SuccessProgressAnalysis/HeuristicLab.Clients.Hive.JobManager 5370-5682 /branches/Trunk/HeuristicLab.Clients.Hive.JobManager 6829-6865 /branches/UnloadJobs/HeuristicLab.Clients.Hive.JobManager 9168-9215 /branches/VNS/HeuristicLab.Clients.Hive.JobManager 5594-5752 /branches/histogram/HeuristicLab.Clients.Hive.JobManager 5959-6341
-
Property
svn:mergeinfo
set to
(toggle deleted branches)
-
branches/HiveStatistics/sources/HeuristicLab.Clients.Hive.JobManager/3.3/ExtensionMethods/TreeNodeExtensions.cs
r11203 r11204 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 2Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/HiveStatistics/sources/HeuristicLab.Clients.Hive.JobManager/3.3/HeuristicLab.Clients.Hive.JobManager-3.3.csproj
r11203 r11204 98 98 <Compile Include="ExtensionMethods\TreeNodeExtensions.cs" /> 99 99 <Compile Include="ListViewItemDateComparer.cs" /> 100 <Compile Include="MenuItems\CreateHiveJobMenuItem.cs" /> 101 <Compile Include="MenuItems\RunInHiveMenuItem.cs" /> 100 102 <Compile Include="Plugin.cs" /> 101 103 <Compile Include="Views\HiveJobManagerView.cs"> -
branches/HiveStatistics/sources/HeuristicLab.Clients.Hive.JobManager/3.3/ListViewItemDateComparer.cs
r11203 r11204 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 2Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 31 31 public class ListViewItemDateComparer : IComparer { 32 32 private int col; 33 p rivate SortOrder order;33 public SortOrder Order { get; set; } 34 34 35 35 public ListViewItemDateComparer() { 36 36 col = 0; 37 order = SortOrder.Ascending;37 Order = SortOrder.Ascending; 38 38 } 39 39 40 40 public ListViewItemDateComparer(int column, SortOrder order) { 41 41 col = column; 42 this.order = order;42 Order = order; 43 43 } 44 44 … … 66 66 } 67 67 68 if ( order == SortOrder.Descending) {68 if (Order == SortOrder.Descending) { 69 69 // invert the value returned by Compare. 70 70 returnVal *= -1; -
branches/HiveStatistics/sources/HeuristicLab.Clients.Hive.JobManager/3.3/MenuItems/JobManagerMenuItem.cs
r11203 r11204 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 2Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 22 22 using System.Collections.Generic; 23 23 using System.Windows.Forms; 24 using HeuristicLab.Clients.Hive;25 24 using HeuristicLab.MainForm; 25 using HeuristicLab.Optimizer; 26 26 27 namespace HeuristicLab. Optimizer.MenuItems{27 namespace HeuristicLab.Clients.Hive.JobManager { 28 28 public class JobManagerMenuItem : HeuristicLab.MainForm.WindowsForms.MenuItem, IOptimizerUserInterfaceItemProvider { 29 29 public override string Name { -
branches/HiveStatistics/sources/HeuristicLab.Clients.Hive.JobManager/3.3/Plugin.cs.frame
r11203 r11204 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 2Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 23 23 24 24 namespace HeuristicLab.Clients.Hive.JobManager { 25 [Plugin("HeuristicLab.Clients.Hive.JobManager", "3.3. 7.$WCREV$")]25 [Plugin("HeuristicLab.Clients.Hive.JobManager", "3.3.10.$WCREV$")] 26 26 [PluginFile("HeuristicLab.Clients.Hive.JobManager-3.3.dll", PluginFileType.Assembly)] 27 27 [PluginDependency("HeuristicLab.Clients.Hive", "3.3")] -
branches/HiveStatistics/sources/HeuristicLab.Clients.Hive.JobManager/3.3/Properties/AssemblyInfo.cs.frame
r11203 r11204 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 2Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 32 32 [assembly: AssemblyCompany("HEAL")] 33 33 [assembly: AssemblyProduct("HeuristicLab")] 34 [assembly: AssemblyCopyright("(c) 2002-201 2HEAL")]34 [assembly: AssemblyCopyright("(c) 2002-2014 HEAL")] 35 35 [assembly: AssemblyTrademark("")] 36 36 [assembly: AssemblyCulture("")] … … 55 55 // [assembly: AssemblyVersion("1.0.*")] 56 56 [assembly: AssemblyVersion("3.3.0.0")] 57 [assembly: AssemblyFileVersion("3.3. 7.$WCREV$")]57 [assembly: AssemblyFileVersion("3.3.10.$WCREV$")] -
branches/HiveStatistics/sources/HeuristicLab.Clients.Hive.JobManager/3.3/Views/HiveJobManagerView.Designer.cs
r11203 r11204 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 2Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/HiveStatistics/sources/HeuristicLab.Clients.Hive.JobManager/3.3/Views/HiveJobManagerView.cs
r11203 r11204 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 2Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/HiveStatistics/sources/HeuristicLab.Clients.Hive.JobManager/3.3/Views/HiveJobPermissionListView.Designer.cs
r11203 r11204 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 2Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/HiveStatistics/sources/HeuristicLab.Clients.Hive.JobManager/3.3/Views/HiveJobPermissionListView.cs
r11203 r11204 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 2Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/HiveStatistics/sources/HeuristicLab.Clients.Hive.JobManager/3.3/Views/HiveJobPermissionView.Designer.cs
r11203 r11204 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 2Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/HiveStatistics/sources/HeuristicLab.Clients.Hive.JobManager/3.3/Views/HiveJobPermissionView.cs
r11203 r11204 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 2Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/HiveStatistics/sources/HeuristicLab.Clients.Hive.JobManager/3.3/Views/HiveResourceSelector.Designer.cs
r11203 r11204 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 2Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/HiveStatistics/sources/HeuristicLab.Clients.Hive.JobManager/3.3/Views/HiveResourceSelector.cs
r11203 r11204 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 2Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 42 42 private ISet<TreeNode> filteredTreeNodes; 43 43 private ISet<TreeNode> nodeStore; 44 private Progress progress; 45 private ProgressView progressView; 46 44 47 45 private ISet<Resource> selectedResources; 48 46 public ISet<Resource> SelectedResources { … … 64 62 imageList.Images.Add(HeuristicLab.Common.Resources.VSImageLibrary.MonitorLarge); 65 63 imageList.Images.Add(HeuristicLab.Common.Resources.VSImageLibrary.NetworkCenterLarge); 66 progress = new Progress() { 67 CanBeCanceled = false, 68 ProgressState = ProgressState.Finished 69 }; 70 } 71 72 protected override void DeregisterContentEvents() { 73 if (progressView != null) { 74 progressView.Content = null; 75 progressView.Dispose(); 76 progressView = null; 77 } 78 base.DeregisterContentEvents(); 79 } 80 81 protected override void RegisterContentEvents() { 82 base.RegisterContentEvents(); 83 progressView = new ProgressView(this, progress); 84 } 85 64 } 65 86 66 public void StartProgressView() { 87 67 if (InvokeRequired) { 88 68 Invoke(new Action(StartProgressView)); 89 69 } else { 90 progress.Status= "Downloading resources. Please be patient.";91 progress.ProgressState = ProgressState.Started;70 var message = "Downloading resources. Please be patient."; 71 MainFormManager.GetMainForm<HeuristicLab.MainForm.WindowsForms.MainForm>().AddOperationProgressToView(this, message); 92 72 } 93 73 } … … 97 77 Invoke(new Action(FinishProgressView)); 98 78 } else { 99 progress.Finish();79 MainFormManager.GetMainForm<HeuristicLab.MainForm.WindowsForms.MainForm>().RemoveOperationProgressFromView(this); 100 80 } 101 81 } -
branches/HiveStatistics/sources/HeuristicLab.Clients.Hive.JobManager/3.3/Views/HiveResourceSelectorDialog.Designer.cs
r11203 r11204 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 2Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/HiveStatistics/sources/HeuristicLab.Clients.Hive.JobManager/3.3/Views/HiveResourceSelectorDialog.cs
r11203 r11204 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 2Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/HiveStatistics/sources/HeuristicLab.Clients.Hive.JobManager/3.3/Views/RefreshableHiveJobListView.Designer.cs
r11203 r11204 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 2Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/HiveStatistics/sources/HeuristicLab.Clients.Hive.JobManager/3.3/Views/RefreshableHiveJobListView.cs
r11203 r11204 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 2Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 34 34 [Content(typeof(ItemCollection<RefreshableJob>), false)] 35 35 public partial class RefreshableHiveJobListView : HeuristicLab.Core.Views.ItemCollectionView<RefreshableJob> { 36 private Progress progress;37 private ProgressView progressView;38 39 36 public RefreshableHiveJobListView() { 40 37 InitializeComponent(); … … 44 41 this.itemsListView.Columns.Add(new ColumnHeader("Date") { Text = "Date" }); 45 42 this.itemsListView.Columns.Add(new ColumnHeader("Name") { Text = "Name" }); 46 foreach (ColumnHeader c in this.itemsListView.Columns) { 47 c.AutoResize(ColumnHeaderAutoResizeStyle.HeaderSize); 48 } 43 49 44 this.itemsListView.HeaderStyle = ColumnHeaderStyle.Clickable; 50 45 this.itemsListView.FullRowSelect = true; 51 46 52 47 this.itemsListView.ListViewItemSorter = new ListViewItemDateComparer(0, SortOrder.Ascending); 53 this.itemsListView.Sorting = SortOrder.Ascending;54 this.itemsListView.Sort(); 55 56 progress = new Progress() {57 CanBeCanceled = false,58 ProgressState = ProgressState.Finished59 };60 progressView = new ProgressView(this, progress);48 } 49 50 protected override void SortItemsListView(SortOrder sortOrder) { 51 if (itemsListView.Sorting == sortOrder || sortOrder == SortOrder.None) return; 52 ((ListViewItemDateComparer)itemsListView.ListViewItemSorter).Order = sortOrder; 53 itemsListView.Sorting = sortOrder; 54 itemsListView.Sort(); 55 AdjustListViewColumnSizes(); 61 56 } 62 57 … … 114 109 115 110 task.ContinueWith((t) => { 116 progress.Finish();111 MainFormManager.GetMainForm<HeuristicLab.MainForm.WindowsForms.MainForm>().RemoveOperationProgressFromView(this); 117 112 ErrorHandling.ShowErrorDialog("An error occured while deleting the job. ", t.Exception); 118 113 }, TaskContinuationOptions.OnlyOnFaulted); … … 125 120 126 121 private void DeleteHiveJobsAsync(object items) { 127 progress.Status = "Deleting job..."; 128 progress.ProgressState = ProgressState.Started; 129 progress.ProgressValue = 0.0; 122 MainFormManager.GetMainForm<HeuristicLab.MainForm.WindowsForms.MainForm>().AddOperationProgressToView(this, "Deleting job..."); 130 123 foreach (RefreshableJob item in (List<RefreshableJob>)items) { 131 124 Content.Remove(item); 132 125 } 133 progress.Finish();126 MainFormManager.GetMainForm<HeuristicLab.MainForm.WindowsForms.MainForm>().RemoveOperationProgressFromView(this); 134 127 } 135 128 … … 223 216 if (disposing) { 224 217 if (components != null) components.Dispose(); 225 progressView.Content = null;226 progressView.Dispose();227 218 } 228 219 base.Dispose(disposing); -
branches/HiveStatistics/sources/HeuristicLab.Clients.Hive.JobManager/3.3/Views/RefreshableHiveJobView.Designer.cs
r11203 r11204 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 2Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/HiveStatistics/sources/HeuristicLab.Clients.Hive.JobManager/3.3/Views/RefreshableHiveJobView.cs
r11203 r11204 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 2Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 42 42 [Content(typeof(RefreshableJob), true)] 43 43 public partial class RefreshableHiveJobView : HeuristicLab.Core.Views.ItemView { 44 private Progress progress;45 private ProgressView progressView;46 44 private HiveResourceSelectorDialog hiveResourceSelectorDialog; 47 45 private bool SuppressEvents { get; set; } … … 58 56 public RefreshableHiveJobView() { 59 57 InitializeComponent(); 60 progress = new Progress() {61 CanBeCanceled = false,62 ProgressState = ProgressState.Finished63 };64 58 } 65 59 … … 72 66 Content.ExceptionOccured += new EventHandler<EventArgs<Exception>>(Content_ExceptionOccured); 73 67 Content.StateLogListChanged += new EventHandler(Content_StateLogListChanged); 74 Content.IsProgressingChanged += new EventHandler(Content_IsProgressingChanged);75 68 Content.HiveTasksChanged += new EventHandler(Content_HiveTasksChanged); 76 69 Content.ExecutionStateChanged += new EventHandler(Content_ExecutionStateChanged); … … 78 71 Content.Loaded += new EventHandler(Content_Loaded); 79 72 Content.TaskReceived += new EventHandler(Content_TaskReceived); 80 progressView = new ProgressView(this, progress);73 MainFormManager.GetMainForm<HeuristicLab.MainForm.WindowsForms.MainForm>().AddOperationProgressToView(this, Content.Progress); 81 74 } 82 75 … … 88 81 Content.ExceptionOccured -= new EventHandler<EventArgs<Exception>>(Content_ExceptionOccured); 89 82 Content.StateLogListChanged -= new EventHandler(Content_StateLogListChanged); 90 Content.IsProgressingChanged -= new EventHandler(Content_IsProgressingChanged);91 83 Content.HiveTasksChanged -= new EventHandler(Content_HiveTasksChanged); 92 84 Content.ExecutionStateChanged -= new EventHandler(Content_ExecutionStateChanged); … … 94 86 Content.Loaded -= new EventHandler(Content_Loaded); 95 87 Content.TaskReceived -= new EventHandler(Content_TaskReceived); 96 if (progressView != null) { 97 progressView.Content = null; 98 progressView.Dispose(); 99 progressView = null; 100 } 88 MainFormManager.GetMainForm<HeuristicLab.MainForm.WindowsForms.MainForm>().RemoveOperationProgressFromView(this, false); 101 89 DeregisterHiveExperimentEvents(); 102 90 DeregisterHiveTasksEvents(); … … 159 147 Content_HiveExperimentChanged(this, EventArgs.Empty); 160 148 Content_HiveTasksChanged(this, EventArgs.Empty); 161 Content_IsProgressingChanged(this, EventArgs.Empty);162 149 Content_StateLogListChanged(this, EventArgs.Empty); 163 150 HiveExperiment_PropertyChanged(this, new PropertyChangedEventArgs("Id")); … … 260 247 SetEnabledStateOfControls(); 261 248 } 262 private void Content_Prepared(object sender, EventArgs e) { 263 if (InvokeRequired) 264 Invoke(new EventHandler(Content_Prepared), sender, e); 265 else { 266 nameTextBox.Enabled = true; 267 Locked = false; 268 SetEnabledStateOfControls(); 269 } 270 } 271 private void Content_Started(object sender, EventArgs e) { 272 if (InvokeRequired) 273 Invoke(new EventHandler(Content_Started), sender, e); 274 else { 275 nameTextBox.Enabled = false; 276 SetEnabledStateOfControls(); 277 } 278 } 279 private void Content_Paused(object sender, EventArgs e) { 280 if (InvokeRequired) 281 Invoke(new EventHandler(Content_Paused), sender, e); 282 else { 283 nameTextBox.Enabled = true; 284 SetEnabledStateOfControls(); 285 } 286 } 287 private void Content_Stopped(object sender, EventArgs e) { 288 if (InvokeRequired) 289 Invoke(new EventHandler(Content_Stopped), sender, e); 290 else { 291 nameTextBox.Enabled = true; 292 Locked = false; 293 SetEnabledStateOfControls(); 294 } 295 } 249 296 250 private void Content_ExecutionTimeChanged(object sender, EventArgs e) { 297 251 if (InvokeRequired) … … 326 280 runCollectionViewHost.Content = GetAllRunsFromJob(Content); 327 281 } 328 isPrivilegedCheckBox.Checked = Content.Job.IsPrivileged; 282 if (InvokeRequired) { 283 Invoke(new Action(() => { isPrivilegedCheckBox.Checked = Content.Job.IsPrivileged; })); 284 } else { 285 isPrivilegedCheckBox.Checked = Content.Job.IsPrivileged; 286 } 329 287 } 330 288 … … 332 290 if (Content != null && Content.Job != null) { 333 291 RegisterHiveExperimentEvents(); 334 Content_IsProgressingChanged(sender, e);335 292 } 336 293 } … … 406 363 var task = System.Threading.Tasks.Task.Factory.StartNew(ResumeJobAsync, Content); 407 364 task.ContinueWith((t) => { 408 progress.Finish();365 Content.Progress.Finish(); 409 366 MessageBox.Show("An error occured resuming the job. See the log for more information.", "HeuristicLab Hive Job Manager", MessageBoxButtons.OK, MessageBoxIcon.Error); 410 367 Content.Log.LogException(t.Exception); … … 418 375 var task = System.Threading.Tasks.Task.Factory.StartNew(PauseJobAsync, Content); 419 376 task.ContinueWith((t) => { 420 progress.Finish();377 Content.Progress.Finish(); 421 378 MessageBox.Show("An error occured pausing the job. See the log for more information.", "HeuristicLab Hive Job Manager", MessageBoxButtons.OK, MessageBoxIcon.Error); 422 379 Content.Log.LogException(t.Exception); … … 427 384 var task = System.Threading.Tasks.Task.Factory.StartNew(StopJobAsync, Content); 428 385 task.ContinueWith((t) => { 429 progress.Finish();386 Content.Progress.Finish(); 430 387 MessageBox.Show("An error occured stopping the job. See the log for more information.", "HeuristicLab Hive Job Manager", MessageBoxButtons.OK, MessageBoxIcon.Error); 431 388 Content.Log.LogException(t.Exception); … … 435 392 436 393 private void PauseJobAsync(object job) { 437 progress.Status = "Pausing job..."; 438 progress.ProgressState = ProgressState.Started; 394 Content.Progress.Start("Pausing job..."); 439 395 HiveClient.PauseJob((RefreshableJob)job); 440 progress.Finish();396 Content.Progress.Finish(); 441 397 } 442 398 443 399 private void StopJobAsync(object job) { 444 progress.Status = "Stopping job..."; 445 progress.ProgressState = ProgressState.Started; 400 Content.Progress.Start("Stopping job..."); 446 401 HiveClient.StopJob((RefreshableJob)job); 447 progress.Finish();402 Content.Progress.Finish(); 448 403 } 449 404 450 405 private void ResumeJobAsync(object job) { 451 progress.Status = "Resuming job..."; 452 progress.ProgressState = ProgressState.Started; 406 Content.Progress.Start("Resuming job..."); 453 407 HiveClient.ResumeJob((RefreshableJob)job); 454 progress.Finish();408 Content.Progress.Finish(); 455 409 } 456 410 … … 507 461 #endregion 508 462 509 #region Progress reporting510 private void Content_IsProgressingChanged(object sender, EventArgs e) {511 if (this.InvokeRequired) {512 Invoke(new EventHandler(Content_IsProgressingChanged), sender, e);513 } else {514 if (Content != null && Content.Progress != null && Content.IsProgressing) {515 progressView.Content = Content.Progress;516 } else if (Content != null) {517 progressView.Content = progress;518 }519 }520 }521 #endregion522 523 463 #region Drag & Drop 524 464 private void jobsTreeView_DragOver(object sender, DragEventArgs e) { … … 528 468 private void jobsTreeView_DragEnter(object sender, DragEventArgs e) { 529 469 e.Effect = DragDropEffects.None; 530 var obj = e.Data.GetData(Constants.DragDropDataFormat); 531 if (obj is IOptimizer) { 470 var obj = (IDeepCloneable)e.Data.GetData(Constants.DragDropDataFormat); 471 472 Type objType = obj.GetType(); 473 if (ItemTask.IsTypeSupported(objType)) { 532 474 if (Content.Id != Guid.Empty) e.Effect = DragDropEffects.None; 533 475 else if ((e.KeyState & 32) == 32) e.Effect = DragDropEffects.Link; // ALT key … … 538 480 private void jobsTreeView_DragDrop(object sender, DragEventArgs e) { 539 481 if (e.Effect != DragDropEffects.None) { 540 var obj = e.Data.GetData(Constants.DragDropDataFormat); 541 542 var optimizer = obj as IOptimizer; 543 if (optimizer != null) { 544 IOptimizer newOptimizer = null; 545 if (e.Effect.HasFlag(DragDropEffects.Copy)) { 546 newOptimizer = (IOptimizer)optimizer.Clone(); 547 newOptimizer.Runs.Clear(); 548 } else { 549 newOptimizer = optimizer; 482 var obj = (IItem)e.Data.GetData(Constants.DragDropDataFormat); 483 484 IItem newObj = null; 485 if (e.Effect.HasFlag(DragDropEffects.Copy)) { 486 newObj = (IItem)obj.Clone(); 487 } else { 488 newObj = obj; 489 } 490 491 //IOptimizer and IExecutables need some special care 492 if (newObj is IOptimizer) { 493 ((IOptimizer)newObj).Runs.Clear(); 494 } 495 if (newObj is IExecutable) { 496 IExecutable exec = (IExecutable)newObj; 497 if (exec.ExecutionState != ExecutionState.Prepared) { 498 exec.Prepare(); 550 499 } 551 if (newOptimizer.ExecutionState != ExecutionState.Prepared) { 552 newOptimizer.Prepare(); 553 } 554 555 Content.HiveTasks.Add(new OptimizerHiveTask(newOptimizer)); 556 } 500 } 501 502 ItemTask hiveTask = ItemTask.GetItemTaskForItem(newObj); 503 Content.HiveTasks.Add(hiveTask.CreateHiveTask()); 557 504 } 558 505 }
Note: See TracChangeset
for help on using the changeset viewer.