Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
03/15/12 09:11:17 (12 years ago)
Author:
gkronber
Message:

#1081 merged r7462:7609 from trunk into time series branch

Location:
branches/HeuristicLab.TimeSeries
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.TimeSeries

  • branches/HeuristicLab.TimeSeries/HeuristicLab.Problems.QuadraticAssignment.Views

  • branches/HeuristicLab.TimeSeries/HeuristicLab.Problems.QuadraticAssignment.Views/3.3/HeuristicLab.Problems.QuadraticAssignment.Views-3.3.csproj

    r7021 r7615  
    102102  </PropertyGroup>
    103103  <ItemGroup>
     104    <Reference Include="HeuristicLab.Encodings.SymbolicExpressionTreeEncoding-3.4, Version=3.4.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL" />
     105    <Reference Include="HeuristicLab.Problems.DataAnalysis-3.4, Version=3.4.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL" />
     106    <Reference Include="HeuristicLab.Problems.DataAnalysis.Symbolic-3.4, Version=3.4.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL" />
     107    <Reference Include="HeuristicLab.Problems.DataAnalysis.Symbolic.Classification-3.4, Version=3.4.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL" />
     108    <Reference Include="HeuristicLab.Problems.DataAnalysis.Symbolic.Views-3.4, Version=3.4.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL" />
     109    <Reference Include="HeuristicLab.Problems.DataAnalysis.Views-3.4, Version=3.4.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL" />
    104110    <Reference Include="System" />
    105111    <Reference Include="System.Core" />
     
    209215      <Private>False</Private>
    210216    </ProjectReference>
     217    <ProjectReference Include="..\..\HeuristicLab.Problems.DataAnalysis.Symbolic.Classification.Views\3.4\HeuristicLab.Problems.DataAnalysis.Symbolic.Classification.Views-3.4.csproj">
     218      <Project>{BF1E4DF4-A4CC-451F-9D50-303F405E265E}</Project>
     219      <Name>HeuristicLab.Problems.DataAnalysis.Symbolic.Classification.Views-3.4</Name>
     220    </ProjectReference>
     221    <ProjectReference Include="..\..\HeuristicLab.Problems.Instances\3.3\HeuristicLab.Problems.Instances-3.3.csproj">
     222      <Project>{3540E29E-4793-49E7-8EE2-FEA7F61C3994}</Project>
     223      <Name>HeuristicLab.Problems.Instances-3.3</Name>
     224    </ProjectReference>
    211225    <ProjectReference Include="..\..\HeuristicLab.Problems.QuadraticAssignment\3.3\HeuristicLab.Problems.QuadraticAssignment-3.3.csproj">
    212226      <Project>{79271BC8-4446-40E2-BB89-9BE4E17174FE}</Project>
  • branches/HeuristicLab.TimeSeries/HeuristicLab.Problems.QuadraticAssignment.Views/3.3/Plugin.cs.frame

    r7268 r7615  
    3434  [PluginDependency("HeuristicLab.MainForm", "3.3")]
    3535  [PluginDependency("HeuristicLab.MainForm.WindowsForms", "3.3")]
     36  [PluginDependency("HeuristicLab.Optimization", "3.3")]
     37  [PluginDependency("HeuristicLab.Optimization.Views", "3.3")]
    3638  [PluginDependency("HeuristicLab.Problems.QuadraticAssignment", "3.3")]
    3739  public class HeuristicLabProblemsQuadraticAssignmentViewsPlugin : PluginBase {
  • branches/HeuristicLab.TimeSeries/HeuristicLab.Problems.QuadraticAssignment.Views/3.3/QuadraticAssignmentProblemView.Designer.cs

    r7268 r7615  
    4545    /// </summary>
    4646    private void InitializeComponent() {
    47       this.importInstanceButton = new System.Windows.Forms.Button();
    4847      this.openFileDialog = new System.Windows.Forms.OpenFileDialog();
    49       this.QAPLIBInstancesLabel = new System.Windows.Forms.Label();
    50       this.instancesComboBox = new System.Windows.Forms.ComboBox();
    51       this.loadInstanceButton = new System.Windows.Forms.Button();
    5248      this.tabControl = new System.Windows.Forms.TabControl();
    5349      this.problemTabPage = new System.Windows.Forms.TabPage();
     
    6864      this.errorProvider.SetIconAlignment(this.nameTextBox, System.Windows.Forms.ErrorIconAlignment.MiddleLeft);
    6965      this.errorProvider.SetIconPadding(this.nameTextBox, 2);
    70       this.nameTextBox.Location = new System.Drawing.Point(105, 29);
    71       this.nameTextBox.Size = new System.Drawing.Size(517, 20);
     66      this.nameTextBox.Location = new System.Drawing.Point(50, 29);
     67      this.nameTextBox.Size = new System.Drawing.Size(572, 20);
    7268      //
    7369      // nameLabel
     
    7975      this.infoLabel.Location = new System.Drawing.Point(628, 32);
    8076      //
    81       // importInstanceButton
    82       //
    83       this.importInstanceButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
    84       this.importInstanceButton.Location = new System.Drawing.Point(548, 0);
    85       this.importInstanceButton.Name = "importInstanceButton";
    86       this.importInstanceButton.Size = new System.Drawing.Size(99, 23);
    87       this.importInstanceButton.TabIndex = 5;
    88       this.importInstanceButton.Text = "Import...";
    89       this.importInstanceButton.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText;
    90       this.toolTip.SetToolTip(this.importInstanceButton, "Import files in QAPLIB format.");
    91       this.importInstanceButton.UseVisualStyleBackColor = true;
    92       this.importInstanceButton.Click += new System.EventHandler(this.importInstanceButton_Click);
    93       //
    9477      // openFileDialog
    9578      //
     
    9780      this.openFileDialog.Filter = "Dat files|*.dat|All files|*.*";
    9881      //
    99       // QAPLIBInstancesLabel
    100       //
    101       this.QAPLIBInstancesLabel.AutoSize = true;
    102       this.QAPLIBInstancesLabel.Cursor = System.Windows.Forms.Cursors.Hand;
    103       this.QAPLIBInstancesLabel.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Underline, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
    104       this.QAPLIBInstancesLabel.ForeColor = System.Drawing.Color.Blue;
    105       this.QAPLIBInstancesLabel.Location = new System.Drawing.Point(3, 5);
    106       this.QAPLIBInstancesLabel.Name = "QAPLIBInstancesLabel";
    107       this.QAPLIBInstancesLabel.Size = new System.Drawing.Size(96, 13);
    108       this.QAPLIBInstancesLabel.TabIndex = 6;
    109       this.QAPLIBInstancesLabel.Text = "QAPLIB instances:";
    110       this.toolTip.SetToolTip(this.QAPLIBInstancesLabel, "These instances were taken from the QAPLIB homepage at http://www.seas.upenn.edu/" +
    111               "qaplib/");
    112       this.QAPLIBInstancesLabel.Click += new System.EventHandler(this.QAPLIBInstancesLabel_Click);
    113       this.QAPLIBInstancesLabel.MouseEnter += new System.EventHandler(this.QAPLIBInstancesLabel_MouseEnter);
    114       this.QAPLIBInstancesLabel.MouseLeave += new System.EventHandler(this.QAPLIBInstancesLabel_MouseLeave);
    115       //
    116       // instancesComboBox
    117       //
    118       this.instancesComboBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
    119                   | System.Windows.Forms.AnchorStyles.Right)));
    120       this.instancesComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
    121       this.instancesComboBox.FormattingEnabled = true;
    122       this.instancesComboBox.Location = new System.Drawing.Point(105, 2);
    123       this.instancesComboBox.Name = "instancesComboBox";
    124       this.instancesComboBox.Size = new System.Drawing.Size(358, 21);
    125       this.instancesComboBox.TabIndex = 7;
    126       this.instancesComboBox.SelectedValueChanged += new System.EventHandler(this.instancesComboBox_SelectedValueChanged);
    127       //
    128       // loadInstanceButton
    129       //
    130       this.loadInstanceButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
    131       this.loadInstanceButton.Location = new System.Drawing.Point(469, 0);
    132       this.loadInstanceButton.Name = "loadInstanceButton";
    133       this.loadInstanceButton.Size = new System.Drawing.Size(73, 23);
    134       this.loadInstanceButton.TabIndex = 5;
    135       this.loadInstanceButton.Text = "Load";
    136       this.loadInstanceButton.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText;
    137       this.toolTip.SetToolTip(this.loadInstanceButton, "Load the selected QAPLIB instance.");
    138       this.loadInstanceButton.UseVisualStyleBackColor = true;
    139       this.loadInstanceButton.Click += new System.EventHandler(this.loadInstanceButton_Click);
    140       //
    14182      // tabControl
    14283      //
    143       this.tabControl.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
    144                   | System.Windows.Forms.AnchorStyles.Left)
    145                   | 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)));
    14687      this.tabControl.Controls.Add(this.problemTabPage);
    14788      this.tabControl.Controls.Add(this.visualizationTabPage);
     
    188129      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
    189130      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
    190       this.Controls.Add(this.instancesComboBox);
    191131      this.Controls.Add(this.tabControl);
    192       this.Controls.Add(this.importInstanceButton);
    193       this.Controls.Add(this.loadInstanceButton);
    194       this.Controls.Add(this.QAPLIBInstancesLabel);
    195132      this.Name = "QuadraticAssignmentProblemView";
    196133      this.Size = new System.Drawing.Size(647, 492);
    197       this.Controls.SetChildIndex(this.QAPLIBInstancesLabel, 0);
    198       this.Controls.SetChildIndex(this.loadInstanceButton, 0);
    199       this.Controls.SetChildIndex(this.importInstanceButton, 0);
    200134      this.Controls.SetChildIndex(this.tabControl, 0);
    201       this.Controls.SetChildIndex(this.instancesComboBox, 0);
    202135      this.Controls.SetChildIndex(this.infoLabel, 0);
    203136      this.Controls.SetChildIndex(this.parameterCollectionView, 0);
     
    214147    #endregion
    215148
    216     private System.Windows.Forms.Button importInstanceButton;
    217149    private System.Windows.Forms.OpenFileDialog openFileDialog;
    218     private System.Windows.Forms.Label QAPLIBInstancesLabel;
    219     private System.Windows.Forms.ComboBox instancesComboBox;
    220     private System.Windows.Forms.Button loadInstanceButton;
    221150    private System.Windows.Forms.TabControl tabControl;
    222151    private System.Windows.Forms.TabPage problemTabPage;
  • branches/HeuristicLab.TimeSeries/HeuristicLab.Problems.QuadraticAssignment.Views/3.3/QuadraticAssignmentProblemView.cs

    r7268 r7615  
    2121
    2222using System;
    23 using System.Drawing;
    24 using System.IO;
    2523using System.Windows.Forms;
    26 using HeuristicLab.Common.Resources;
    27 using HeuristicLab.Core.Views;
    2824using HeuristicLab.MainForm;
    2925using HeuristicLab.MainForm.WindowsForms;
     26using HeuristicLab.Optimization.Views;
    3027
    3128namespace HeuristicLab.Problems.QuadraticAssignment.Views {
    3229  [View("Quadratic Assignment Problem View")]
    3330  [Content(typeof(QuadraticAssignmentProblem), IsDefaultView = true)]
    34   public sealed partial class QuadraticAssignmentProblemView : ParameterizedNamedItemView {
     31  public sealed partial class QuadraticAssignmentProblemView : HeuristicOptimizationProblemView {
    3532    public new QuadraticAssignmentProblem Content {
    3633      get { return (QuadraticAssignmentProblem)base.Content; }
     
    4037    public QuadraticAssignmentProblemView() {
    4138      InitializeComponent();
    42       importInstanceButton.Image = VSImageLibrary.Open;
    4339      Controls.Remove(parameterCollectionView);
    4440      parameterCollectionView.Dock = DockStyle.Fill;
     
    7470    protected override void OnContentChanged() {
    7571      base.OnContentChanged();
    76       instancesComboBox.Items.Clear();
    7772      if (Content != null) {
    78         foreach (string instance in Content.Instances) {
    79           instancesComboBox.Items.Add(instance);
    80         }
    8173        qapView.Distances = Content.Distances;
    8274        qapView.Weights = Content.Weights;
     
    9183    protected override void SetEnabledStateOfControls() {
    9284      base.SetEnabledStateOfControls();
    93       instancesComboBox.Enabled = !ReadOnly && !Locked && Content != null;
    94       loadInstanceButton.Enabled = !ReadOnly && !Locked && Content != null && instancesComboBox.SelectedItem != null;
    95       importInstanceButton.Enabled = !ReadOnly && !Locked && Content != null;
    96     }
    97 
    98     private void instancesComboBox_SelectedValueChanged(object sender, System.EventArgs e) {
    99       loadInstanceButton.Enabled = instancesComboBox.SelectedItem != null;
    100     }
    101 
    102     private void loadInstanceButton_Click(object sender, System.EventArgs e) {
    103       string instance = instancesComboBox.SelectedItem as string;
    104       try {
    105         Content.LoadInstanceFromEmbeddedResource(instance);
    106       } catch (Exception ex) {
    107         PluginInfrastructure.ErrorHandling.ShowErrorDialog(ex);
    108       }
    109     }
    110 
    111     private void importInstanceButton_Click(object sender, System.EventArgs e) {
    112       if (openFileDialog.ShowDialog() == DialogResult.OK) {
    113         try {
    114           string datFile = openFileDialog.FileName;
    115           string directory = Path.GetDirectoryName(datFile);
    116           string solFile = Path.Combine(directory, Path.GetFileNameWithoutExtension(datFile) + ".sln");
    117           if (File.Exists(solFile)) {
    118             Content.LoadInstanceFromFile(datFile, solFile);
    119           } else {
    120             Content.LoadInstanceFromFile(datFile);
    121           }
    122         } catch (Exception ex) {
    123           PluginInfrastructure.ErrorHandling.ShowErrorDialog(ex);
    124         }
    125       }
    126     }
    127 
    128     private void QAPLIBInstancesLabel_Click(object sender, System.EventArgs e) {
    129       System.Diagnostics.Process.Start("http://www.seas.upenn.edu/qaplib/");
    130     }
    131 
    132     private void QAPLIBInstancesLabel_MouseEnter(object sender, EventArgs e) {
    133       Cursor = Cursors.Hand;
    134       QAPLIBInstancesLabel.ForeColor = Color.Red;
    135       toolTip.SetToolTip(QAPLIBInstancesLabel, "Browse to http://www.seas.upenn.edu/qaplib/");
    136     }
    137 
    138     private void QAPLIBInstancesLabel_MouseLeave(object sender, EventArgs e) {
    139       Cursor = Cursors.Default;
    140       QAPLIBInstancesLabel.ForeColor = Color.Blue;
    141       toolTip.SetToolTip(QAPLIBInstancesLabel, String.Empty);
    14285    }
    14386  }
Note: See TracChangeset for help on using the changeset viewer.