- Timestamp:
- 04/21/10 07:17:21 (15 years ago)
- Location:
- trunk/sources
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Core.Views/3.3/ItemArrayView.cs
r3455 r3456 196 196 #region ListView Events 197 197 protected virtual void itemsListView_SelectedIndexChanged(object sender, EventArgs e) { 198 addButton.Enabled = itemsListView.SelectedItems.Count > 0 && !Content.IsReadOnly && !ReadOnly;198 addButton.Enabled = itemsListView.SelectedItems.Count > 0 && (Content != null) && !Content.IsReadOnly && !ReadOnly; 199 199 moveUpButton.Enabled = itemsListView.SelectedItems.Count == 1 && 200 200 itemsListView.SelectedIndices[0] != 0 && 201 !Content.IsReadOnly && !ReadOnly;201 (Content != null) && !Content.IsReadOnly && !ReadOnly; 202 202 moveDownButton.Enabled = itemsListView.SelectedItems.Count == 1 && 203 203 itemsListView.SelectedIndices[0] != itemsListView.Items.Count - 1 && 204 !Content.IsReadOnly && !ReadOnly;205 removeButton.Enabled = itemsListView.SelectedItems.Count > 0 && !Content.IsReadOnly && !ReadOnly;204 (Content != null) && !Content.IsReadOnly && !ReadOnly; 205 removeButton.Enabled = itemsListView.SelectedItems.Count > 0 && (Content != null) && !Content.IsReadOnly && !ReadOnly; 206 206 207 207 if (itemsListView.SelectedItems.Count == 1) { -
trunk/sources/HeuristicLab.Core.Views/3.3/ItemCollectionView.cs
r3455 r3456 167 167 #region ListView Events 168 168 protected virtual void itemsListView_SelectedIndexChanged(object sender, EventArgs e) { 169 removeButton.Enabled = !Content.IsReadOnly && !ReadOnly && itemsListView.SelectedItems.Count > 0;169 removeButton.Enabled = (Content != null) && !Content.IsReadOnly && !ReadOnly && itemsListView.SelectedItems.Count > 0; 170 170 if (itemsListView.SelectedItems.Count == 1) { 171 171 T item = (T)itemsListView.SelectedItems[0].Tag; -
trunk/sources/HeuristicLab.Core.Views/3.3/ItemListView.cs
r3455 r3456 193 193 moveUpButton.Enabled = itemsListView.SelectedItems.Count == 1 && 194 194 itemsListView.SelectedIndices[0] != 0 && 195 !Content.IsReadOnly && !ReadOnly;195 (Content != null) && !Content.IsReadOnly && !ReadOnly; 196 196 moveDownButton.Enabled = itemsListView.SelectedItems.Count == 1 && 197 197 itemsListView.SelectedIndices[0] != itemsListView.Items.Count - 1 && 198 !Content.IsReadOnly && !ReadOnly;198 (Content != null) && !Content.IsReadOnly && !ReadOnly; 199 199 removeButton.Enabled = itemsListView.SelectedItems.Count > 0 && 200 !Content.IsReadOnly && !ReadOnly;200 (Content != null) && !Content.IsReadOnly && !ReadOnly; 201 201 202 202 if (itemsListView.SelectedItems.Count == 1) { -
trunk/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionView.cs
r3455 r3456 163 163 #region ListView Events 164 164 protected virtual void itemsListView_SelectedIndexChanged(object sender, EventArgs e) { 165 removeButton.Enabled = itemsListView.SelectedItems.Count > 0 && !Content.IsReadOnly && !ReadOnly;165 removeButton.Enabled = itemsListView.SelectedItems.Count > 0 && (Content != null) && !Content.IsReadOnly && !ReadOnly; 166 166 if (itemsListView.SelectedItems.Count == 1) { 167 167 IRun item = (IRun)itemsListView.SelectedItems[0].Tag;
Note: See TracChangeset
for help on using the changeset viewer.