Free cookie consent management tool by TermsFeed Policy Generator

Changeset 7482


Ignore:
Timestamp:
02/17/12 21:23:36 (13 years ago)
Author:
abeham
Message:

#1614

  • Added a property ReferencePublication
  • Added a custom combobox that can display a tooltip for each item
  • Added tooltip for the different providers stating link and reference publication
Location:
branches/GeneralizedQAP
Files:
4 added
11 edited

Legend:

Unmodified
Added
Removed
  • branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment.Views/3.3/HeuristicLab.Problems.GeneralizedQuadraticAssignment.Views-3.3.csproj

    r7470 r7482  
    8989  </ItemGroup>
    9090  <ItemGroup>
     91    <Compile Include="CustomComboBox.cs">
     92      <SubType>Component</SubType>
     93    </Compile>
     94    <Compile Include="CustomComboBox.Designer.cs">
     95      <DependentUpon>CustomComboBox.cs</DependentUpon>
     96    </Compile>
     97    <Compile Include="ToolTipRequiredEventArgs.cs" />
    9198    <Compile Include="ProblemInstanceProviderView.cs">
    9299      <SubType>UserControl</SubType>
     
    132139  </ItemGroup>
    133140  <ItemGroup>
     141    <EmbeddedResource Include="CustomComboBox.resx">
     142      <DependentUpon>CustomComboBox.cs</DependentUpon>
     143    </EmbeddedResource>
    134144    <EmbeddedResource Include="ProblemInstanceProviderView.resx">
    135145      <DependentUpon>ProblemInstanceProviderView.cs</DependentUpon>
  • branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment.Views/3.3/ProblemView.Designer.cs

    r7448 r7482  
    4646    private void InitializeComponent() {
    4747      this.label1 = new System.Windows.Forms.Label();
    48       this.problemInstanceProviderComboBox = new System.Windows.Forms.ComboBox();
    4948      this.problemInstanceProviderViewHost = new HeuristicLab.MainForm.WindowsForms.ViewHost();
     49      this.problemInstanceProviderComboBox = new HeuristicLab.Problems.GeneralizedQuadraticAssignment.Views.ToolTipComboBox();
    5050      ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).BeginInit();
    5151      this.SuspendLayout();
     
    6767      this.nameLabel.Location = new System.Drawing.Point(3, 35);
    6868      //
     69      // toolTip
     70      //
     71      this.toolTip.AutoPopDelay = 10000;
     72      this.toolTip.InitialDelay = 100;
     73      this.toolTip.ReshowDelay = 100;
     74      //
    6975      // infoLabel
    7076      //
     
    7985      this.label1.TabIndex = 4;
    8086      this.label1.Text = "Library:";
    81       //
    82       // problemInstanceProviderComboBox
    83       //
    84       this.problemInstanceProviderComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
    85       this.problemInstanceProviderComboBox.FormattingEnabled = true;
    86       this.problemInstanceProviderComboBox.Location = new System.Drawing.Point(50, 5);
    87       this.problemInstanceProviderComboBox.Name = "problemInstanceProviderComboBox";
    88       this.problemInstanceProviderComboBox.Size = new System.Drawing.Size(173, 21);
    89       this.problemInstanceProviderComboBox.TabIndex = 5;
    90       this.problemInstanceProviderComboBox.SelectedIndexChanged += new System.EventHandler(this.problemInstanceProviderComboBox_SelectedIndexChanged);
    91       this.problemInstanceProviderComboBox.DataSourceChanged += new System.EventHandler(this.comboBox_DataSourceChanged);
    9287      //
    9388      // problemInstanceProviderViewHost
     
    105100      this.problemInstanceProviderViewHost.ViewsLabelVisible = false;
    106101      this.problemInstanceProviderViewHost.ViewType = null;
     102      //
     103      // problemInstanceProviderComboBox
     104      //
     105      this.problemInstanceProviderComboBox.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed;
     106      this.problemInstanceProviderComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
     107      this.problemInstanceProviderComboBox.FormattingEnabled = true;
     108      this.problemInstanceProviderComboBox.Location = new System.Drawing.Point(50, 5);
     109      this.problemInstanceProviderComboBox.Name = "problemInstanceProviderComboBox";
     110      this.problemInstanceProviderComboBox.Size = new System.Drawing.Size(173, 21);
     111      this.problemInstanceProviderComboBox.TabIndex = 7;
     112      this.problemInstanceProviderComboBox.ToolTipRequired += new System.EventHandler<HeuristicLab.Problems.GeneralizedQuadraticAssignment.Views.ToolTipRequiredEventArgs>(this.problemInstanceProviderComboBox_ToolTipRequired);
     113      this.problemInstanceProviderComboBox.SelectedIndexChanged += new System.EventHandler(this.problemInstanceProviderComboBox_SelectedIndexChanged);
     114      this.problemInstanceProviderComboBox.DataSourceChanged += new System.EventHandler(this.comboBox_DataSourceChanged);
    107115      //
    108116      // ProblemView
     
    131139
    132140    private System.Windows.Forms.Label label1;
    133     private System.Windows.Forms.ComboBox problemInstanceProviderComboBox;
    134141    private MainForm.WindowsForms.ViewHost problemInstanceProviderViewHost;
     142    private ToolTipComboBox problemInstanceProviderComboBox;
    135143
    136144  }
  • branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment.Views/3.3/ProblemView.cs

    r7448 r7482  
    6161
    6262    private void problemInstanceProviderComboBox_SelectedIndexChanged(object sender, System.EventArgs e) {
    63       var provider = (IProblemInstanceProvider)problemInstanceProviderComboBox.SelectedItem;
    64       provider.SetConsumer((IProblemInstanceConsumer)Content);
    65       problemInstanceProviderViewHost.Content = provider;
     63      if (problemInstanceProviderComboBox.SelectedIndex >= 0) {
     64        var provider = (IProblemInstanceProvider)problemInstanceProviderComboBox.SelectedItem;
     65        provider.SetConsumer((IProblemInstanceConsumer)Content);
     66        problemInstanceProviderViewHost.Content = provider;
     67        toolTip.SetToolTip(problemInstanceProviderComboBox, GetProviderToolTip(provider));
     68      }
    6669    }
    6770
     
    8891      }
    8992    }
     93
     94    protected virtual string GetProviderToolTip(IProblemInstanceProvider provider) {
     95      return provider.Name
     96          + Environment.NewLine
     97          + provider.WebLink.ToString()
     98          + Environment.NewLine + Environment.NewLine
     99          + provider.ReferencePublication;
     100    }
     101
     102    private void problemInstanceProviderComboBox_ToolTipRequired(object sender, ToolTipRequiredEventArgs e) {
     103      e.ToolTip = GetProviderToolTip((IProblemInstanceProvider)e.Item);
     104    }
    90105  }
    91106}
  • branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment.Views/3.3/ProblemView.resx

    r7448 r7482  
    121121    <value>107, 17</value>
    122122  </metadata>
    123   <metadata name="errorProvider.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
    124     <value>107, 17</value>
    125   </metadata>
    126123  <metadata name="toolTip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
    127124    <value>17, 17</value>
  • branches/GeneralizedQAP/HeuristicLab.Problems.Instances.ElloumiCTAP/3.3/ElloumiCTAPInstanceProvider.cs

    r7466 r7482  
    3737    }
    3838
    39     public override Uri Link {
     39    public override Uri WebLink {
    4040      get { return new Uri("http://cedric.cnam.fr/oc/TAP/TAP.html"); }
     41    }
     42
     43    public override string ReferencePublication {
     44      get {
     45        return @"Elloumi, S. 1991.
     46Contribution for solving non linear programs with o-1 variables, application to task assignment problems in distributed systems.
     47PhD Thesis. Conservatoire National des Arts et Métiers, Paris.";
     48      }
    4149    }
    4250
  • branches/GeneralizedQAP/HeuristicLab.Problems.Instances.QAPLIB/3.3/QAPLIBInstanceProvider.cs

    r7466 r7482  
    3737    }
    3838
    39     public override Uri Link {
     39    public override Uri WebLink {
    4040      get { return new Uri("http://www.seas.upenn.edu/qaplib/"); }
     41    }
     42
     43    public override string ReferencePublication {
     44      get {
     45        return @"R. E. Burkard, S. E. Karisch, and F. Rendl. 1997.
     46QAPLIB - A Quadratic Assignment Problem Library.
     47Journal of Global Optimization, 10, pp. 391-403.";
     48      }
    4149    }
    4250
  • branches/GeneralizedQAP/HeuristicLab.Problems.Instances.TSPLIB/3.3/TSPLIBATSPInstanceProvider.cs

    r7466 r7482  
    2929namespace HeuristicLab.Problems.Instances.TSPLIB {
    3030  public class TSPLIBATSPInstanceProvider : ProblemInstanceProvider<IATSPInstance> {
    31    
     31
    3232    public override string Name {
    3333      get { return "TSPLIB (asymmetric TSP)"; }
     
    3838    }
    3939
    40     public override Uri Link {
     40    public override Uri WebLink {
    4141      get { return new Uri("http://comopt.ifi.uni-heidelberg.de/software/TSPLIB95/"); }
     42    }
     43
     44    public override string ReferencePublication {
     45      get {
     46        return @"G. Reinelt. 1991.
     47TSPLIB - A Traveling Salesman Problem Library.
     48ORSA Journal on Computing, 3, pp. 376-384.";
     49      }
    4250    }
    4351
  • branches/GeneralizedQAP/HeuristicLab.Problems.Instances.TSPLIB/3.3/TSPLIBCVRPInstanceProvider.cs

    r7466 r7482  
    2929namespace HeuristicLab.Problems.Instances.TSPLIB {
    3030  public class TSPLIBCVRPInstanceProvider : ProblemInstanceProvider<ICVRPInstance> {
    31    
     31
    3232    public override string Name {
    3333      get { return "TSPLIB (CVRP)"; }
     
    3838    }
    3939
    40     public override Uri Link {
     40    public override Uri WebLink {
    4141      get { return new Uri("http://comopt.ifi.uni-heidelberg.de/software/TSPLIB95/"); }
     42    }
     43
     44    public override string ReferencePublication {
     45      get {
     46        return @"G. Reinelt. 1991.
     47TSPLIB - A Traveling Salesman Problem Library.
     48ORSA Journal on Computing, 3, pp. 376-384.";
     49      }
    4250    }
    4351
  • branches/GeneralizedQAP/HeuristicLab.Problems.Instances.TSPLIB/3.3/TSPLIBTSPInstanceProvider.cs

    r7470 r7482  
    3838    }
    3939
    40     public override Uri Link {
     40    public override Uri WebLink {
    4141      get { return new Uri("http://comopt.ifi.uni-heidelberg.de/software/TSPLIB95/"); }
     42    }
     43
     44    public override string ReferencePublication {
     45      get {
     46        return @"G. Reinelt. 1991.
     47TSPLIB - A Traveling Salesman Problem Library.
     48ORSA Journal on Computing, 3, pp. 376-384.";
     49      }
    4250    }
    4351
  • branches/GeneralizedQAP/HeuristicLab.Problems.Instances/3.3/IProblemInstanceProvider.cs

    r7466 r7482  
    2828    string Name { get; }
    2929    string Description { get; }
    30     Uri Link { get; }
     30    Uri WebLink { get; }
     31    string ReferencePublication { get; }
    3132
    3233    bool ConsumerCanBeFed { get; }
  • branches/GeneralizedQAP/HeuristicLab.Problems.Instances/3.3/ProblemInstanceProvider.cs

    r7466 r7482  
    2929    public abstract string Name { get; }
    3030    public abstract string Description { get; }
    31     public abstract Uri Link { get; }
     31    public abstract Uri WebLink { get; }
     32    public abstract string ReferencePublication { get; }
    3233
    3334    public bool ConsumerCanBeFed {
Note: See TracChangeset for help on using the changeset viewer.