Changeset 12823
- Timestamp:
- 07/31/15 10:57:26 (9 years ago)
- Location:
- branches/HeuristicLab.Tools/HeuristicLab.HiveDrain
- Files:
-
- 1 added
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.Tools/HeuristicLab.HiveDrain
-
Property
svn:global-ignores
set to
.vs
-
Property
svn:global-ignores
set to
-
branches/HeuristicLab.Tools/HeuristicLab.HiveDrain/HeuristicLab.HiveDrain/HeuristicLab.HiveDrain.csproj
r12538 r12823 75 75 </Compile> 76 76 <Compile Include="JobDownloader.cs" /> 77 <Compile Include="JobTaskOneFileDownloader.cs" /> 77 78 <Compile Include="Plugin.cs" /> 78 79 <Compile Include="Properties\AssemblyInfo.cs" /> -
branches/HeuristicLab.Tools/HeuristicLab.HiveDrain/HeuristicLab.HiveDrain/HiveDrainMainWindow.Designer.cs
r9694 r12823 1 namespace H iveDrain {1 namespace HeuristicLab.HiveDrain { 2 2 partial class HiveDrainMainWindow { 3 3 /// <summary> … … 29 29 this.downloadButton = new System.Windows.Forms.Button(); 30 30 this.logView = new HeuristicLab.Core.Views.LogView(); 31 this.oneFileCheckBox = new System.Windows.Forms.CheckBox(); 31 32 this.SuspendLayout(); 32 33 // … … 73 74 this.logView.TabIndex = 4; 74 75 // 76 // oneFileCheckBox 77 // 78 this.oneFileCheckBox.AutoSize = true; 79 this.oneFileCheckBox.Location = new System.Drawing.Point(15, 44); 80 this.oneFileCheckBox.Name = "oneFileCheckBox"; 81 this.oneFileCheckBox.Size = new System.Drawing.Size(102, 17); 82 this.oneFileCheckBox.TabIndex = 5; 83 this.oneFileCheckBox.Text = "Save as one file"; 84 this.oneFileCheckBox.UseVisualStyleBackColor = true; 85 // 75 86 // HiveDrainMainWindow 76 87 // … … 78 89 this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 79 90 this.ClientSize = new System.Drawing.Size(842, 447); 91 this.Controls.Add(this.oneFileCheckBox); 80 92 this.Controls.Add(this.logView); 81 93 this.Controls.Add(this.downloadButton); … … 97 109 private System.Windows.Forms.Button downloadButton; 98 110 private HeuristicLab.Core.Views.LogView logView; 111 private System.Windows.Forms.CheckBox oneFileCheckBox; 99 112 } 100 113 } -
branches/HeuristicLab.Tools/HeuristicLab.HiveDrain/HeuristicLab.HiveDrain/HiveDrainMainWindow.cs
r9694 r12823 5 5 using HeuristicLab.Core; 6 6 7 namespace H iveDrain {7 namespace HeuristicLab.HiveDrain { 8 8 public partial class HiveDrainMainWindow : Form { 9 9 public HiveDrainMainWindow() { … … 29 29 downloadButton.Enabled = false; 30 30 31 JobDownloader jobDownloader = new JobDownloader(Environment.CurrentDirectory, pattern, Log );31 JobDownloader jobDownloader = new JobDownloader(Environment.CurrentDirectory, pattern, Log, oneFileCheckBox.Checked); 32 32 task = new Task(jobDownloader.Start); 33 33 task.ContinueWith(x => { Log.LogMessage("All tasks written, quitting."); EnableButton(); }, TaskContinuationOptions.OnlyOnRanToCompletion); -
branches/HeuristicLab.Tools/HeuristicLab.HiveDrain/HeuristicLab.HiveDrain/JobDownloader.cs
r9694 r12823 1 using System; 1 #region License Information 2 /* HeuristicLab 3 * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 * 5 * This file is part of HeuristicLab. 6 * 7 * HeuristicLab is free software: you can redistribute it and/or modify 8 * it under the terms of the GNU General Public License as published by 9 * the Free Software Foundation, either version 3 of the License, or 10 * (at your option) any later version. 11 * 12 * HeuristicLab is distributed in the hope that it will be useful, 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 * GNU General Public License for more details. 16 * 17 * You should have received a copy of the GNU General Public License 18 * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>. 19 */ 20 #endregion 21 22 using System; 2 23 using System.Collections.Generic; 3 24 using System.IO; … … 6 27 using HeuristicLab.Core; 7 28 8 9 namespace HiveDrain { 29 namespace HeuristicLab.HiveDrain { 10 30 /// <summary> 11 31 /// Retrieves all jobs and starts downloading their tasks 12 32 /// </summary> 13 class JobDownloader {33 public class JobDownloader { 14 34 public string RootLocation { get; set; } 15 35 16 36 public string NamePattern { get; set; } 17 37 38 public bool OneFile { get; set; } 39 18 40 private ILog log; 19 41 20 public JobDownloader(string location, string pattern, ILog log ) {42 public JobDownloader(string location, string pattern, ILog log, bool oneFile = false) { 21 43 RootLocation = location; 22 44 NamePattern = pattern; 23 45 this.log = log; 46 OneFile = oneFile; 24 47 } 25 48 … … 34 57 log.LogMessage(String.Format("\"{0}\": {1}", j.Name, j.Id)); 35 58 36 JobTaskDownloader taskDownloader = new JobTaskDownloader(jobPath, j, limitSemaphore, log); 37 taskDownloader.Start(); 59 if (OneFile) { 60 JobTaskOneFileDownloader taskDownloader = new JobTaskOneFileDownloader(jobPath, j, limitSemaphore, log); 61 taskDownloader.Start(); 62 } else { 63 JobTaskDownloader taskDownloader = new JobTaskDownloader(jobPath, j, limitSemaphore, log); 64 taskDownloader.Start(); 65 } 38 66 } else { 39 67 log.LogMessage(String.Format("\"{0}\": {1} ---> ignored", j.Name, j.Id)); -
branches/HeuristicLab.Tools/HeuristicLab.HiveDrain/HeuristicLab.HiveDrain/JobTaskDownloader.cs
r12538 r12823 1 using System; 1 #region License Information 2 /* HeuristicLab 3 * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 * 5 * This file is part of HeuristicLab. 6 * 7 * HeuristicLab is free software: you can redistribute it and/or modify 8 * it under the terms of the GNU General Public License as published by 9 * the Free Software Foundation, either version 3 of the License, or 10 * (at your option) any later version. 11 * 12 * HeuristicLab is distributed in the hope that it will be useful, 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 * GNU General Public License for more details. 16 * 17 * You should have received a copy of the GNU General Public License 18 * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>. 19 */ 20 #endregion 21 22 using System; 2 23 using System.Collections.Generic; 3 24 using System.IO; … … 8 29 using HeuristicLab.Core; 9 30 10 namespace H iveDrain {31 namespace HeuristicLab.HiveDrain { 11 32 /// <summary> 12 33 /// downloads all finished tasks for a job 13 34 /// </summary> 14 class JobTaskDownloader {35 public class JobTaskDownloader { 15 36 public String RootLocation { get; set; } 16 37 public Job ParentJob { get; set; } -
branches/HeuristicLab.Tools/HeuristicLab.HiveDrain/HeuristicLab.HiveDrain/Plugin.cs
r9694 r12823 1 using System.Windows.Forms; 1 #region License Information 2 /* HeuristicLab 3 * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 * 5 * This file is part of HeuristicLab. 6 * 7 * HeuristicLab is free software: you can redistribute it and/or modify 8 * it under the terms of the GNU General Public License as published by 9 * the Free Software Foundation, either version 3 of the License, or 10 * (at your option) any later version. 11 * 12 * HeuristicLab is distributed in the hope that it will be useful, 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 * GNU General Public License for more details. 16 * 17 * You should have received a copy of the GNU General Public License 18 * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>. 19 */ 20 #endregion 21 22 using System.Windows.Forms; 2 23 using HeuristicLab.PluginInfrastructure; 3 24 4 namespace H iveDrain {25 namespace HeuristicLab.HiveDrain { 5 26 // Hive Drain HeuristicLab Application, based on the original code of apetrei's Hive Drain Console Application 6 27 [Plugin("HeuristicLab.HiveDrain", "1.0.0.0")] -
branches/HeuristicLab.Tools/HeuristicLab.HiveDrain/HeuristicLab.HiveDrain/TaskSerializer.cs
r9694 r12823 1 using System; 1 #region License Information 2 /* HeuristicLab 3 * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 * 5 * This file is part of HeuristicLab. 6 * 7 * HeuristicLab is free software: you can redistribute it and/or modify 8 * it under the terms of the GNU General Public License as published by 9 * the Free Software Foundation, either version 3 of the License, or 10 * (at your option) any later version. 11 * 12 * HeuristicLab is distributed in the hope that it will be useful, 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 * GNU General Public License for more details. 16 * 17 * You should have received a copy of the GNU General Public License 18 * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>. 19 */ 20 #endregion 21 22 using System; 2 23 using HeuristicLab.Common; 3 24 4 5 namespace HiveDrain { 25 namespace HeuristicLab.HiveDrain { 6 26 static class TaskSerializer { 7 27 public static void Serialize(SerializerTask serializerTask) {
Note: See TracChangeset
for help on using the changeset viewer.