Free cookie consent management tool by TermsFeed Policy Generator

Changeset 7641 for trunk


Ignore:
Timestamp:
03/20/12 17:26:56 (13 years ago)
Author:
sforsten
Message:

#1782:

  • HeuristicOptimizationView has been integrated in ProblemView and was deleted afterwards.
  • the icons for the load and the info button have been changed
  • QuadraticAssignmentProblem now also loads name and description of problem instance
  • A unused OpenFileDialog has been removed in QuadraticAssignmentProblemView
Location:
trunk/sources
Files:
2 deleted
11 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Optimization.Views/3.3/HeuristicLab.Optimization.Views-3.3.csproj

    r7558 r7641  
    264264      <DependentUpon>EngineAlgorithmView.cs</DependentUpon>
    265265    </Compile>
    266     <Compile Include="HeuristicOptimizationProblemView.cs">
    267       <SubType>UserControl</SubType>
    268     </Compile>
    269     <Compile Include="HeuristicOptimizationProblemView.Designer.cs">
    270       <DependentUpon>HeuristicOptimizationProblemView.cs</DependentUpon>
    271     </Compile>
    272266    <Compile Include="Properties\AssemblyInfo.cs" />
    273267    <Compile Include="ResultCollectionView.cs">
  • trunk/sources/HeuristicLab.Optimization.Views/3.3/ProblemInstanceProviderView.cs

    r7558 r7641  
    4545      toolTip.SetToolTip(importButton, "Import a " + GetProblemType() + " instance from file.");
    4646      loadButton.Text = String.Empty;
    47       loadButton.Image = VSImageLibrary.Checkout;
     47      loadButton.Image = VSImageLibrary.RefreshDocument;
    4848      toolTip.SetToolTip(loadButton, "Load the selected instance.");
    4949    }
  • trunk/sources/HeuristicLab.Optimization.Views/3.3/ProblemView.Designer.cs

    r7259 r7641  
    4545    /// </summary>
    4646    private void InitializeComponent() {
     47      this.problemInstanceProviderComboBox = new System.Windows.Forms.ComboBox();
     48      this.libraryLabel = new System.Windows.Forms.Label();
     49      this.libraryInfoButton = new System.Windows.Forms.Button();
     50      this.problemInstanceSplitContainer = new System.Windows.Forms.SplitContainer();
     51      this.problemInstanceProviderViewHost = new HeuristicLab.MainForm.WindowsForms.ViewHost();
    4752      ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).BeginInit();
     53      ((System.ComponentModel.ISupportInitialize)(this.problemInstanceSplitContainer)).BeginInit();
     54      this.problemInstanceSplitContainer.Panel1.SuspendLayout();
     55      this.problemInstanceSplitContainer.Panel2.SuspendLayout();
     56      this.problemInstanceSplitContainer.SuspendLayout();
    4857      this.SuspendLayout();
     58      //
     59      // parameterCollectionView
     60      //
     61      this.parameterCollectionView.Location = new System.Drawing.Point(6, 27);
     62      this.parameterCollectionView.Size = new System.Drawing.Size(501, 303);
    4963      //
    5064      // nameTextBox
     
    5266      this.errorProvider.SetIconAlignment(this.nameTextBox, System.Windows.Forms.ErrorIconAlignment.MiddleLeft);
    5367      this.errorProvider.SetIconPadding(this.nameTextBox, 2);
     68      this.nameTextBox.Location = new System.Drawing.Point(47, 1);
     69      this.nameTextBox.Size = new System.Drawing.Size(438, 20);
     70      //
     71      // nameLabel
     72      //
     73      this.nameLabel.Location = new System.Drawing.Point(3, 6);
     74      //
     75      // infoLabel
     76      //
     77      this.infoLabel.Location = new System.Drawing.Point(491, 4);
     78      //
     79      // problemInstanceProviderComboBox
     80      //
     81      this.problemInstanceProviderComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
     82      this.problemInstanceProviderComboBox.FormattingEnabled = true;
     83      this.problemInstanceProviderComboBox.Location = new System.Drawing.Point(47, 2);
     84      this.problemInstanceProviderComboBox.Name = "problemInstanceProviderComboBox";
     85      this.problemInstanceProviderComboBox.Size = new System.Drawing.Size(171, 21);
     86      this.problemInstanceProviderComboBox.TabIndex = 13;
     87      this.problemInstanceProviderComboBox.SelectedIndexChanged += new System.EventHandler(this.problemInstanceProviderComboBox_SelectedIndexChanged);
     88      this.problemInstanceProviderComboBox.DataSourceChanged += new System.EventHandler(this.comboBox_DataSourceChanged);
     89      //
     90      // libraryLabel
     91      //
     92      this.libraryLabel.AutoSize = true;
     93      this.libraryLabel.Location = new System.Drawing.Point(3, 6);
     94      this.libraryLabel.Name = "libraryLabel";
     95      this.libraryLabel.Size = new System.Drawing.Size(41, 13);
     96      this.libraryLabel.TabIndex = 12;
     97      this.libraryLabel.Text = "Library:";
     98      //
     99      // libraryInfoButton
     100      //
     101      this.libraryInfoButton.Location = new System.Drawing.Point(224, 1);
     102      this.libraryInfoButton.Name = "libraryInfoButton";
     103      this.libraryInfoButton.Size = new System.Drawing.Size(26, 23);
     104      this.libraryInfoButton.TabIndex = 14;
     105      this.libraryInfoButton.Text = "Info";
     106      this.libraryInfoButton.UseVisualStyleBackColor = true;
     107      this.libraryInfoButton.Click += new System.EventHandler(this.libraryInfoButton_Click);
     108      //
     109      // problemInstanceSplitContainer
     110      //
     111      this.problemInstanceSplitContainer.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
     112                  | System.Windows.Forms.AnchorStyles.Left)
     113                  | System.Windows.Forms.AnchorStyles.Right)));
     114      this.problemInstanceSplitContainer.FixedPanel = System.Windows.Forms.FixedPanel.Panel1;
     115      this.problemInstanceSplitContainer.IsSplitterFixed = true;
     116      this.problemInstanceSplitContainer.Location = new System.Drawing.Point(0, 0);
     117      this.problemInstanceSplitContainer.Name = "problemInstanceSplitContainer";
     118      this.problemInstanceSplitContainer.Orientation = System.Windows.Forms.Orientation.Horizontal;
     119      //
     120      // problemInstanceSplitContainer.Panel1
     121      //
     122      this.problemInstanceSplitContainer.Panel1.Controls.Add(this.problemInstanceProviderViewHost);
     123      this.problemInstanceSplitContainer.Panel1.Controls.Add(this.problemInstanceProviderComboBox);
     124      this.problemInstanceSplitContainer.Panel1.Controls.Add(this.libraryInfoButton);
     125      this.problemInstanceSplitContainer.Panel1.Controls.Add(this.libraryLabel);
     126      this.problemInstanceSplitContainer.Panel1MinSize = 10;
     127      //
     128      // problemInstanceSplitContainer.Panel2
     129      //
     130      this.problemInstanceSplitContainer.Panel2.Controls.Add(this.nameLabel);
     131      this.problemInstanceSplitContainer.Panel2.Controls.Add(this.nameTextBox);
     132      this.problemInstanceSplitContainer.Panel2.Controls.Add(this.parameterCollectionView);
     133      this.problemInstanceSplitContainer.Panel2.Controls.Add(this.infoLabel);
     134      this.problemInstanceSplitContainer.Size = new System.Drawing.Size(511, 363);
     135      this.problemInstanceSplitContainer.SplitterDistance = 26;
     136      this.problemInstanceSplitContainer.TabIndex = 13;
     137      //
     138      // problemInstanceProviderViewHost
     139      //
     140      this.problemInstanceProviderViewHost.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
     141                  | System.Windows.Forms.AnchorStyles.Right)));
     142      this.problemInstanceProviderViewHost.Caption = "View";
     143      this.problemInstanceProviderViewHost.Content = null;
     144      this.problemInstanceProviderViewHost.Enabled = false;
     145      this.problemInstanceProviderViewHost.Location = new System.Drawing.Point(256, 3);
     146      this.problemInstanceProviderViewHost.Name = "problemInstanceProviderViewHost";
     147      this.problemInstanceProviderViewHost.ReadOnly = false;
     148      this.problemInstanceProviderViewHost.Size = new System.Drawing.Size(251, 22);
     149      this.problemInstanceProviderViewHost.TabIndex = 15;
     150      this.problemInstanceProviderViewHost.ViewsLabelVisible = false;
     151      this.problemInstanceProviderViewHost.ViewType = null;
    54152      //
    55153      // ProblemView
     
    57155      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
    58156      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
     157      this.Controls.Add(this.problemInstanceSplitContainer);
    59158      this.Name = "ProblemView";
     159      this.Size = new System.Drawing.Size(511, 363);
    60160      ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).EndInit();
     161      this.problemInstanceSplitContainer.Panel1.ResumeLayout(false);
     162      this.problemInstanceSplitContainer.Panel1.PerformLayout();
     163      this.problemInstanceSplitContainer.Panel2.ResumeLayout(false);
     164      this.problemInstanceSplitContainer.Panel2.PerformLayout();
     165      ((System.ComponentModel.ISupportInitialize)(this.problemInstanceSplitContainer)).EndInit();
     166      this.problemInstanceSplitContainer.ResumeLayout(false);
    61167      this.ResumeLayout(false);
    62       this.PerformLayout();
    63168
    64169    }
     
    66171    #endregion
    67172
    68 
     173    protected System.Windows.Forms.ComboBox problemInstanceProviderComboBox;
     174    protected System.Windows.Forms.Label libraryLabel;
     175    protected System.Windows.Forms.Button libraryInfoButton;
     176    protected System.Windows.Forms.SplitContainer problemInstanceSplitContainer;
     177    protected MainForm.WindowsForms.ViewHost problemInstanceProviderViewHost;
    69178  }
    70179}
  • trunk/sources/HeuristicLab.Optimization.Views/3.3/ProblemView.cs

    r7259 r7641  
    2020#endregion
    2121
     22using System;
     23using System.Collections.Generic;
     24using System.Diagnostics;
     25using System.Linq;
     26using System.Windows.Forms;
     27using HeuristicLab.Common.Resources;
    2228using HeuristicLab.Core.Views;
    2329using HeuristicLab.MainForm;
     30using HeuristicLab.PluginInfrastructure;
     31using HeuristicLab.Problems.Instances;
    2432
    2533namespace HeuristicLab.Optimization.Views {
     
    3543    }
    3644
     45    protected IProblemInstanceProvider SelectedProvider {
     46      get { return (problemInstanceProviderComboBox.SelectedIndex >= 0 ? (IProblemInstanceProvider)problemInstanceProviderComboBox.SelectedItem : null); }
     47    }
     48
    3749    /// <summary>
    3850    /// Initializes a new instance of <see cref="ItemBaseView"/>.
     
    4052    public ProblemView() {
    4153      InitializeComponent();
     54      libraryInfoButton.Text = String.Empty;
     55      libraryInfoButton.Image = VSImageLibrary.Internet;
    4256    }
    4357
    4458    protected override void OnContentChanged() {
    4559      base.OnContentChanged();
     60      if (Content == null) {
     61        problemInstanceProviderComboBox.DataSource = null;
     62      } else {
     63        problemInstanceProviderComboBox.DisplayMember = "Name";
     64        problemInstanceProviderComboBox.DataSource = GetProblemInstanceProviders().ToList();
     65        problemInstanceSplitContainer.Panel1Collapsed = problemInstanceProviderComboBox.Items.Count <= 0;
     66
     67      }
     68      SetEnabledStateOfControls();
     69    }
     70
     71    protected override void SetEnabledStateOfControls() {
     72      base.SetEnabledStateOfControls();
     73      problemInstanceProviderComboBox.Enabled = !ReadOnly && !Locked && Content != null && problemInstanceProviderComboBox.Items.Count > 0;
     74      libraryInfoButton.Enabled = SelectedProvider != null && SelectedProvider.WebLink != null;
     75    }
     76
     77    protected virtual void problemInstanceProviderComboBox_SelectedIndexChanged(object sender, System.EventArgs e) {
     78      if (problemInstanceProviderComboBox.SelectedIndex >= 0) {
     79        dynamic provider = SelectedProvider;
     80        dynamic consumer = Content;
     81        provider.Consumer = consumer;
     82        problemInstanceProviderViewHost.Content = SelectedProvider;
     83        SetTooltip();
     84      }
     85      SetEnabledStateOfControls();
     86    }
     87
     88    private void comboBox_DataSourceChanged(object sender, EventArgs e) {
     89      var comboBox = (ComboBox)sender;
     90      if (comboBox.DataSource == null)
     91        comboBox.Items.Clear();
     92    }
     93
     94    protected virtual void libraryInfoButton_Click(object sender, EventArgs e) {
     95      if (problemInstanceProviderComboBox.SelectedIndex >= 0) {
     96        if (SelectedProvider != null && SelectedProvider.WebLink != null)
     97          Process.Start(SelectedProvider.WebLink.ToString());
     98      }
     99    }
     100
     101    protected virtual IEnumerable<IProblemInstanceProvider> GetProblemInstanceProviders() {
     102      var consumerTypes = Content.GetType().GetInterfaces()
     103        .Where(x => x.IsGenericType
     104          && x.GetGenericTypeDefinition() == typeof(IProblemInstanceConsumer<>));
     105
     106      if (consumerTypes.Any()) {
     107        var instanceTypes = consumerTypes
     108          .Select(x => x.GetGenericArguments().First())
     109          .Select(x => typeof(IProblemInstanceProvider<>).MakeGenericType(x));
     110
     111        foreach (var type in instanceTypes) {
     112          foreach (var provider in ApplicationManager.Manager.GetInstances(type))
     113            yield return (IProblemInstanceProvider)provider;
     114        }
     115      }
     116    }
     117
     118    protected virtual void SetTooltip() {
     119      toolTip.SetToolTip(problemInstanceProviderComboBox, GetProviderToolTip());
     120      if (SelectedProvider.WebLink != null)
     121        toolTip.SetToolTip(libraryInfoButton, "Browse to " + SelectedProvider.WebLink.ToString());
     122      else toolTip.SetToolTip(libraryInfoButton, "Library does not have a web reference.");
     123    }
     124
     125    protected virtual string GetProviderToolTip() {
     126      var provider = SelectedProvider;
     127      string toolTip = provider.Name;
     128
     129      if (!String.IsNullOrEmpty(provider.ReferencePublication)) {
     130        toolTip = toolTip
     131            + Environment.NewLine + Environment.NewLine
     132            + provider.ReferencePublication;
     133      }
     134      if (provider.WebLink != null) {
     135        toolTip = toolTip
     136            + Environment.NewLine
     137            + provider.WebLink.ToString();
     138      }
     139
     140      return toolTip;
    46141    }
    47142  }
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/DataAnalysisProblemView.Designer.cs

    r7259 r7641  
    4545    /// </summary>
    4646    private void InitializeComponent() {
     47      this.openFileDialog = new System.Windows.Forms.OpenFileDialog();
    4748      this.ImportButton = new System.Windows.Forms.Button();
    48       this.openFileDialog = new System.Windows.Forms.OpenFileDialog();
     49      ((System.ComponentModel.ISupportInitialize)(this.problemInstanceSplitContainer)).BeginInit();
     50      this.problemInstanceSplitContainer.Panel1.SuspendLayout();
     51      this.problemInstanceSplitContainer.Panel2.SuspendLayout();
     52      this.problemInstanceSplitContainer.SuspendLayout();
    4953      ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).BeginInit();
    5054      this.SuspendLayout();
    5155      //
     56      // libraryInfoButton
     57      //
     58      this.libraryInfoButton.Location = new System.Drawing.Point(224, 1);
     59      //
     60      // problemInstanceSplitContainer
     61      //
     62      //
     63      // problemInstanceSplitContainer.Panel2
     64      //
     65      this.problemInstanceSplitContainer.Panel2.Controls.Add(this.ImportButton);
     66      //
    5267      // parameterCollectionView
    5368      //
    54       this.parameterCollectionView.Location = new System.Drawing.Point(3, 55);
    55       this.parameterCollectionView.Size = new System.Drawing.Size(490, 279);
    56       this.parameterCollectionView.TabIndex = 4;
     69      this.parameterCollectionView.Location = new System.Drawing.Point(6, 56);
     70      this.parameterCollectionView.Size = new System.Drawing.Size(501, 274);
    5771      //
    5872      // nameTextBox
     
    6074      this.errorProvider.SetIconAlignment(this.nameTextBox, System.Windows.Forms.ErrorIconAlignment.MiddleLeft);
    6175      this.errorProvider.SetIconPadding(this.nameTextBox, 2);
    62       this.nameTextBox.Size = new System.Drawing.Size(409, 20);
    63       //
    64       // infoLabel
    65       //
    66       this.infoLabel.Location = new System.Drawing.Point(474, 3);
    67       //
    68       // ImportButton
    69       //
    70       this.ImportButton.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
    71                   | System.Windows.Forms.AnchorStyles.Right)));
    72       this.ImportButton.Location = new System.Drawing.Point(0, 26);
    73       this.ImportButton.Name = "ImportButton";
    74       this.ImportButton.Size = new System.Drawing.Size(493, 23);
    75       this.ImportButton.TabIndex = 3;
    76       this.ImportButton.Text = "Import from CSV file";
    77       this.ImportButton.UseVisualStyleBackColor = true;
    78       this.ImportButton.Click += new System.EventHandler(this.ImportButton_Click);
    7976      //
    8077      // openFileDialog
     
    8380      this.openFileDialog.Title = "Import data...";
    8481      //
     82      // ImportButton
     83      //
     84      this.ImportButton.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
     85                  | System.Windows.Forms.AnchorStyles.Right)));
     86      this.ImportButton.Location = new System.Drawing.Point(6, 27);
     87      this.ImportButton.Name = "ImportButton";
     88      this.ImportButton.Size = new System.Drawing.Size(501, 23);
     89      this.ImportButton.TabIndex = 14;
     90      this.ImportButton.Text = "Import from CSV file";
     91      this.ImportButton.UseVisualStyleBackColor = true;
     92      this.ImportButton.Click += new System.EventHandler(this.ImportButton_Click);
     93      //
    8594      // DataAnalysisProblemView
    8695      //
    8796      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
    8897      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
    89       this.Controls.Add(this.ImportButton);
    9098      this.Name = "DataAnalysisProblemView";
    91       this.Size = new System.Drawing.Size(493, 334);
    92       this.Controls.SetChildIndex(this.ImportButton, 0);
    93       this.Controls.SetChildIndex(this.infoLabel, 0);
    94       this.Controls.SetChildIndex(this.nameTextBox, 0);
    95       this.Controls.SetChildIndex(this.nameLabel, 0);
    96       this.Controls.SetChildIndex(this.parameterCollectionView, 0);
     99      this.problemInstanceSplitContainer.Panel1.ResumeLayout(false);
     100      this.problemInstanceSplitContainer.Panel1.PerformLayout();
     101      this.problemInstanceSplitContainer.Panel2.ResumeLayout(false);
     102      this.problemInstanceSplitContainer.Panel2.PerformLayout();
     103      ((System.ComponentModel.ISupportInitialize)(this.problemInstanceSplitContainer)).EndInit();
     104      this.problemInstanceSplitContainer.ResumeLayout(false);
    97105      ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).EndInit();
    98106      this.ResumeLayout(false);
    99       this.PerformLayout();
    100107
    101108    }
     
    103110    #endregion
    104111
     112    private System.Windows.Forms.OpenFileDialog openFileDialog;
    105113    private System.Windows.Forms.Button ImportButton;
    106     private System.Windows.Forms.OpenFileDialog openFileDialog;
    107114  }
    108115}
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/HeuristicLab.Problems.DataAnalysis.Views-3.4.csproj

    r7500 r7641  
    257257      <DependentUpon>RegressionSolutionScatterPlotView.cs</DependentUpon>
    258258    </Compile>
     259    <Compile Include="DataAnalysisProblemView.cs">
     260      <SubType>UserControl</SubType>
     261    </Compile>
     262    <Compile Include="DataAnalysisProblemView.Designer.cs">
     263      <DependentUpon>DataAnalysisProblemView.cs</DependentUpon>
     264    </Compile>
    259265    <None Include="HeuristicLab.snk" />
    260266    <None Include="Plugin.cs.frame" />
    261267    <None Include="Properties\AssemblyInfo.cs.frame" />
    262     <Compile Include="DataAnalysisProblemView.cs">
    263       <SubType>UserControl</SubType>
    264     </Compile>
    265     <Compile Include="DataAnalysisProblemView.Designer.cs">
    266       <DependentUpon>DataAnalysisProblemView.cs</DependentUpon>
    267     </Compile>
    268268    <Compile Include="Properties\AssemblyInfo.cs" />
    269269  </ItemGroup>
  • trunk/sources/HeuristicLab.Problems.QuadraticAssignment.Views/3.3/QuadraticAssignmentProblemView.Designer.cs

    r7558 r7641  
    4545    /// </summary>
    4646    private void InitializeComponent() {
    47       this.openFileDialog = new System.Windows.Forms.OpenFileDialog();
    4847      this.tabControl = new System.Windows.Forms.TabControl();
    4948      this.problemTabPage = new System.Windows.Forms.TabPage();
    5049      this.visualizationTabPage = new System.Windows.Forms.TabPage();
    5150      this.qapView = new HeuristicLab.Problems.QuadraticAssignment.Views.QAPVisualizationControl();
     51      ((System.ComponentModel.ISupportInitialize)(this.problemInstanceSplitContainer)).BeginInit();
     52      this.problemInstanceSplitContainer.Panel1.SuspendLayout();
     53      this.problemInstanceSplitContainer.Panel2.SuspendLayout();
     54      this.problemInstanceSplitContainer.SuspendLayout();
    5255      ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).BeginInit();
    5356      this.tabControl.SuspendLayout();
     57      this.problemTabPage.SuspendLayout();
    5458      this.visualizationTabPage.SuspendLayout();
    5559      this.SuspendLayout();
    5660      //
     61      // libraryInfoButton
     62      //
     63      this.libraryInfoButton.Location = new System.Drawing.Point(224, 1);
     64      //
     65      // problemInstanceSplitContainer
     66      //
     67      //
     68      // problemInstanceSplitContainer.Panel2
     69      //
     70      this.problemInstanceSplitContainer.Panel2.Controls.Add(this.tabControl);
     71      //
    5772      // parameterCollectionView
    5873      //
    59       this.parameterCollectionView.Location = new System.Drawing.Point(8, 107);
    60       this.parameterCollectionView.Size = new System.Drawing.Size(629, 375);
     74      this.parameterCollectionView.Location = new System.Drawing.Point(0, 3);
     75      this.parameterCollectionView.Size = new System.Drawing.Size(497, 269);
    6176      //
    6277      // nameTextBox
     
    6479      this.errorProvider.SetIconAlignment(this.nameTextBox, System.Windows.Forms.ErrorIconAlignment.MiddleLeft);
    6580      this.errorProvider.SetIconPadding(this.nameTextBox, 2);
    66       this.nameTextBox.Location = new System.Drawing.Point(50, 29);
    67       this.nameTextBox.Size = new System.Drawing.Size(572, 20);
    68       //
    69       // nameLabel
    70       //
    71       this.nameLabel.Location = new System.Drawing.Point(3, 32);
    72       //
    73       // infoLabel
    74       //
    75       this.infoLabel.Location = new System.Drawing.Point(628, 32);
    76       //
    77       // openFileDialog
    78       //
    79       this.openFileDialog.FileName = "instance.dat";
    80       this.openFileDialog.Filter = "Dat files|*.dat|All files|*.*";
    8181      //
    8282      // tabControl
    8383      //
    84       this.tabControl.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
    85             | System.Windows.Forms.AnchorStyles.Left)
    86             | System.Windows.Forms.AnchorStyles.Right)));
     84      this.tabControl.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
     85                  | System.Windows.Forms.AnchorStyles.Left)
     86                  | System.Windows.Forms.AnchorStyles.Right)));
    8787      this.tabControl.Controls.Add(this.problemTabPage);
    8888      this.tabControl.Controls.Add(this.visualizationTabPage);
    89       this.tabControl.Location = new System.Drawing.Point(0, 55);
     89      this.tabControl.Location = new System.Drawing.Point(0, 29);
    9090      this.tabControl.Name = "tabControl";
    9191      this.tabControl.SelectedIndex = 0;
    92       this.tabControl.Size = new System.Drawing.Size(647, 437);
     92      this.tabControl.Size = new System.Drawing.Size(511, 304);
    9393      this.tabControl.TabIndex = 8;
    9494      //
    9595      // problemTabPage
    9696      //
     97      this.problemTabPage.Controls.Add(this.parameterCollectionView);
    9798      this.problemTabPage.Location = new System.Drawing.Point(4, 22);
    9899      this.problemTabPage.Name = "problemTabPage";
    99100      this.problemTabPage.Padding = new System.Windows.Forms.Padding(3);
    100       this.problemTabPage.Size = new System.Drawing.Size(639, 411);
     101      this.problemTabPage.Size = new System.Drawing.Size(503, 278);
    101102      this.problemTabPage.TabIndex = 0;
    102103      this.problemTabPage.Text = "Problem";
     
    109110      this.visualizationTabPage.Name = "visualizationTabPage";
    110111      this.visualizationTabPage.Padding = new System.Windows.Forms.Padding(3);
    111       this.visualizationTabPage.Size = new System.Drawing.Size(639, 411);
     112      this.visualizationTabPage.Size = new System.Drawing.Size(503, 278);
    112113      this.visualizationTabPage.TabIndex = 1;
    113114      this.visualizationTabPage.Text = "Visualization";
     
    121122      this.qapView.Location = new System.Drawing.Point(3, 3);
    122123      this.qapView.Name = "qapView";
    123       this.qapView.Size = new System.Drawing.Size(633, 405);
     124      this.qapView.Size = new System.Drawing.Size(497, 272);
    124125      this.qapView.TabIndex = 0;
    125126      this.qapView.Weights = null;
     
    129130      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
    130131      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
    131       this.Controls.Add(this.tabControl);
    132132      this.Name = "QuadraticAssignmentProblemView";
    133       this.Size = new System.Drawing.Size(647, 492);
    134       this.Controls.SetChildIndex(this.tabControl, 0);
    135       this.Controls.SetChildIndex(this.infoLabel, 0);
    136       this.Controls.SetChildIndex(this.parameterCollectionView, 0);
    137       this.Controls.SetChildIndex(this.nameLabel, 0);
    138       this.Controls.SetChildIndex(this.nameTextBox, 0);
     133      this.problemInstanceSplitContainer.Panel1.ResumeLayout(false);
     134      this.problemInstanceSplitContainer.Panel1.PerformLayout();
     135      this.problemInstanceSplitContainer.Panel2.ResumeLayout(false);
     136      this.problemInstanceSplitContainer.Panel2.PerformLayout();
     137      ((System.ComponentModel.ISupportInitialize)(this.problemInstanceSplitContainer)).EndInit();
     138      this.problemInstanceSplitContainer.ResumeLayout(false);
    139139      ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).EndInit();
    140140      this.tabControl.ResumeLayout(false);
     141      this.problemTabPage.ResumeLayout(false);
    141142      this.visualizationTabPage.ResumeLayout(false);
    142143      this.ResumeLayout(false);
    143       this.PerformLayout();
    144144
    145145    }
     
    147147    #endregion
    148148
    149     private System.Windows.Forms.OpenFileDialog openFileDialog;
    150149    private System.Windows.Forms.TabControl tabControl;
    151150    private System.Windows.Forms.TabPage problemTabPage;
  • trunk/sources/HeuristicLab.Problems.QuadraticAssignment.Views/3.3/QuadraticAssignmentProblemView.cs

    r7558 r7641  
    2929  [View("Quadratic Assignment Problem View")]
    3030  [Content(typeof(QuadraticAssignmentProblem), IsDefaultView = true)]
    31   public sealed partial class QuadraticAssignmentProblemView : HeuristicOptimizationProblemView {
     31  public sealed partial class QuadraticAssignmentProblemView : ProblemView {
    3232    public new QuadraticAssignmentProblem Content {
    3333      get { return (QuadraticAssignmentProblem)base.Content; }
  • trunk/sources/HeuristicLab.Problems.QuadraticAssignment/3.3/QuadraticAssignmentProblem.cs

    r7626 r7641  
    362362      var weights = new DoubleMatrix(data.Weights);
    363363      var distances = new DoubleMatrix(data.Distances);
     364      Name = data.Name;
     365      Description = data.Description;
    364366      Load(weights, distances);
    365367      EvaluateAndLoadAssignment(data.BestKnownAssignment);
     
    374376        weights[i, (i + 1) % data.Dimension] = 1;
    375377      var distances = new DoubleMatrix(data.GetDistanceMatrix());
     378      Name = data.Name;
     379      Description = data.Description;
    376380      Load(weights, distances);
    377381      EvaluateAndLoadAssignment(data.BestKnownTour);
  • trunk/sources/HeuristicLab.Problems.TravelingSalesman.Views/3.3/TravelingSalesmanProblemView.Designer.cs

    r7558 r7641  
    4545      this.visualizationTabPage = new System.Windows.Forms.TabPage();
    4646      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();
    4751      ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).BeginInit();
    4852      this.tabControl.SuspendLayout();
     
    5155      this.SuspendLayout();
    5256      //
    53       // problemInstanceProviderViewHost
     57      // libraryInfoButton
    5458      //
    55       this.problemInstanceProviderViewHost.Size = new System.Drawing.Size(270, 21);
     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);
    5667      //
    5768      // parameterCollectionView
     
    6071      this.parameterCollectionView.Dock = System.Windows.Forms.DockStyle.Fill;
    6172      this.parameterCollectionView.Location = new System.Drawing.Point(3, 3);
    62       this.parameterCollectionView.Size = new System.Drawing.Size(515, 332);
     73      this.parameterCollectionView.Size = new System.Drawing.Size(497, 274);
    6374      //
    6475      // nameTextBox
     
    6677      this.errorProvider.SetIconAlignment(this.nameTextBox, System.Windows.Forms.ErrorIconAlignment.MiddleLeft);
    6778      this.errorProvider.SetIconPadding(this.nameTextBox, 2);
    68       this.nameTextBox.Size = new System.Drawing.Size(454, 20);
    69       //
    70       // infoLabel
    71       //
    72       this.infoLabel.Location = new System.Drawing.Point(510, 35);
    7379      //
    7480      // tabControl
    7581      //
    7682      this.tabControl.AllowDrop = true;
    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)));
     83      this.tabControl.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
     84                  | System.Windows.Forms.AnchorStyles.Left)
     85                  | System.Windows.Forms.AnchorStyles.Right)));
    8086      this.tabControl.Controls.Add(this.parametersTabPage);
    8187      this.tabControl.Controls.Add(this.visualizationTabPage);
    82       this.tabControl.Location = new System.Drawing.Point(0, 58);
     88      this.tabControl.Location = new System.Drawing.Point(0, 27);
    8389      this.tabControl.Name = "tabControl";
    8490      this.tabControl.SelectedIndex = 0;
    85       this.tabControl.Size = new System.Drawing.Size(529, 364);
     91      this.tabControl.Size = new System.Drawing.Size(511, 306);
    8692      this.tabControl.TabIndex = 4;
    8793      //
     
    9298      this.parametersTabPage.Name = "parametersTabPage";
    9399      this.parametersTabPage.Padding = new System.Windows.Forms.Padding(3);
    94       this.parametersTabPage.Size = new System.Drawing.Size(521, 338);
     100      this.parametersTabPage.Size = new System.Drawing.Size(503, 280);
    95101      this.parametersTabPage.TabIndex = 0;
    96102      this.parametersTabPage.Text = "Parameters";
     
    103109      this.visualizationTabPage.Name = "visualizationTabPage";
    104110      this.visualizationTabPage.Padding = new System.Windows.Forms.Padding(3);
    105       this.visualizationTabPage.Size = new System.Drawing.Size(521, 338);
     111      this.visualizationTabPage.Size = new System.Drawing.Size(503, 280);
    106112      this.visualizationTabPage.TabIndex = 1;
    107113      this.visualizationTabPage.Text = "Visualization";
     
    110116      // pathTSPTourView
    111117      //
    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)));
     118      this.pathTSPTourView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
     119                  | System.Windows.Forms.AnchorStyles.Left)
     120                  | System.Windows.Forms.AnchorStyles.Right)));
    115121      this.pathTSPTourView.Caption = "PathTSPTour View";
    116122      this.pathTSPTourView.Content = null;
     
    118124      this.pathTSPTourView.Name = "pathTSPTourView";
    119125      this.pathTSPTourView.ReadOnly = false;
    120       this.pathTSPTourView.Size = new System.Drawing.Size(509, 329);
     126      this.pathTSPTourView.Size = new System.Drawing.Size(491, 268);
    121127      this.pathTSPTourView.TabIndex = 0;
    122128      //
     
    125131      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
    126132      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
    127       this.Controls.Add(this.tabControl);
    128133      this.Name = "TravelingSalesmanProblemView";
    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);
    134       this.Controls.SetChildIndex(this.infoLabel, 0);
    135       this.Controls.SetChildIndex(this.nameTextBox, 0);
    136       this.Controls.SetChildIndex(this.tabControl, 0);
    137       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);
    138140      ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).EndInit();
    139141      this.tabControl.ResumeLayout(false);
     
    141143      this.visualizationTabPage.ResumeLayout(false);
    142144      this.ResumeLayout(false);
    143       this.PerformLayout();
    144145
    145146    }
  • trunk/sources/HeuristicLab.Problems.TravelingSalesman.Views/3.3/TravelingSalesmanProblemView.cs

    r7558 r7641  
    3131  [View("Traveling Salesman Problem View")]
    3232  [Content(typeof(TravelingSalesmanProblem), true)]
    33   public sealed partial class TravelingSalesmanProblemView : HeuristicOptimizationProblemView {
     33  public sealed partial class TravelingSalesmanProblemView : ProblemView {
    3434    public new TravelingSalesmanProblem Content {
    3535      get { return (TravelingSalesmanProblem)base.Content; }
Note: See TracChangeset for help on using the changeset viewer.