Changeset 6607 for branches/VRP/HeuristicLab.Problems.VehicleRouting.Views
- Timestamp:
- 07/28/11 14:16:21 (13 years ago)
- Location:
- branches/VRP/HeuristicLab.Problems.VehicleRouting.Views/3.4
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/VRP/HeuristicLab.Problems.VehicleRouting.Views/3.4/HeuristicLab.Problems.VehicleRouting.Views-3.4.csproj
r5867 r6607 197 197 <Name>HeuristicLab.MainForm-3.3</Name> 198 198 </ProjectReference> 199 <ProjectReference Include="..\..\HeuristicLab.Operators\3.3\HeuristicLab.Operators-3.3.csproj"> 200 <Project>{23DA7FF4-D5B8-41B6-AA96-F0561D24F3EE}</Project> 201 <Name>HeuristicLab.Operators-3.3</Name> 202 </ProjectReference> 199 203 <ProjectReference Include="..\..\HeuristicLab.Optimization.Views\3.3\HeuristicLab.Optimization.Views-3.3.csproj"> 200 204 <Project>{662B4B15-8F4D-4AE5-B3EB-D91C215F5AF2}</Project> -
branches/VRP/HeuristicLab.Problems.VehicleRouting.Views/3.4/VRPSolutionView.Designer.cs
r5867 r6607 29 29 this.tabPage2 = new System.Windows.Forms.TabPage(); 30 30 this.tourGroupBox = new System.Windows.Forms.GroupBox(); 31 this. tourGridView = new System.Windows.Forms.DataGridView();31 this.valueTextBox = new System.Windows.Forms.TextBox(); 32 32 this.tabControl1.SuspendLayout(); 33 33 this.tabPage1.SuspendLayout(); 34 34 this.tabPage2.SuspendLayout(); 35 35 this.tourGroupBox.SuspendLayout(); 36 ((System.ComponentModel.ISupportInitialize)(this.tourGridView)).BeginInit();37 36 this.SuspendLayout(); 38 37 // … … 84 83 // tourGroupBox 85 84 // 86 this.tourGroupBox.Controls.Add(this. tourGridView);85 this.tourGroupBox.Controls.Add(this.valueTextBox); 87 86 this.tourGroupBox.Dock = System.Windows.Forms.DockStyle.Fill; 88 87 this.tourGroupBox.Location = new System.Drawing.Point(3, 3); … … 93 92 this.tourGroupBox.Text = "Tour"; 94 93 // 95 // tourGridView94 // valueTextBox 96 95 // 97 this. tourGridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;98 this. tourGridView.Dock = System.Windows.Forms.DockStyle.Fill;99 this. tourGridView.Location = new System.Drawing.Point(3, 16);100 this. tourGridView.Name = "tourGridView";101 this. tourGridView.Size = new System.Drawing.Size(448, 364);102 this. tourGridView.TabIndex = 0;96 this.valueTextBox.Dock = System.Windows.Forms.DockStyle.Fill; 97 this.valueTextBox.Location = new System.Drawing.Point(3, 16); 98 this.valueTextBox.Multiline = true; 99 this.valueTextBox.Name = "valueTextBox"; 100 this.valueTextBox.Size = new System.Drawing.Size(403, 507); 101 this.valueTextBox.TabIndex = 0; 103 102 // 104 103 // VRPSolutionView … … 112 111 this.tabPage2.ResumeLayout(false); 113 112 this.tourGroupBox.ResumeLayout(false); 114 ((System.ComponentModel.ISupportInitialize)(this.tourGridView)).EndInit();115 113 this.ResumeLayout(false); 116 114 … … 124 122 private System.Windows.Forms.TabPage tabPage2; 125 123 private System.Windows.Forms.GroupBox tourGroupBox; 126 private System.Windows.Forms. DataGridView tourGridView;124 private System.Windows.Forms.TextBox valueTextBox; 127 125 } 128 126 } -
branches/VRP/HeuristicLab.Problems.VehicleRouting.Views/3.4/VRPSolutionView.cs
r4374 r6607 32 32 namespace HeuristicLab.Problems.VehicleRouting.Views { 33 33 [View("VRPSolution View")] 34 [Content(typeof(VRPSolution), true)] 35 public partial class VRPSolutionView 34 [Content(typeof(VRPSolution), true)] 35 public partial class VRPSolutionView: HeuristicLab.Core.Views.ItemView { 36 36 public new VRPSolution Content { 37 37 get { return (VRPSolution)base.Content; } 38 38 set { base.Content = value; } 39 } 39 } 40 40 41 41 public VRPSolutionView() { … … 91 91 92 92 private void UpdateTourView() { 93 tourGridView.Rows.Clear(); 94 tourGridView.ColumnCount = Content.ProblemInstance.Coordinates.Rows - 1; 93 StringBuilder sb = new StringBuilder(); 95 94 96 95 if (Content != null && Content.Solution != null) { 97 96 foreach (Tour tour in Content.Solution.GetTours()) { 98 int row = tourGridView.Rows.Add();99 int cell = 0;100 97 foreach (int city in tour.Stops) { 101 tourGridView.Rows[row].Cells[cell].Value = city;102 cell++;98 sb.Append(city); 99 sb.Append(" "); 103 100 } 101 sb.AppendLine(); 104 102 } 105 103 } 104 105 valueTextBox.Text = sb.ToString(); 106 106 } 107 107 }
Note: See TracChangeset
for help on using the changeset viewer.