- Timestamp:
- 03/28/12 15:47:26 (13 years ago)
- Location:
- branches/HeuristicLab.Hive.Azure
- Files:
-
- 2 deleted
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.Hive.Azure
- Property svn:ignore
-
old new 3 3 *.resharper 4 4 *.suo 5 *.user 5 6 *.vsp 6 7 Doxygen 8 FxCopResults.txt 7 9 Google.ProtocolBuffers-0.9.1.dll 8 10 HeuristicLab 3.3.5.1.ReSharper.user
-
- Property svn:mergeinfo changed
- Property svn:ignore
-
branches/HeuristicLab.Hive.Azure/HeuristicLab.Problems.TravelingSalesman.Views/3.3/HeuristicLab.Problems.TravelingSalesman.Views-3.3.csproj
r6866 r7669 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> … … 205 194 <Project>{94186A6A-5176-4402-AE83-886557B53CCA}</Project> 206 195 <Name>HeuristicLab.PluginInfrastructure-3.3</Name> 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> 207 201 <Private>False</Private> 208 202 </ProjectReference> -
branches/HeuristicLab.Hive.Azure/HeuristicLab.Problems.TravelingSalesman.Views/3.3/PathTSPTourView.cs
r7270 r7669 118 118 graphics.FillRectangle(Brushes.Red, points[i].X - 2, points[i].Y - 2, 6, 6); 119 119 } 120 } else { 121 using (Graphics graphics = Graphics.FromImage(bitmap)) { 122 graphics.Clear(Color.White); 123 Font font = new Font(FontFamily.GenericSansSerif, 12, FontStyle.Regular); 124 string text = "No coordinates defined or in wrong format."; 125 SizeF strSize = graphics.MeasureString(text, font); 126 graphics.DrawString(text, font, Brushes.Black, (float)(pictureBox.Width - strSize.Width) / 2.0f, (float)(pictureBox.Height - strSize.Height) / 2.0f); 127 } 120 128 } 121 129 pictureBox.Image = bitmap; -
branches/HeuristicLab.Hive.Azure/HeuristicLab.Problems.TravelingSalesman.Views/3.3/Plugin.cs.frame
r7270 r7669 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")] -
branches/HeuristicLab.Hive.Azure/HeuristicLab.Problems.TravelingSalesman.Views/3.3/TravelingSalesmanProblemView.Designer.cs
r7270 r7669 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(); 47 ((System.ComponentModel.ISupportInitialize)(this.problemInstanceSplitContainer)).BeginInit(); 48 this.problemInstanceSplitContainer.Panel1.SuspendLayout(); 49 this.problemInstanceSplitContainer.Panel2.SuspendLayout(); 50 this.problemInstanceSplitContainer.SuspendLayout(); 42 51 ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).BeginInit(); 43 52 this.tabControl.SuspendLayout(); … … 46 55 this.SuspendLayout(); 47 56 // 57 // libraryInfoButton 58 // 59 this.libraryInfoButton.Location = new System.Drawing.Point(224, 1); 60 // 61 // problemInstanceSplitContainer 62 // 63 // 64 // problemInstanceSplitContainer.Panel2 65 // 66 this.problemInstanceSplitContainer.Panel2.Controls.Add(this.tabControl); 67 // 68 // parameterCollectionView 69 // 70 this.parameterCollectionView.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left))); 71 this.parameterCollectionView.Dock = System.Windows.Forms.DockStyle.Fill; 72 this.parameterCollectionView.Location = new System.Drawing.Point(3, 3); 73 this.parameterCollectionView.Size = new System.Drawing.Size(497, 274); 74 // 48 75 // nameTextBox 49 76 // 50 77 this.errorProvider.SetIconAlignment(this.nameTextBox, System.Windows.Forms.ErrorIconAlignment.MiddleLeft); 51 78 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);54 //55 // infoLabel56 //57 this.infoLabel.Location = new System.Drawing.Point(510, 3);58 //59 // importButton60 //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);70 79 // 71 80 // tabControl … … 77 86 this.tabControl.Controls.Add(this.parametersTabPage); 78 87 this.tabControl.Controls.Add(this.visualizationTabPage); 79 this.tabControl.Location = new System.Drawing.Point(0, 55);88 this.tabControl.Location = new System.Drawing.Point(0, 27); 80 89 this.tabControl.Name = "tabControl"; 81 90 this.tabControl.SelectedIndex = 0; 82 this.tabControl.Size = new System.Drawing.Size(5 29, 367);91 this.tabControl.Size = new System.Drawing.Size(511, 306); 83 92 this.tabControl.TabIndex = 4; 84 93 // … … 89 98 this.parametersTabPage.Name = "parametersTabPage"; 90 99 this.parametersTabPage.Padding = new System.Windows.Forms.Padding(3); 91 this.parametersTabPage.Size = new System.Drawing.Size(5 21, 315);100 this.parametersTabPage.Size = new System.Drawing.Size(503, 280); 92 101 this.parametersTabPage.TabIndex = 0; 93 102 this.parametersTabPage.Text = "Parameters"; 94 103 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 104 // 109 105 // visualizationTabPage … … 113 109 this.visualizationTabPage.Name = "visualizationTabPage"; 114 110 this.visualizationTabPage.Padding = new System.Windows.Forms.Padding(3); 115 this.visualizationTabPage.Size = new System.Drawing.Size(5 21, 341);111 this.visualizationTabPage.Size = new System.Drawing.Size(503, 280); 116 112 this.visualizationTabPage.TabIndex = 1; 117 113 this.visualizationTabPage.Text = "Visualization"; … … 128 124 this.pathTSPTourView.Name = "pathTSPTourView"; 129 125 this.pathTSPTourView.ReadOnly = false; 130 this.pathTSPTourView.Size = new System.Drawing.Size( 509, 329);126 this.pathTSPTourView.Size = new System.Drawing.Size(491, 268); 131 127 this.pathTSPTourView.TabIndex = 0; 132 128 // … … 135 131 this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); 136 132 this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 137 this.Controls.Add(this.tabControl);138 this.Controls.Add(this.importButton);139 133 this.Name = "TravelingSalesmanProblemView"; 140 this. Size = new System.Drawing.Size(529, 422);141 this. Controls.SetChildIndex(this.infoLabel, 0);142 this. Controls.SetChildIndex(this.importButton, 0);143 this. Controls.SetChildIndex(this.nameTextBox, 0);144 this.Controls.SetChildIndex(this.tabControl, 0);145 this. Controls.SetChildIndex(this.nameLabel, 0);134 this.problemInstanceSplitContainer.Panel1.ResumeLayout(false); 135 this.problemInstanceSplitContainer.Panel1.PerformLayout(); 136 this.problemInstanceSplitContainer.Panel2.ResumeLayout(false); 137 this.problemInstanceSplitContainer.Panel2.PerformLayout(); 138 ((System.ComponentModel.ISupportInitialize)(this.problemInstanceSplitContainer)).EndInit(); 139 this.problemInstanceSplitContainer.ResumeLayout(false); 146 140 ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).EndInit(); 147 141 this.tabControl.ResumeLayout(false); … … 149 143 this.visualizationTabPage.ResumeLayout(false); 150 144 this.ResumeLayout(false); 151 this.PerformLayout();152 145 153 146 } … … 155 148 #endregion 156 149 157 private System.Windows.Forms.Button importButton;158 150 private HeuristicLab.MainForm.WindowsForms.DragOverTabControl tabControl; 159 151 private System.Windows.Forms.TabPage parametersTabPage; 160 152 private System.Windows.Forms.TabPage visualizationTabPage; 161 private HeuristicLab.Core.Views.ParameterCollectionView parameterCollectionView;162 153 private PathTSPTourView pathTSPTourView; 163 164 154 } 165 155 } -
branches/HeuristicLab.Hive.Azure/HeuristicLab.Problems.TravelingSalesman.Views/3.3/TravelingSalesmanProblemView.cs
r7270 r7669 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 : ProblemView { 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.