Changeset 4349
- Timestamp:
- 08/31/10 14:51:43 (14 years ago)
- Location:
- branches/VRP/HeuristicLab.Problems.VehicleRouting.Views/3.3
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/VRP/HeuristicLab.Problems.VehicleRouting.Views/3.3/VRPSolutionView.Designer.cs
r4185 r4349 50 50 this.valueTabPage = new System.Windows.Forms.TabPage(); 51 51 this.tourGroupBox = new System.Windows.Forms.GroupBox(); 52 this.tour ViewHost = new HeuristicLab.MainForm.WindowsForms.ViewHost();52 this.tourGridView = new System.Windows.Forms.DataGridView(); 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(); 58 59 this.SuspendLayout(); 59 60 // … … 100 101 this.valueTabPage.Name = "valueTabPage"; 101 102 this.valueTabPage.Padding = new System.Windows.Forms.Padding(3); 102 this.valueTabPage.Size = new System.Drawing.Size(415, 398);103 this.valueTabPage.Size = new System.Drawing.Size(415, 532); 103 104 this.valueTabPage.TabIndex = 1; 104 105 this.valueTabPage.Text = "Value"; … … 107 108 // tourGroupBox 108 109 // 109 this.tourGroupBox.Controls.Add(this.tour ViewHost);110 this.tourGroupBox.Controls.Add(this.tourGridView); 110 111 this.tourGroupBox.Dock = System.Windows.Forms.DockStyle.Fill; 111 112 this.tourGroupBox.Location = new System.Drawing.Point(3, 3); 112 113 this.tourGroupBox.Name = "tourGroupBox"; 113 this.tourGroupBox.Size = new System.Drawing.Size(409, 392);114 this.tourGroupBox.Size = new System.Drawing.Size(409, 526); 114 115 this.tourGroupBox.TabIndex = 0; 115 116 this.tourGroupBox.TabStop = false; 116 117 this.tourGroupBox.Text = "Tour"; 117 118 // 118 // tour ViewHost119 // tourGridView 119 120 // 120 this.tourViewHost.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 121 | System.Windows.Forms.AnchorStyles.Left) 122 | System.Windows.Forms.AnchorStyles.Right))); 123 this.tourViewHost.Caption = "View"; 124 this.tourViewHost.Content = null; 125 this.tourViewHost.Location = new System.Drawing.Point(6, 19); 126 this.tourViewHost.Name = "tourViewHost"; 127 this.tourViewHost.ReadOnly = false; 128 this.tourViewHost.Size = new System.Drawing.Size(397, 367); 129 this.tourViewHost.TabIndex = 0; 130 this.tourViewHost.ViewType = null; 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.Size = new System.Drawing.Size(403, 507); 126 this.tourGridView.TabIndex = 0; 131 127 // 132 128 // VRPSolutionView … … 142 138 this.valueTabPage.ResumeLayout(false); 143 139 this.tourGroupBox.ResumeLayout(false); 140 ((System.ComponentModel.ISupportInitialize)(this.tourGridView)).EndInit(); 144 141 this.ResumeLayout(false); 145 142 … … 153 150 private System.Windows.Forms.TabPage valueTabPage; 154 151 private System.Windows.Forms.GroupBox tourGroupBox; 155 private MainForm.WindowsForms.ViewHost tourViewHost;152 private System.Windows.Forms.DataGridView tourGridView; 156 153 157 154 -
branches/VRP/HeuristicLab.Problems.VehicleRouting.Views/3.3/VRPSolutionView.cs
r4268 r4349 28 28 using HeuristicLab.Problems.VehicleRouting.Encodings; 29 29 using HeuristicLab.Parameters; 30 using System.Linq; 30 31 31 32 namespace HeuristicLab.Problems.VehicleRouting.Views { … … 68 69 } else { 69 70 GenerateImage(); 70 tourViewHost.Content = Content.Solution;71 UpdateTourView(); 71 72 } 72 73 } … … 81 82 pictureBox.Enabled = Content != null; 82 83 tourGroupBox.Enabled = Content != null; 84 } 85 86 private void UpdateTourView() { 87 tourGridView.Rows.Clear(); 88 tourGridView.ColumnCount = Content.Coordinates.Rows - 1; 89 90 if (Content != null && Content.Solution != null) { 91 foreach (Tour tour in Content.Solution.GetTours(new ValueLookupParameter<DoubleMatrix>("DistanceMatrix", Content.DistanceMatrix))) { 92 int row = tourGridView.Rows.Add(); 93 int cell = 0; 94 foreach (int city in tour.Cities) { 95 tourGridView.Rows[row].Cells[cell].Value = city; 96 cell++; 97 } 98 } 99 } 83 100 } 84 101 … … 203 220 else { 204 221 GenerateImage(); 205 tourViewHost.Content = Content.Solution;222 UpdateTourView(); 206 223 } 207 224 }
Note: See TracChangeset
for help on using the changeset viewer.