- Timestamp:
- 12/05/16 16:06:18 (7 years ago)
- Location:
- branches/MemPRAlgorithm/HeuristicLab.Problems.TravelingSalesman.Views/3.3
- Files:
-
- 1 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/MemPRAlgorithm/HeuristicLab.Problems.TravelingSalesman.Views/3.3/HeuristicLab.Problems.TravelingSalesman.Views-3.3.csproj
r11623 r14454 230 230 </ProjectReference> 231 231 </ItemGroup> 232 <ItemGroup> 233 <EmbeddedResource Include="TravelingSalesmanProblemView.resx"> 234 <DependentUpon>TravelingSalesmanProblemView.cs</DependentUpon> 235 </EmbeddedResource> 236 </ItemGroup> 232 237 <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> 233 238 <!-- To modify your build process, add your task inside one of the targets below and uncomment it. -
branches/MemPRAlgorithm/HeuristicLab.Problems.TravelingSalesman.Views/3.3/TravelingSalesmanProblemView.Designer.cs
r14185 r14454 45 45 this.visualizationTabPage = new System.Windows.Forms.TabPage(); 46 46 this.pathTSPTourView = new HeuristicLab.Problems.TravelingSalesman.Views.PathTSPTourView(); 47 this.updateDistanceMatrixButton = new System.Windows.Forms.Button(); 47 48 ((System.ComponentModel.ISupportInitialize)(this.problemInstanceSplitContainer)).BeginInit(); 48 49 this.problemInstanceSplitContainer.Panel1.SuspendLayout(); … … 60 61 // problemInstanceSplitContainer.Panel2 61 62 // 63 this.problemInstanceSplitContainer.Panel2.Controls.Add(this.updateDistanceMatrixButton); 62 64 this.problemInstanceSplitContainer.Panel2.Controls.Add(this.tabControl); 63 65 // … … 67 69 this.parameterCollectionView.Dock = System.Windows.Forms.DockStyle.Fill; 68 70 this.parameterCollectionView.Location = new System.Drawing.Point(3, 3); 69 this.parameterCollectionView.Size = new System.Drawing.Size(497, 2 74);71 this.parameterCollectionView.Size = new System.Drawing.Size(497, 245); 70 72 // 71 73 // nameTextBox … … 77 79 // 78 80 this.tabControl.AllowDrop = true; 79 this.tabControl.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 80 | System.Windows.Forms.AnchorStyles.Left)81 81 this.tabControl.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 82 | System.Windows.Forms.AnchorStyles.Left) 83 | System.Windows.Forms.AnchorStyles.Right))); 82 84 this.tabControl.Controls.Add(this.parametersTabPage); 83 85 this.tabControl.Controls.Add(this.visualizationTabPage); 84 this.tabControl.Location = new System.Drawing.Point(0, 27);86 this.tabControl.Location = new System.Drawing.Point(0, 56); 85 87 this.tabControl.Name = "tabControl"; 86 88 this.tabControl.SelectedIndex = 0; 87 this.tabControl.Size = new System.Drawing.Size(511, 306);89 this.tabControl.Size = new System.Drawing.Size(511, 277); 88 90 this.tabControl.TabIndex = 4; 89 91 // … … 94 96 this.parametersTabPage.Name = "parametersTabPage"; 95 97 this.parametersTabPage.Padding = new System.Windows.Forms.Padding(3); 96 this.parametersTabPage.Size = new System.Drawing.Size(503, 2 80);98 this.parametersTabPage.Size = new System.Drawing.Size(503, 251); 97 99 this.parametersTabPage.TabIndex = 0; 98 100 this.parametersTabPage.Text = "Parameters"; … … 112 114 // pathTSPTourView 113 115 // 114 this.pathTSPTourView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 115 | System.Windows.Forms.AnchorStyles.Left)116 116 this.pathTSPTourView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 117 | System.Windows.Forms.AnchorStyles.Left) 118 | System.Windows.Forms.AnchorStyles.Right))); 117 119 this.pathTSPTourView.Caption = "PathTSPTour View"; 118 120 this.pathTSPTourView.Content = null; … … 123 125 this.pathTSPTourView.TabIndex = 0; 124 126 // 127 // updateDistanceMatrixButton 128 // 129 this.updateDistanceMatrixButton.Location = new System.Drawing.Point(3, 27); 130 this.updateDistanceMatrixButton.Name = "updateDistanceMatrixButton"; 131 this.updateDistanceMatrixButton.Size = new System.Drawing.Size(133, 23); 132 this.updateDistanceMatrixButton.TabIndex = 5; 133 this.updateDistanceMatrixButton.Text = "Update Distance Matrix"; 134 this.updateDistanceMatrixButton.UseVisualStyleBackColor = true; 135 this.updateDistanceMatrixButton.Click += new System.EventHandler(this.updateDistanceMatrixButton_Click); 136 // 125 137 // TravelingSalesmanProblemView 126 138 // 127 this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);128 139 this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Inherit; 129 140 this.Name = "TravelingSalesmanProblemView"; … … 148 159 private System.Windows.Forms.TabPage visualizationTabPage; 149 160 private PathTSPTourView pathTSPTourView; 161 private System.Windows.Forms.Button updateDistanceMatrixButton; 150 162 } 151 163 } -
branches/MemPRAlgorithm/HeuristicLab.Problems.TravelingSalesman.Views/3.3/TravelingSalesmanProblemView.cs
r14185 r14454 22 22 using System; 23 23 using System.Windows.Forms; 24 using HeuristicLab.Data; 24 25 using HeuristicLab.MainForm; 25 26 using HeuristicLab.Optimization.Views; … … 46 47 protected override void DeregisterContentEvents() { 47 48 Content.CoordinatesParameter.ValueChanged -= new EventHandler(CoordinatesParameter_ValueChanged); 48 Content.BestKnownQualityParameter.ValueChanged -= new EventHandler(BestKnownQualityParameter_ValueChanged);49 //Content.BestKnownQualityParameter.ValueChanged -= new EventHandler(BestKnownQualityParameter_ValueChanged); 49 50 Content.BestKnownSolutionParameter.ValueChanged -= new EventHandler(BestKnownSolutionParameter_ValueChanged); 50 51 base.DeregisterContentEvents(); … … 53 54 base.RegisterContentEvents(); 54 55 Content.CoordinatesParameter.ValueChanged += new EventHandler(CoordinatesParameter_ValueChanged); 55 Content.BestKnownQualityParameter.ValueChanged += new EventHandler(BestKnownQualityParameter_ValueChanged);56 //Content.BestKnownQualityParameter.ValueChanged += new EventHandler(BestKnownQualityParameter_ValueChanged); 56 57 Content.BestKnownSolutionParameter.ValueChanged += new EventHandler(BestKnownSolutionParameter_ValueChanged); 57 58 } … … 62 63 pathTSPTourView.Content = null; 63 64 } else { 64 pathTSPTourView.Content = new PathTSPTour(Content.Coordinates, Content.BestKnownSolution, Content.BestKnownQuality);65 pathTSPTourView.Content = new PathTSPTour(Content.Coordinates, Content.BestKnownSolution, new DoubleValue(Content.BestKnownQuality)); 65 66 } 66 67 } … … 69 70 base.SetEnabledStateOfControls(); 70 71 pathTSPTourView.Enabled = Content != null; 72 updateDistanceMatrixButton.Enabled = Content != null && !ReadOnly && !Locked; 71 73 } 72 74 … … 75 77 } 76 78 private void BestKnownQualityParameter_ValueChanged(object sender, EventArgs e) { 77 pathTSPTourView.Content.Quality = Content.BestKnownQuality;79 pathTSPTourView.Content.Quality = new DoubleValue(Content.BestKnownQuality); 78 80 } 79 81 private void BestKnownSolutionParameter_ValueChanged(object sender, EventArgs e) { 80 82 pathTSPTourView.Content.Permutation = Content.BestKnownSolution; 81 83 } 84 85 private void updateDistanceMatrixButton_Click(object sender, EventArgs e) { 86 Content.UpdateDistanceMatrix(); 87 } 82 88 } 83 89 }
Note: See TracChangeset
for help on using the changeset viewer.