Changeset 7482 for branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment.Views/3.3/ProblemView.cs
- Timestamp:
- 02/17/12 21:23:36 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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 }
Note: See TracChangeset
for help on using the changeset viewer.