- Timestamp:
- 08/19/10 05:37:14 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Parameters.Views/3.3/ConstrainedValueParameterView.cs
r4068 r4257 23 23 using System.Collections.Generic; 24 24 using HeuristicLab.Collections; 25 using HeuristicLab.Common; 25 26 using HeuristicLab.Core; 26 27 using HeuristicLab.Core.Views; … … 85 86 FillValueComboBox(); 86 87 } else { 88 SetDataTypeTextBoxText(); 87 89 FillValueComboBox(); 88 90 viewHost.ViewType = null; … … 121 123 Invoke(new EventHandler(Content_ValueChanged), sender, e); 122 124 else { 123 valueComboBox.SelectedIndex = valueComboBoxItems.IndexOf(Content.Value); 125 SetDataTypeTextBoxText(); 126 valueComboBox.SelectedIndex = valueComboBoxItems.IndexOf(Content != null ? Content.Value : null); 124 127 viewHost.ViewType = null; 125 viewHost.Content = Content .Value;128 viewHost.Content = Content != null ? Content.Value : null; 126 129 } 127 130 } … … 150 153 Content.Value = valueComboBoxItems[valueComboBox.SelectedIndex]; 151 154 } 155 156 #region Helpers 157 protected void SetDataTypeTextBoxText() { 158 if (Content == null) { 159 dataTypeTextBox.Text = "-"; 160 } else { 161 if ((Content.Value != null) && (Content.Value.GetType() != Content.DataType)) 162 dataTypeTextBox.Text = Content.DataType.GetPrettyName() + " (" + Content.Value.GetType().GetPrettyName() + ")"; 163 else 164 dataTypeTextBox.Text = Content.DataType.GetPrettyName(); 165 } 166 } 167 #endregion 152 168 } 153 169 }
Note: See TracChangeset
for help on using the changeset viewer.