- Timestamp:
- 12/06/17 11:08:20 (7 years ago)
- Location:
- trunk/tools/HeuristicLab.HiveDrain/HeuristicLab.HiveDrain
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tools/HeuristicLab.HiveDrain/HeuristicLab.HiveDrain/HeuristicLab.HiveDrain.csproj
r15342 r15494 53 53 <SpecificVersion>False</SpecificVersion> 54 54 <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.MainForm.WindowsForms-3.3.dll</HintPath> 55 <Private>False</Private> 56 </Reference> 57 <Reference Include="HeuristicLab.Problems.DataAnalysis-3.4, Version=3.4.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL"> 58 <SpecificVersion>False</SpecificVersion> 59 <HintPath>..\..\..\sources\bin\HeuristicLab.Problems.DataAnalysis-3.4.dll</HintPath> 55 60 <Private>False</Private> 56 61 </Reference> -
trunk/tools/HeuristicLab.HiveDrain/HeuristicLab.HiveDrain/HiveDrainMainWindow.Designer.cs
r15342 r15494 30 30 this.logView = new HeuristicLab.Core.Views.LogView(); 31 31 this.oneFileCheckBox = new System.Windows.Forms.CheckBox(); 32 this.label2 = new System.Windows.Forms.Label(); 33 this.outputDirectoryTextBox = new System.Windows.Forms.TextBox(); 34 this.browseOutputPathButton = new System.Windows.Forms.Button(); 35 this.listJobsButton = new System.Windows.Forms.Button(); 32 36 this.SuspendLayout(); 33 37 // … … 53 57 // 54 58 this.downloadButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); 55 this.downloadButton.Location = new System.Drawing.Point( 698, 38);59 this.downloadButton.Location = new System.Drawing.Point(753, 82); 56 60 this.downloadButton.Name = "downloadButton"; 57 this.downloadButton.Size = new System.Drawing.Size( 132, 23);61 this.downloadButton.Size = new System.Drawing.Size(77, 23); 58 62 this.downloadButton.TabIndex = 3; 59 63 this.downloadButton.Text = "Download"; … … 68 72 this.logView.Caption = "Log View"; 69 73 this.logView.Content = null; 70 this.logView.Location = new System.Drawing.Point(15, 67);74 this.logView.Location = new System.Drawing.Point(15, 110); 71 75 this.logView.Name = "logView"; 72 76 this.logView.ReadOnly = false; 73 this.logView.Size = new System.Drawing.Size(815, 3 68);77 this.logView.Size = new System.Drawing.Size(815, 325); 74 78 this.logView.TabIndex = 4; 75 79 // … … 79 83 this.oneFileCheckBox.Checked = true; 80 84 this.oneFileCheckBox.CheckState = System.Windows.Forms.CheckState.Checked; 81 this.oneFileCheckBox.Location = new System.Drawing.Point(15, 44);85 this.oneFileCheckBox.Location = new System.Drawing.Point(15, 88); 82 86 this.oneFileCheckBox.Name = "oneFileCheckBox"; 83 87 this.oneFileCheckBox.Size = new System.Drawing.Size(102, 17); … … 86 90 this.oneFileCheckBox.UseVisualStyleBackColor = true; 87 91 // 92 // label2 93 // 94 this.label2.AutoSize = true; 95 this.label2.Location = new System.Drawing.Point(15, 44); 96 this.label2.Name = "label2"; 97 this.label2.Size = new System.Drawing.Size(85, 13); 98 this.label2.TabIndex = 6; 99 this.label2.Text = "Output directory:"; 100 // 101 // outputDirectoryTextBox 102 // 103 this.outputDirectoryTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 104 | System.Windows.Forms.AnchorStyles.Right))); 105 this.outputDirectoryTextBox.Location = new System.Drawing.Point(152, 38); 106 this.outputDirectoryTextBox.Name = "outputDirectoryTextBox"; 107 this.outputDirectoryTextBox.Size = new System.Drawing.Size(595, 20); 108 this.outputDirectoryTextBox.TabIndex = 7; 109 // 110 // browseOutputPathButton 111 // 112 this.browseOutputPathButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); 113 this.browseOutputPathButton.Location = new System.Drawing.Point(753, 37); 114 this.browseOutputPathButton.Name = "browseOutputPathButton"; 115 this.browseOutputPathButton.Size = new System.Drawing.Size(75, 22); 116 this.browseOutputPathButton.TabIndex = 8; 117 this.browseOutputPathButton.Text = "Browse"; 118 this.browseOutputPathButton.UseVisualStyleBackColor = true; 119 this.browseOutputPathButton.Click += new System.EventHandler(this.browseOutputPathButton_Click); 120 // 121 // listJobsButton 122 // 123 this.listJobsButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); 124 this.listJobsButton.Location = new System.Drawing.Point(670, 82); 125 this.listJobsButton.Name = "listJobsButton"; 126 this.listJobsButton.Size = new System.Drawing.Size(77, 23); 127 this.listJobsButton.TabIndex = 9; 128 this.listJobsButton.Text = "List Jobs"; 129 this.listJobsButton.UseVisualStyleBackColor = true; 130 this.listJobsButton.Click += new System.EventHandler(this.listJobsButton_Click); 131 // 88 132 // HiveDrainMainWindow 89 133 // … … 91 135 this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 92 136 this.ClientSize = new System.Drawing.Size(842, 447); 137 this.Controls.Add(this.listJobsButton); 138 this.Controls.Add(this.browseOutputPathButton); 139 this.Controls.Add(this.outputDirectoryTextBox); 140 this.Controls.Add(this.label2); 93 141 this.Controls.Add(this.oneFileCheckBox); 94 142 this.Controls.Add(this.logView); … … 112 160 private HeuristicLab.Core.Views.LogView logView; 113 161 private System.Windows.Forms.CheckBox oneFileCheckBox; 162 private System.Windows.Forms.Label label2; 163 private System.Windows.Forms.TextBox outputDirectoryTextBox; 164 private System.Windows.Forms.Button browseOutputPathButton; 165 private System.Windows.Forms.Button listJobsButton; 114 166 } 115 167 } -
trunk/tools/HeuristicLab.HiveDrain/HeuristicLab.HiveDrain/HiveDrainMainWindow.cs
r15346 r15494 32 32 downloadButton.Enabled = false; 33 33 34 JobDownloader jobDownloader = new JobDownloader(Environment.CurrentDirectory, pattern, Log, oneFileCheckBox.Checked); 34 var directory = outputDirectoryTextBox.Text; 35 36 if (string.IsNullOrEmpty(directory)) 37 directory = Environment.CurrentDirectory; 38 39 JobDownloader jobDownloader = new JobDownloader(directory, pattern, Log, oneFileCheckBox.Checked); 35 40 task = new System.Threading.Tasks.Task(jobDownloader.Start); 36 41 task.ContinueWith(x => { Log.LogMessage("All tasks written, quitting."); EnableButton(); }, TaskContinuationOptions.OnlyOnRanToCompletion); … … 52 57 } 53 58 } 59 60 private void browseOutputPathButton_Click(object sender, EventArgs e) { 61 var path = string.Empty; 62 63 var dialog = new FolderBrowserDialog { 64 RootFolder = Environment.SpecialFolder.MyComputer 65 }; 66 67 if (dialog.ShowDialog() == DialogResult.OK) { 68 path = dialog.SelectedPath; 69 } 70 71 if (!string.IsNullOrEmpty(path)) 72 outputDirectoryTextBox.Text = path; 73 } 74 75 private void listJobsButton_Click(object sender, EventArgs e) { 76 ListHiveJobs(); 77 } 54 78 } 55 79 } -
trunk/tools/HeuristicLab.HiveDrain/HeuristicLab.HiveDrain/JobTaskOneFileDownloader.cs
r15350 r15494 29 29 using HeuristicLab.Core; 30 30 using HeuristicLab.Optimization; 31 using HeuristicLab.Problems.DataAnalysis; 31 32 32 33 namespace HeuristicLab.HiveDrain { … … 70 71 71 72 var allTasks = HiveServiceLocator.Instance.CallHiveService(s => s.GetLightweightJobTasksWithoutStateLog(ParentJob.Id)); 72 var totalJobCount = allTasks.Count ();73 var totalJobCount = allTasks.Count; 73 74 var optimizers = new List<IOptimizer>(); 74 75 var finishedCount = -1; … … 114 115 } 115 116 if (storable != null) { 117 // remove duplicate datasets 118 log.LogMessage("Removing duplicate datasets..."); 119 DatasetUtil.RemoveDuplicateDatasets(storable); 120 116 121 log.LogMessage(string.Format("Save job as {0}", RootLocation)); 117 122 ContentManager.Save(storable, RootLocation, true);
Note: See TracChangeset
for help on using the changeset viewer.