Ignore:
Timestamp:
11/14/12 14:53:33 (9 years ago)
Author:
abeham
Message:

#1841:

  • Added a tooltip to the ProblemInstanceProviderView
  • Used tooltip to display a description of the selected instance
  • Made public member consumer private
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Problems.Instances.Views/3.3/ProblemInstanceProviderViewGeneric.cs

    r8201 r8912  
    2121
    2222using System;
    23 using System.Collections.Generic;
    2423using System.Linq;
    2524using System.Windows.Forms;
     
    4039    private IProblemInstanceConsumer<T> GenericConsumer { get { return Consumer as IProblemInstanceConsumer<T>; } }
    4140
    42     public IProblemInstanceConsumer consumer;
     41    private IProblemInstanceConsumer consumer;
    4342    public override IProblemInstanceConsumer Consumer {
    4443      get { return consumer; }
     
    5958      } else {
    6059        instancesComboBox.DisplayMember = "Name";
    61         IEnumerable<IDataDescriptor> dataDescriptors = Content.GetDataDescriptors().ToList();
    62         ShowInstanceLoad(dataDescriptors.Count() > 0);
     60        var dataDescriptors = Content.GetDataDescriptors().ToList();
     61        ShowInstanceLoad(dataDescriptors.Any());
    6362        instancesComboBox.DataSource = dataDescriptors;
    6463        instancesComboBox.SelectedIndex = -1;
     
    8584      if (comboBox.DataSource == null)
    8685        comboBox.Items.Clear();
     86      toolTip.SetToolTip(comboBox, String.Empty);
    8787    }
    8888
     
    9393        try {
    9494          GenericConsumer.Load(instance);
    95         }
    96         catch (Exception ex) {
     95        } catch (Exception ex) {
    9796          ErrorHandling.ShowErrorDialog(String.Format("This problem does not support loading the instance {0}", descriptor.Name), ex);
    9897        }
    99       }
     98        toolTip.SetToolTip(instancesComboBox, descriptor.Description);
     99      } else toolTip.SetToolTip(instancesComboBox, String.Empty);
    100100    }
    101101  }
Note: See TracChangeset for help on using the changeset viewer.