Changeset 6447
- Timestamp:
- 06/20/11 13:31:50 (13 years ago)
- Location:
- trunk/sources/HeuristicLab.Problems.VehicleRouting.Views/3.3
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Problems.VehicleRouting.Views/3.3/VRPSolutionView.Designer.cs
r5466 r6447 50 50 this.valueTabPage = new System.Windows.Forms.TabPage(); 51 51 this.tourGroupBox = new System.Windows.Forms.GroupBox(); 52 this. tourGridView = new System.Windows.Forms.DataGridView();52 this.valueTextBox = new System.Windows.Forms.TextBox(); 53 53 this.tabControl.SuspendLayout(); 54 54 this.visualizationTabPage.SuspendLayout(); … … 56 56 this.valueTabPage.SuspendLayout(); 57 57 this.tourGroupBox.SuspendLayout(); 58 ((System.ComponentModel.ISupportInitialize)(this.tourGridView)).BeginInit();59 58 this.SuspendLayout(); 60 59 // 61 60 // tabControl 62 61 // 62 this.tabControl.AllowDrop = true; 63 63 this.tabControl.Controls.Add(this.visualizationTabPage); 64 64 this.tabControl.Controls.Add(this.valueTabPage); … … 83 83 // pictureBox 84 84 // 85 this.pictureBox.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 86 | System.Windows.Forms.AnchorStyles.Left)87 85 this.pictureBox.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 86 | System.Windows.Forms.AnchorStyles.Left) 87 | System.Windows.Forms.AnchorStyles.Right))); 88 88 this.pictureBox.BackColor = System.Drawing.Color.White; 89 89 this.pictureBox.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; … … 108 108 // tourGroupBox 109 109 // 110 this.tourGroupBox.Controls.Add(this. tourGridView);110 this.tourGroupBox.Controls.Add(this.valueTextBox); 111 111 this.tourGroupBox.Dock = System.Windows.Forms.DockStyle.Fill; 112 112 this.tourGroupBox.Location = new System.Drawing.Point(3, 3); … … 117 117 this.tourGroupBox.Text = "Tour"; 118 118 // 119 // tourGridView119 // valueTextBox 120 120 // 121 this.tourGridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; 122 this.tourGridView.Dock = System.Windows.Forms.DockStyle.Fill; 123 this.tourGridView.Location = new System.Drawing.Point(3, 16); 124 this.tourGridView.Name = "tourGridView"; 125 this.tourGridView.ReadOnly = true; 126 this.tourGridView.Size = new System.Drawing.Size(403, 507); 127 this.tourGridView.TabIndex = 0; 121 this.valueTextBox.Dock = System.Windows.Forms.DockStyle.Fill; 122 this.valueTextBox.Location = new System.Drawing.Point(3, 16); 123 this.valueTextBox.Multiline = true; 124 this.valueTextBox.Name = "valueTextBox"; 125 this.valueTextBox.Size = new System.Drawing.Size(403, 507); 126 this.valueTextBox.TabIndex = 0; 128 127 // 129 128 // VRPSolutionView … … 139 138 this.valueTabPage.ResumeLayout(false); 140 139 this.tourGroupBox.ResumeLayout(false); 141 ((System.ComponentModel.ISupportInitialize)(this.tourGridView)).EndInit();140 this.tourGroupBox.PerformLayout(); 142 141 this.ResumeLayout(false); 143 142 … … 151 150 private System.Windows.Forms.TabPage valueTabPage; 152 151 private System.Windows.Forms.GroupBox tourGroupBox; 153 private System.Windows.Forms. DataGridView tourGridView;152 private System.Windows.Forms.TextBox valueTextBox; 154 153 155 154 -
trunk/sources/HeuristicLab.Problems.VehicleRouting.Views/3.3/VRPSolutionView.cs
r5445 r6447 28 28 using HeuristicLab.Parameters; 29 29 using HeuristicLab.Problems.VehicleRouting.Encodings; 30 using System.Text; 30 31 31 32 namespace HeuristicLab.Problems.VehicleRouting.Views { … … 84 85 85 86 private void UpdateTourView() { 86 tourGridView.Rows.Clear(); 87 tourGridView.ColumnCount = Content.Coordinates.Rows - 1; 87 StringBuilder sb = new StringBuilder(); 88 88 89 89 if (Content != null && Content.Solution != null) { 90 90 foreach (Tour tour in Content.Solution.GetTours(new ValueLookupParameter<DoubleMatrix>("DistanceMatrix", Content.DistanceMatrix))) { 91 int row = tourGridView.Rows.Add();92 int cell = 0;93 91 foreach (int city in tour.Cities) { 94 tourGridView.Rows[row].Cells[cell].Value = city;95 cell++;92 sb.Append(city); 93 sb.Append(" "); 96 94 } 95 sb.AppendLine(); 97 96 } 98 97 } 98 99 valueTextBox.Text = sb.ToString(); 99 100 } 100 101
Note: See TracChangeset
for help on using the changeset viewer.