Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
03/28/12 15:47:26 (12 years ago)
Author:
spimming
Message:

#1680: merged changes from trunk into branch

Location:
branches/HeuristicLab.Hive.Azure
Files:
2 deleted
6 edited

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.Hive.Azure

  • branches/HeuristicLab.Hive.Azure/HeuristicLab.Problems.TravelingSalesman.Views/3.3/HeuristicLab.Problems.TravelingSalesman.Views-3.3.csproj

    r6866 r7669  
    128128      <DependentUpon>TravelingSalesmanProblemView.cs</DependentUpon>
    129129    </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>
    136130    <Compile Include="Properties\AssemblyInfo.cs" />
    137131  </ItemGroup>
     
    147141      <Private>False</Private>
    148142    </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>
    154143    <ProjectReference Include="..\..\HeuristicLab.Common\3.3\HeuristicLab.Common-3.3.csproj">
    155144      <Project>{A9AD58B9-3EF9-4CC1-97E5-8D909039FF5C}</Project>
     
    205194      <Project>{94186A6A-5176-4402-AE83-886557B53CCA}</Project>
    206195      <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>
    207201      <Private>False</Private>
    208202    </ProjectReference>
  • branches/HeuristicLab.Hive.Azure/HeuristicLab.Problems.TravelingSalesman.Views/3.3/PathTSPTourView.cs

    r7270 r7669  
    118118                graphics.FillRectangle(Brushes.Red, points[i].X - 2, points[i].Y - 2, 6, 6);
    119119            }
     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            }
    120128          }
    121129          pictureBox.Image = bitmap;
  • branches/HeuristicLab.Hive.Azure/HeuristicLab.Problems.TravelingSalesman.Views/3.3/Plugin.cs.frame

    r7270 r7669  
    2929  [PluginFile("HeuristicLab.Problems.TravelingSalesman.Views-3.3.dll", PluginFileType.Assembly)]
    3030  [PluginDependency("HeuristicLab.Common", "3.3")]
    31   [PluginDependency("HeuristicLab.Common.Resources", "3.3")]
    3231  [PluginDependency("HeuristicLab.Core", "3.3")]
    3332  [PluginDependency("HeuristicLab.Core.Views", "3.3")]
     
    3736  [PluginDependency("HeuristicLab.MainForm.WindowsForms", "3.3")]
    3837  [PluginDependency("HeuristicLab.Optimization", "3.3")]
     38  [PluginDependency("HeuristicLab.Optimization.Views", "3.3")]
    3939  [PluginDependency("HeuristicLab.Parameters", "3.3")]
    4040  [PluginDependency("HeuristicLab.Problems.TravelingSalesman", "3.3")]
  • branches/HeuristicLab.Hive.Azure/HeuristicLab.Problems.TravelingSalesman.Views/3.3/TravelingSalesmanProblemView.Designer.cs

    r7270 r7669  
    2727    private System.ComponentModel.IContainer components = null;
    2828
     29    protected override void Dispose(bool disposing) {
     30      if (disposing) {
     31        if (components != null) components.Dispose();
     32      }
     33      base.Dispose(disposing);
     34    }
     35
    2936    #region Component Designer generated code
    3037
     
    3441    /// </summary>
    3542    private void InitializeComponent() {
    36       this.importButton = new System.Windows.Forms.Button();
    3743      this.tabControl = new HeuristicLab.MainForm.WindowsForms.DragOverTabControl();
    3844      this.parametersTabPage = new System.Windows.Forms.TabPage();
    39       this.parameterCollectionView = new HeuristicLab.Core.Views.ParameterCollectionView();
    4045      this.visualizationTabPage = new System.Windows.Forms.TabPage();
    4146      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();
    4251      ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).BeginInit();
    4352      this.tabControl.SuspendLayout();
     
    4655      this.SuspendLayout();
    4756      //
     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      //
    4875      // nameTextBox
    4976      //
    5077      this.errorProvider.SetIconAlignment(this.nameTextBox, System.Windows.Forms.ErrorIconAlignment.MiddleLeft);
    5178      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       // infoLabel
    56       //
    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);
    7079      //
    7180      // tabControl
     
    7786      this.tabControl.Controls.Add(this.parametersTabPage);
    7887      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);
    8089      this.tabControl.Name = "tabControl";
    8190      this.tabControl.SelectedIndex = 0;
    82       this.tabControl.Size = new System.Drawing.Size(529, 367);
     91      this.tabControl.Size = new System.Drawing.Size(511, 306);
    8392      this.tabControl.TabIndex = 4;
    8493      //
     
    8998      this.parametersTabPage.Name = "parametersTabPage";
    9099      this.parametersTabPage.Padding = new System.Windows.Forms.Padding(3);
    91       this.parametersTabPage.Size = new System.Drawing.Size(521, 315);
     100      this.parametersTabPage.Size = new System.Drawing.Size(503, 280);
    92101      this.parametersTabPage.TabIndex = 0;
    93102      this.parametersTabPage.Text = "Parameters";
    94103      this.parametersTabPage.UseVisualStyleBackColor = true;
    95       //
    96       // parameterCollectionView
    97       //
    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;
    108104      //
    109105      // visualizationTabPage
     
    113109      this.visualizationTabPage.Name = "visualizationTabPage";
    114110      this.visualizationTabPage.Padding = new System.Windows.Forms.Padding(3);
    115       this.visualizationTabPage.Size = new System.Drawing.Size(521, 341);
     111      this.visualizationTabPage.Size = new System.Drawing.Size(503, 280);
    116112      this.visualizationTabPage.TabIndex = 1;
    117113      this.visualizationTabPage.Text = "Visualization";
     
    128124      this.pathTSPTourView.Name = "pathTSPTourView";
    129125      this.pathTSPTourView.ReadOnly = false;
    130       this.pathTSPTourView.Size = new System.Drawing.Size(509, 329);
     126      this.pathTSPTourView.Size = new System.Drawing.Size(491, 268);
    131127      this.pathTSPTourView.TabIndex = 0;
    132128      //
     
    135131      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
    136132      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
    137       this.Controls.Add(this.tabControl);
    138       this.Controls.Add(this.importButton);
    139133      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);
    146140      ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).EndInit();
    147141      this.tabControl.ResumeLayout(false);
     
    149143      this.visualizationTabPage.ResumeLayout(false);
    150144      this.ResumeLayout(false);
    151       this.PerformLayout();
    152145
    153146    }
     
    155148    #endregion
    156149
    157     private System.Windows.Forms.Button importButton;
    158150    private HeuristicLab.MainForm.WindowsForms.DragOverTabControl tabControl;
    159151    private System.Windows.Forms.TabPage parametersTabPage;
    160152    private System.Windows.Forms.TabPage visualizationTabPage;
    161     private HeuristicLab.Core.Views.ParameterCollectionView parameterCollectionView;
    162153    private PathTSPTourView pathTSPTourView;
    163 
    164154  }
    165155}
  • branches/HeuristicLab.Hive.Azure/HeuristicLab.Problems.TravelingSalesman.Views/3.3/TravelingSalesmanProblemView.cs

    r7270 r7669  
    2222using System;
    2323using System.Windows.Forms;
    24 using HeuristicLab.Core;
    25 using HeuristicLab.Core.Views;
    2624using HeuristicLab.MainForm;
    27 using HeuristicLab.PluginInfrastructure;
     25using HeuristicLab.Optimization.Views;
    2826
    2927namespace HeuristicLab.Problems.TravelingSalesman.Views {
     
    3331  [View("Traveling Salesman Problem View")]
    3432  [Content(typeof(TravelingSalesmanProblem), true)]
    35   public sealed partial class TravelingSalesmanProblemView : NamedItemView {
    36     private TSPLIBImportDialog tsplibImportDialog;
    37 
     33  public sealed partial class TravelingSalesmanProblemView : ProblemView {
    3834    public new TravelingSalesmanProblem Content {
    3935      get { return (TravelingSalesmanProblem)base.Content; }
     
    4642    public TravelingSalesmanProblemView() {
    4743      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);
    5644    }
    5745
     
    7260      base.OnContentChanged();
    7361      if (Content == null) {
    74         parameterCollectionView.Content = null;
    7562        pathTSPTourView.Content = null;
    7663      } else {
    77         parameterCollectionView.Content = ((IParameterizedNamedItem)Content).Parameters;
    7864        pathTSPTourView.Content = new PathTSPTour(Content.Coordinates, Content.BestKnownSolution, Content.BestKnownQuality);
    7965      }
     
    8268    protected override void SetEnabledStateOfControls() {
    8369      base.SetEnabledStateOfControls();
    84       parameterCollectionView.Enabled = Content != null;
    8570      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           else
    97             Content.ImportFromTSPLIB(tsplibImportDialog.TSPFileName, tsplibImportDialog.TourFileName, (double)tsplibImportDialog.Quality);
    98         }
    99         catch (Exception ex) {
    100           ErrorHandling.ShowErrorDialog(this, ex);
    101         }
    102       }
    10371    }
    10472
Note: See TracChangeset for help on using the changeset viewer.