Changeset 8031 for trunk/sources
- Timestamp:
- 06/18/12 11:00:27 (12 years ago)
- Location:
- trunk/sources/HeuristicLab.Problems.Instances.Views/3.3
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Problems.Instances.Views/3.3/ProblemInstanceConsumerViewGeneric.cs
r7956 r8031 69 69 importButton.Text = String.Empty; 70 70 importButton.Image = VSImageLibrary.Open; 71 toolTip.SetToolTip(importButton, "Open a " + GetProblemType() + " problem from file.");72 71 exportButton.Text = String.Empty; 73 72 exportButton.Image = VSImageLibrary.SaveAs; 74 toolTip.SetToolTip(exportButton, "Export currently loaded " + GetProblemType() + " problem to a file.");75 73 libraryInfoButton.Text = String.Empty; 76 74 libraryInfoButton.Image = VSImageLibrary.Help; … … 160 158 161 159 protected string GetProblemType() { 162 string dataTypeName = typeof(T).Name.Split(new char[] { '.' }, StringSplitOptions.RemoveEmptyEntries).Last(); 163 if (dataTypeName.EndsWith("Data")) 164 return dataTypeName.Substring(0, dataTypeName.Length - "Data".Length); 165 else return dataTypeName; 160 return SelectedProvider.Name; 166 161 } 167 162 … … 169 164 protected void SetTooltip() { 170 165 toolTip.SetToolTip(problemInstanceProviderComboBox, GetProviderToolTip()); 166 toolTip.SetToolTip(importButton, "Open a " + GetProblemType() + " problem from file."); 167 toolTip.SetToolTip(exportButton, "Export currently loaded " + GetProblemType() + " problem to a file."); 171 168 if (SelectedProvider.WebLink != null) 172 169 toolTip.SetToolTip(libraryInfoButton, "Browse to " + SelectedProvider.WebLink.ToString()); -
trunk/sources/HeuristicLab.Problems.Instances.Views/3.3/ProblemInstanceProviderViewGeneric.Designer.cs
r7967 r8031 85 85 this.instancesComboBox.TabIndex = 7; 86 86 this.instancesComboBox.DataSourceChanged += new System.EventHandler(this.instancesComboBox_DataSourceChanged); 87 this.instancesComboBox.SelectedIndexChanged += new System.EventHandler(this.instancesComboBox_SelectedIndexChanged); 87 88 // 88 89 // openFileDialog -
trunk/sources/HeuristicLab.Problems.Instances.Views/3.3/ProblemInstanceProviderViewGeneric.cs
r7956 r8031 65 65 ShowInstanceLoad(dataDescriptors.Count() > 0); 66 66 instancesComboBox.DataSource = dataDescriptors; 67 instancesComboBox.SelectedIndex = -1; 67 68 } 68 69 } … … 83 84 base.SetEnabledStateOfControls(); 84 85 instancesComboBox.Enabled = !ReadOnly && !Locked && Content != null && GenericConsumer != null; 85 loadButton.Enabled = !ReadOnly && !Locked && Content != null && GenericConsumer != null ;86 loadButton.Enabled = !ReadOnly && !Locked && Content != null && GenericConsumer != null && instancesComboBox.SelectedIndex >= 0; 86 87 } 87 88 … … 102 103 comboBox.Items.Clear(); 103 104 } 105 106 private void instancesComboBox_SelectedIndexChanged(object sender, System.EventArgs e) { 107 SetEnabledStateOfControls(); 108 } 104 109 } 105 110 }
Note: See TracChangeset
for help on using the changeset viewer.