- Timestamp:
- 03/06/12 01:43:06 (12 years ago)
- Location:
- trunk/sources/HeuristicLab.Problems.TravelingSalesman.Views/3.3
- Files:
-
- 2 deleted
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Problems.TravelingSalesman.Views/3.3/HeuristicLab.Problems.TravelingSalesman.Views-3.3.csproj
r6866 r7558 128 128 <DependentUpon>TravelingSalesmanProblemView.cs</DependentUpon> 129 129 </Compile> 130 <Compile Include="TSPLIBImportDialog.cs">131 <SubType>Form</SubType>132 </Compile>133 <Compile Include="TSPLIBImportDialog.Designer.cs">134 <DependentUpon>TSPLIBImportDialog.cs</DependentUpon>135 </Compile>136 130 <Compile Include="Properties\AssemblyInfo.cs" /> 137 131 </ItemGroup> … … 147 141 <Private>False</Private> 148 142 </ProjectReference> 149 <ProjectReference Include="..\..\HeuristicLab.Common.Resources\3.3\HeuristicLab.Common.Resources-3.3.csproj">150 <Project>{0E27A536-1C4A-4624-A65E-DC4F4F23E3E1}</Project>151 <Name>HeuristicLab.Common.Resources-3.3</Name>152 <Private>False</Private>153 </ProjectReference>154 143 <ProjectReference Include="..\..\HeuristicLab.Common\3.3\HeuristicLab.Common-3.3.csproj"> 155 144 <Project>{A9AD58B9-3EF9-4CC1-97E5-8D909039FF5C}</Project> … … 206 195 <Name>HeuristicLab.PluginInfrastructure-3.3</Name> 207 196 <Private>False</Private> 197 </ProjectReference> 198 <ProjectReference Include="..\..\HeuristicLab.Problems.Instances\3.3\HeuristicLab.Problems.Instances-3.3.csproj"> 199 <Project>{3540E29E-4793-49E7-8EE2-FEA7F61C3994}</Project> 200 <Name>HeuristicLab.Problems.Instances-3.3</Name> 208 201 </ProjectReference> 209 202 <ProjectReference Include="..\..\HeuristicLab.Problems.TravelingSalesman\3.3\HeuristicLab.Problems.TravelingSalesman-3.3.csproj"> -
trunk/sources/HeuristicLab.Problems.TravelingSalesman.Views/3.3/Plugin.cs.frame
r7259 r7558 29 29 [PluginFile("HeuristicLab.Problems.TravelingSalesman.Views-3.3.dll", PluginFileType.Assembly)] 30 30 [PluginDependency("HeuristicLab.Common", "3.3")] 31 [PluginDependency("HeuristicLab.Common.Resources", "3.3")]32 31 [PluginDependency("HeuristicLab.Core", "3.3")] 33 32 [PluginDependency("HeuristicLab.Core.Views", "3.3")] … … 37 36 [PluginDependency("HeuristicLab.MainForm.WindowsForms", "3.3")] 38 37 [PluginDependency("HeuristicLab.Optimization", "3.3")] 38 [PluginDependency("HeuristicLab.Optimization.Views", "3.3")] 39 39 [PluginDependency("HeuristicLab.Parameters", "3.3")] 40 40 [PluginDependency("HeuristicLab.Problems.TravelingSalesman", "3.3")] -
trunk/sources/HeuristicLab.Problems.TravelingSalesman.Views/3.3/TravelingSalesmanProblemView.Designer.cs
r7259 r7558 27 27 private System.ComponentModel.IContainer components = null; 28 28 29 protected override void Dispose(bool disposing) { 30 if (disposing) { 31 if (components != null) components.Dispose(); 32 } 33 base.Dispose(disposing); 34 } 35 29 36 #region Component Designer generated code 30 37 … … 34 41 /// </summary> 35 42 private void InitializeComponent() { 36 this.importButton = new System.Windows.Forms.Button();37 43 this.tabControl = new HeuristicLab.MainForm.WindowsForms.DragOverTabControl(); 38 44 this.parametersTabPage = new System.Windows.Forms.TabPage(); 39 this.parameterCollectionView = new HeuristicLab.Core.Views.ParameterCollectionView();40 45 this.visualizationTabPage = new System.Windows.Forms.TabPage(); 41 46 this.pathTSPTourView = new HeuristicLab.Problems.TravelingSalesman.Views.PathTSPTourView(); … … 46 51 this.SuspendLayout(); 47 52 // 53 // problemInstanceProviderViewHost 54 // 55 this.problemInstanceProviderViewHost.Size = new System.Drawing.Size(270, 21); 56 // 57 // parameterCollectionView 58 // 59 this.parameterCollectionView.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left))); 60 this.parameterCollectionView.Dock = System.Windows.Forms.DockStyle.Fill; 61 this.parameterCollectionView.Location = new System.Drawing.Point(3, 3); 62 this.parameterCollectionView.Size = new System.Drawing.Size(515, 332); 63 // 48 64 // nameTextBox 49 65 // 50 66 this.errorProvider.SetIconAlignment(this.nameTextBox, System.Windows.Forms.ErrorIconAlignment.MiddleLeft); 51 67 this.errorProvider.SetIconPadding(this.nameTextBox, 2); 52 this.nameTextBox.Location = new System.Drawing.Point(58, 0); 53 this.nameTextBox.Size = new System.Drawing.Size(446, 20); 68 this.nameTextBox.Size = new System.Drawing.Size(454, 20); 54 69 // 55 70 // infoLabel 56 71 // 57 this.infoLabel.Location = new System.Drawing.Point(510, 3); 58 // 59 // importButton 60 // 61 this.importButton.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 62 | System.Windows.Forms.AnchorStyles.Right))); 63 this.importButton.Location = new System.Drawing.Point(0, 26); 64 this.importButton.Name = "importButton"; 65 this.importButton.Size = new System.Drawing.Size(529, 23); 66 this.importButton.TabIndex = 3; 67 this.importButton.Text = "&Import from TSPLIB"; 68 this.importButton.UseVisualStyleBackColor = true; 69 this.importButton.Click += new System.EventHandler(this.importButton_Click); 72 this.infoLabel.Location = new System.Drawing.Point(510, 35); 70 73 // 71 74 // tabControl 72 75 // 73 76 this.tabControl.AllowDrop = true; 74 this.tabControl.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 75 | System.Windows.Forms.AnchorStyles.Left)76 77 this.tabControl.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 78 | System.Windows.Forms.AnchorStyles.Left) 79 | System.Windows.Forms.AnchorStyles.Right))); 77 80 this.tabControl.Controls.Add(this.parametersTabPage); 78 81 this.tabControl.Controls.Add(this.visualizationTabPage); 79 this.tabControl.Location = new System.Drawing.Point(0, 5 5);82 this.tabControl.Location = new System.Drawing.Point(0, 58); 80 83 this.tabControl.Name = "tabControl"; 81 84 this.tabControl.SelectedIndex = 0; 82 this.tabControl.Size = new System.Drawing.Size(529, 36 7);85 this.tabControl.Size = new System.Drawing.Size(529, 364); 83 86 this.tabControl.TabIndex = 4; 84 87 // … … 89 92 this.parametersTabPage.Name = "parametersTabPage"; 90 93 this.parametersTabPage.Padding = new System.Windows.Forms.Padding(3); 91 this.parametersTabPage.Size = new System.Drawing.Size(521, 3 15);94 this.parametersTabPage.Size = new System.Drawing.Size(521, 338); 92 95 this.parametersTabPage.TabIndex = 0; 93 96 this.parametersTabPage.Text = "Parameters"; 94 97 this.parametersTabPage.UseVisualStyleBackColor = true; 95 //96 // parameterCollectionView97 //98 this.parameterCollectionView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)99 | System.Windows.Forms.AnchorStyles.Left)100 | System.Windows.Forms.AnchorStyles.Right)));101 this.parameterCollectionView.Caption = "ParameterCollection View";102 this.parameterCollectionView.Content = null;103 this.parameterCollectionView.Location = new System.Drawing.Point(6, 6);104 this.parameterCollectionView.Name = "parameterCollectionView";105 this.parameterCollectionView.ReadOnly = false;106 this.parameterCollectionView.Size = new System.Drawing.Size(509, 303);107 this.parameterCollectionView.TabIndex = 0;108 98 // 109 99 // visualizationTabPage … … 113 103 this.visualizationTabPage.Name = "visualizationTabPage"; 114 104 this.visualizationTabPage.Padding = new System.Windows.Forms.Padding(3); 115 this.visualizationTabPage.Size = new System.Drawing.Size(521, 3 41);105 this.visualizationTabPage.Size = new System.Drawing.Size(521, 338); 116 106 this.visualizationTabPage.TabIndex = 1; 117 107 this.visualizationTabPage.Text = "Visualization"; … … 120 110 // pathTSPTourView 121 111 // 122 this.pathTSPTourView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 123 | System.Windows.Forms.AnchorStyles.Left)124 112 this.pathTSPTourView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 113 | System.Windows.Forms.AnchorStyles.Left) 114 | System.Windows.Forms.AnchorStyles.Right))); 125 115 this.pathTSPTourView.Caption = "PathTSPTour View"; 126 116 this.pathTSPTourView.Content = null; … … 136 126 this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 137 127 this.Controls.Add(this.tabControl); 138 this.Controls.Add(this.importButton);139 128 this.Name = "TravelingSalesmanProblemView"; 140 129 this.Size = new System.Drawing.Size(529, 422); 130 this.Controls.SetChildIndex(this.libraryInfoButton, 0); 131 this.Controls.SetChildIndex(this.libraryLabel, 0); 132 this.Controls.SetChildIndex(this.problemInstanceProviderComboBox, 0); 133 this.Controls.SetChildIndex(this.problemInstanceProviderViewHost, 0); 141 134 this.Controls.SetChildIndex(this.infoLabel, 0); 142 this.Controls.SetChildIndex(this.importButton, 0);143 135 this.Controls.SetChildIndex(this.nameTextBox, 0); 144 136 this.Controls.SetChildIndex(this.tabControl, 0); … … 155 147 #endregion 156 148 157 private System.Windows.Forms.Button importButton;158 149 private HeuristicLab.MainForm.WindowsForms.DragOverTabControl tabControl; 159 150 private System.Windows.Forms.TabPage parametersTabPage; 160 151 private System.Windows.Forms.TabPage visualizationTabPage; 161 private HeuristicLab.Core.Views.ParameterCollectionView parameterCollectionView;162 152 private PathTSPTourView pathTSPTourView; 163 164 153 } 165 154 } -
trunk/sources/HeuristicLab.Problems.TravelingSalesman.Views/3.3/TravelingSalesmanProblemView.cs
r7259 r7558 22 22 using System; 23 23 using System.Windows.Forms; 24 using HeuristicLab.Core;25 using HeuristicLab.Core.Views;26 24 using HeuristicLab.MainForm; 27 using HeuristicLab. PluginInfrastructure;25 using HeuristicLab.Optimization.Views; 28 26 29 27 namespace HeuristicLab.Problems.TravelingSalesman.Views { … … 33 31 [View("Traveling Salesman Problem View")] 34 32 [Content(typeof(TravelingSalesmanProblem), true)] 35 public sealed partial class TravelingSalesmanProblemView : NamedItemView { 36 private TSPLIBImportDialog tsplibImportDialog; 37 33 public sealed partial class TravelingSalesmanProblemView : HeuristicOptimizationProblemView { 38 34 public new TravelingSalesmanProblem Content { 39 35 get { return (TravelingSalesmanProblem)base.Content; } … … 46 42 public TravelingSalesmanProblemView() { 47 43 InitializeComponent(); 48 }49 50 protected override void Dispose(bool disposing) {51 if (disposing) {52 if (tsplibImportDialog != null) tsplibImportDialog.Dispose();53 if (components != null) components.Dispose();54 }55 base.Dispose(disposing);56 44 } 57 45 … … 72 60 base.OnContentChanged(); 73 61 if (Content == null) { 74 parameterCollectionView.Content = null;75 62 pathTSPTourView.Content = null; 76 63 } else { 77 parameterCollectionView.Content = ((IParameterizedNamedItem)Content).Parameters;78 64 pathTSPTourView.Content = new PathTSPTour(Content.Coordinates, Content.BestKnownSolution, Content.BestKnownQuality); 79 65 } … … 82 68 protected override void SetEnabledStateOfControls() { 83 69 base.SetEnabledStateOfControls(); 84 parameterCollectionView.Enabled = Content != null;85 70 pathTSPTourView.Enabled = Content != null; 86 importButton.Enabled = Content != null && !ReadOnly;87 }88 89 private void importButton_Click(object sender, System.EventArgs e) {90 if (tsplibImportDialog == null) tsplibImportDialog = new TSPLIBImportDialog();91 92 if (tsplibImportDialog.ShowDialog(this) == DialogResult.OK) {93 try {94 if (tsplibImportDialog.Quality == null)95 Content.ImportFromTSPLIB(tsplibImportDialog.TSPFileName, tsplibImportDialog.TourFileName);96 else97 Content.ImportFromTSPLIB(tsplibImportDialog.TSPFileName, tsplibImportDialog.TourFileName, (double)tsplibImportDialog.Quality);98 }99 catch (Exception ex) {100 ErrorHandling.ShowErrorDialog(this, ex);101 }102 }103 71 } 104 72
Note: See TracChangeset
for help on using the changeset viewer.