Changeset 7482
- Timestamp:
- 02/17/12 21:23:36 (13 years ago)
- 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 89 89 </ItemGroup> 90 90 <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" /> 91 98 <Compile Include="ProblemInstanceProviderView.cs"> 92 99 <SubType>UserControl</SubType> … … 132 139 </ItemGroup> 133 140 <ItemGroup> 141 <EmbeddedResource Include="CustomComboBox.resx"> 142 <DependentUpon>CustomComboBox.cs</DependentUpon> 143 </EmbeddedResource> 134 144 <EmbeddedResource Include="ProblemInstanceProviderView.resx"> 135 145 <DependentUpon>ProblemInstanceProviderView.cs</DependentUpon> -
branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment.Views/3.3/ProblemView.Designer.cs
r7448 r7482 46 46 private void InitializeComponent() { 47 47 this.label1 = new System.Windows.Forms.Label(); 48 this.problemInstanceProviderComboBox = new System.Windows.Forms.ComboBox();49 48 this.problemInstanceProviderViewHost = new HeuristicLab.MainForm.WindowsForms.ViewHost(); 49 this.problemInstanceProviderComboBox = new HeuristicLab.Problems.GeneralizedQuadraticAssignment.Views.ToolTipComboBox(); 50 50 ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).BeginInit(); 51 51 this.SuspendLayout(); … … 67 67 this.nameLabel.Location = new System.Drawing.Point(3, 35); 68 68 // 69 // toolTip 70 // 71 this.toolTip.AutoPopDelay = 10000; 72 this.toolTip.InitialDelay = 100; 73 this.toolTip.ReshowDelay = 100; 74 // 69 75 // infoLabel 70 76 // … … 79 85 this.label1.TabIndex = 4; 80 86 this.label1.Text = "Library:"; 81 //82 // problemInstanceProviderComboBox83 //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);92 87 // 93 88 // problemInstanceProviderViewHost … … 105 100 this.problemInstanceProviderViewHost.ViewsLabelVisible = false; 106 101 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); 107 115 // 108 116 // ProblemView … … 131 139 132 140 private System.Windows.Forms.Label label1; 133 private System.Windows.Forms.ComboBox problemInstanceProviderComboBox;134 141 private MainForm.WindowsForms.ViewHost problemInstanceProviderViewHost; 142 private ToolTipComboBox problemInstanceProviderComboBox; 135 143 136 144 } -
branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment.Views/3.3/ProblemView.cs
r7448 r7482 61 61 62 62 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 } 66 69 } 67 70 … … 88 91 } 89 92 } 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 } 90 105 } 91 106 } -
branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment.Views/3.3/ProblemView.resx
r7448 r7482 121 121 <value>107, 17</value> 122 122 </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>126 123 <metadata name="toolTip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> 127 124 <value>17, 17</value> -
branches/GeneralizedQAP/HeuristicLab.Problems.Instances.ElloumiCTAP/3.3/ElloumiCTAPInstanceProvider.cs
r7466 r7482 37 37 } 38 38 39 public override Uri Link {39 public override Uri WebLink { 40 40 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. 46 Contribution for solving non linear programs with o-1 variables, application to task assignment problems in distributed systems. 47 PhD Thesis. Conservatoire National des Arts et Métiers, Paris."; 48 } 41 49 } 42 50 -
branches/GeneralizedQAP/HeuristicLab.Problems.Instances.QAPLIB/3.3/QAPLIBInstanceProvider.cs
r7466 r7482 37 37 } 38 38 39 public override Uri Link {39 public override Uri WebLink { 40 40 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. 46 QAPLIB - A Quadratic Assignment Problem Library. 47 Journal of Global Optimization, 10, pp. 391-403."; 48 } 41 49 } 42 50 -
branches/GeneralizedQAP/HeuristicLab.Problems.Instances.TSPLIB/3.3/TSPLIBATSPInstanceProvider.cs
r7466 r7482 29 29 namespace HeuristicLab.Problems.Instances.TSPLIB { 30 30 public class TSPLIBATSPInstanceProvider : ProblemInstanceProvider<IATSPInstance> { 31 31 32 32 public override string Name { 33 33 get { return "TSPLIB (asymmetric TSP)"; } … … 38 38 } 39 39 40 public override Uri Link {40 public override Uri WebLink { 41 41 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. 47 TSPLIB - A Traveling Salesman Problem Library. 48 ORSA Journal on Computing, 3, pp. 376-384."; 49 } 42 50 } 43 51 -
branches/GeneralizedQAP/HeuristicLab.Problems.Instances.TSPLIB/3.3/TSPLIBCVRPInstanceProvider.cs
r7466 r7482 29 29 namespace HeuristicLab.Problems.Instances.TSPLIB { 30 30 public class TSPLIBCVRPInstanceProvider : ProblemInstanceProvider<ICVRPInstance> { 31 31 32 32 public override string Name { 33 33 get { return "TSPLIB (CVRP)"; } … … 38 38 } 39 39 40 public override Uri Link {40 public override Uri WebLink { 41 41 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. 47 TSPLIB - A Traveling Salesman Problem Library. 48 ORSA Journal on Computing, 3, pp. 376-384."; 49 } 42 50 } 43 51 -
branches/GeneralizedQAP/HeuristicLab.Problems.Instances.TSPLIB/3.3/TSPLIBTSPInstanceProvider.cs
r7470 r7482 38 38 } 39 39 40 public override Uri Link {40 public override Uri WebLink { 41 41 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. 47 TSPLIB - A Traveling Salesman Problem Library. 48 ORSA Journal on Computing, 3, pp. 376-384."; 49 } 42 50 } 43 51 -
branches/GeneralizedQAP/HeuristicLab.Problems.Instances/3.3/IProblemInstanceProvider.cs
r7466 r7482 28 28 string Name { get; } 29 29 string Description { get; } 30 Uri Link { get; } 30 Uri WebLink { get; } 31 string ReferencePublication { get; } 31 32 32 33 bool ConsumerCanBeFed { get; } -
branches/GeneralizedQAP/HeuristicLab.Problems.Instances/3.3/ProblemInstanceProvider.cs
r7466 r7482 29 29 public abstract string Name { get; } 30 30 public abstract string Description { get; } 31 public abstract Uri Link { get; } 31 public abstract Uri WebLink { get; } 32 public abstract string ReferencePublication { get; } 32 33 33 34 public bool ConsumerCanBeFed {
Note: See TracChangeset
for help on using the changeset viewer.