- Timestamp:
- 02/16/17 15:16:55 (8 years ago)
- Location:
- branches/OptimizationNetworks/HeuristicLab.Problems.VehicleRouting.Views/3.4
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/OptimizationNetworks/HeuristicLab.Problems.VehicleRouting.Views/3.4/VRPSolutionView.Designer.cs
r14185 r14677 51 51 this.tourGroupBox = new System.Windows.Forms.GroupBox(); 52 52 this.valueTextBox = new System.Windows.Forms.TextBox(); 53 this.tabPage3 = new System.Windows.Forms.TabPage(); 54 this.resultsTextBox = new System.Windows.Forms.TextBox(); 53 55 this.tabControl1.SuspendLayout(); 54 56 this.tabPage1.SuspendLayout(); 55 57 this.tabPage2.SuspendLayout(); 56 58 this.tourGroupBox.SuspendLayout(); 59 this.tabPage3.SuspendLayout(); 57 60 this.SuspendLayout(); 58 61 // 59 62 // tabControl1 60 63 // 64 this.tabControl1.AllowDrop = true; 61 65 this.tabControl1.Controls.Add(this.tabPage1); 62 66 this.tabControl1.Controls.Add(this.tabPage2); 67 this.tabControl1.Controls.Add(this.tabPage3); 63 68 this.tabControl1.Dock = System.Windows.Forms.DockStyle.Fill; 64 69 this.tabControl1.Location = new System.Drawing.Point(0, 0); … … 84 89 this.problemInstanceView.Content = null; 85 90 this.problemInstanceView.Dock = System.Windows.Forms.DockStyle.Fill; 91 this.problemInstanceView.Enabled = false; 86 92 this.problemInstanceView.Location = new System.Drawing.Point(3, 3); 87 93 this.problemInstanceView.Name = "problemInstanceView"; … … 89 95 this.problemInstanceView.Size = new System.Drawing.Size(454, 383); 90 96 this.problemInstanceView.TabIndex = 0; 97 this.problemInstanceView.ViewsLabelVisible = true; 91 98 this.problemInstanceView.ViewType = null; 92 99 // … … 119 126 this.valueTextBox.Multiline = true; 120 127 this.valueTextBox.Name = "valueTextBox"; 121 this.valueTextBox.Size = new System.Drawing.Size(403, 507); 128 this.valueTextBox.ReadOnly = true; 129 this.valueTextBox.Size = new System.Drawing.Size(448, 364); 122 130 this.valueTextBox.TabIndex = 0; 123 this.valueTextBox.ReadOnly = true; 131 // 132 // tabPage3 133 // 134 this.tabPage3.Controls.Add(this.resultsTextBox); 135 this.tabPage3.Location = new System.Drawing.Point(4, 22); 136 this.tabPage3.Name = "tabPage3"; 137 this.tabPage3.Padding = new System.Windows.Forms.Padding(3); 138 this.tabPage3.Size = new System.Drawing.Size(460, 389); 139 this.tabPage3.TabIndex = 2; 140 this.tabPage3.Text = "Results"; 141 this.tabPage3.UseVisualStyleBackColor = true; 142 // 143 // resultsTextBox 144 // 145 this.resultsTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 146 | System.Windows.Forms.AnchorStyles.Left) 147 | System.Windows.Forms.AnchorStyles.Right))); 148 this.resultsTextBox.Location = new System.Drawing.Point(6, 6); 149 this.resultsTextBox.Multiline = true; 150 this.resultsTextBox.Name = "resultsTextBox"; 151 this.resultsTextBox.ReadOnly = true; 152 this.resultsTextBox.ScrollBars = System.Windows.Forms.ScrollBars.Vertical; 153 this.resultsTextBox.Size = new System.Drawing.Size(448, 377); 154 this.resultsTextBox.TabIndex = 0; 124 155 // 125 156 // VRPSolutionView 126 157 // 127 this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);128 158 this.Controls.Add(this.tabControl1); 129 159 this.Name = "VRPSolutionView"; … … 133 163 this.tabPage2.ResumeLayout(false); 134 164 this.tourGroupBox.ResumeLayout(false); 165 this.tourGroupBox.PerformLayout(); 166 this.tabPage3.ResumeLayout(false); 167 this.tabPage3.PerformLayout(); 135 168 this.ResumeLayout(false); 136 169 … … 145 178 private System.Windows.Forms.GroupBox tourGroupBox; 146 179 private System.Windows.Forms.TextBox valueTextBox; 180 private System.Windows.Forms.TabPage tabPage3; 181 private System.Windows.Forms.TextBox resultsTextBox; 147 182 } 148 183 } -
branches/OptimizationNetworks/HeuristicLab.Problems.VehicleRouting.Views/3.4/VRPSolutionView.cs
r14185 r14677 21 21 22 22 using System; 23 using System.Linq; 23 24 using System.Text; 24 25 using System.Windows.Forms; … … 58 59 59 60 UpdateTourView(); 61 UpdateResultsView(); 60 62 } 61 63 … … 89 91 90 92 private void UpdateTourView() { 91 StringBuilder sb = new StringBuilder();93 var sb = new StringBuilder(); 92 94 93 95 if (Content != null && Content.Solution != null) { 94 foreach ( Tour tour in Content.Solution.GetTours()) {95 foreach ( intcity in tour.Stops) {96 foreach (var tour in Content.Solution.GetTours()) { 97 foreach (var city in tour.Stops) { 96 98 sb.Append(city); 97 99 sb.Append(" "); … … 103 105 valueTextBox.Text = sb.ToString(); 104 106 } 107 108 private void UpdateResultsView() { 109 var builder = new StringBuilder(); 110 if (Content != null && Content.Solution != null) { 111 var evaluationInfo = Content.ProblemInstance.Evaluate(Content.Solution); 112 evaluationInfo.GetReport(builder); 113 } 114 resultsTextBox.Text = builder.ToString(); 115 } 105 116 } 106 117 }
Note: See TracChangeset
for help on using the changeset viewer.