Changeset 14952 for branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problem.ProgramSynthesis.BenchmarkSuite/Views/DataEditorView.cs
- Timestamp:
- 05/10/17 11:23:05 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problem.ProgramSynthesis.BenchmarkSuite/Views/DataEditorView.cs
r14908 r14952 4 4 using System.Collections.Generic; 5 5 6 using HeuristicLab.BenchmarkSuite.Problems;7 6 using HeuristicLab.Core.Views; 8 7 using HeuristicLab.MainForm; … … 152 151 nameTextBox.Text = Content.Name; 153 152 154 var cellTemplate = new DataGridViewTextBoxCell ();153 var cellTemplate = new DataGridViewTextBoxCell { Style = { WrapMode = DataGridViewTriState.True } }; 155 154 156 155 for (var i = 0; i < Content.InputArgumentTypes.Length; i++) { … … 176 175 } 177 176 178 foreach (var example in Content.Examples) { 179 var row = new DataGridViewRow(); 180 row.HeaderCell.Value = row.Index + 1; 181 177 for (var rowIdx = 0; rowIdx < Content.Examples.Length; rowIdx++) { 178 var example = Content.Examples[rowIdx]; 179 var row = new DataGridViewRow { 180 HeaderCell = { 181 Value = (rowIdx + 1).ToString(), 182 } 183 }; 182 184 row.CreateCells(dataGridView); 183 185 186 var inputArgumentCountDict = ViewHelper.CreateArgumentCountDict(); 184 187 for (var i = 0; i < Content.InputArgumentTypes.Length; i++) { 185 row.Cells[i].Value = ViewHelper.StringifyInput(Content.InputArgumentTypes[i], example, ValueSeparator); 186 } 187 188 var type = Content.InputArgumentTypes[i]; 189 var offset = inputArgumentCountDict[type]; 190 row.Cells[i].Value = ViewHelper.StringifyInput(type, offset, example, ValueSeparator); 191 inputArgumentCountDict[type]++; 192 } 193 194 var outputArgumentCountDict = ViewHelper.CreateArgumentCountDict(); 188 195 for (var i = 0; i < Content.OutputArgumentTypes.Length; i++) { 189 row.Cells[Content.InputArgumentTypes.Length + i].Value = ViewHelper.StringifyOutput(Content.OutputArgumentTypes[i], example, ValueSeparator); 196 var type = Content.OutputArgumentTypes[i]; 197 var offset = outputArgumentCountDict[type]; 198 row.Cells[Content.InputArgumentTypes.Length + i].Value = ViewHelper.StringifyOutput(type, offset, example, ValueSeparator); 199 outputArgumentCountDict[type]++; 190 200 } 191 201
Note: See TracChangeset
for help on using the changeset viewer.