Changeset 5302
- Timestamp:
- 01/16/11 03:14:15 (14 years ago)
- Location:
- trunk/sources
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Core.Views/3.3/ItemArrayView.cs
r5287 r5302 23 23 using System.Collections.Generic; 24 24 using System.Drawing; 25 using System.Linq; 25 26 using System.Windows.Forms; 26 27 using HeuristicLab.Collections; … … 139 140 try { 140 141 return (T)typeSelectorDialog.TypeSelector.CreateInstanceOfSelectedType(); 141 } catch (Exception ex) { 142 } 143 catch (Exception ex) { 142 144 ErrorHandling.ShowErrorDialog(this, ex); 143 145 } … … 213 215 return listViewItems; 214 216 } else { 215 return itemListViewItemMapping[item]; 217 List<ListViewItem> listViewItems = null; 218 itemListViewItemMapping.TryGetValue(item, out listViewItems); 219 return listViewItems == null ? Enumerable.Empty<ListViewItem>() : listViewItems; 216 220 } 217 221 } -
trunk/sources/HeuristicLab.Core.Views/3.3/ItemCollectionView.cs
r5287 r5302 128 128 try { 129 129 return (T)typeSelectorDialog.TypeSelector.CreateInstanceOfSelectedType(); 130 } catch (Exception ex) { 130 } 131 catch (Exception ex) { 131 132 ErrorHandling.ShowErrorDialog(this, ex); 132 133 } … … 195 196 return listViewItems; 196 197 } else { 197 return itemListViewItemMapping[item]; 198 List<ListViewItem> listViewItems = null; 199 itemListViewItemMapping.TryGetValue(item, out listViewItems); 200 return listViewItems == null ? Enumerable.Empty<ListViewItem>() : listViewItems; 198 201 } 199 202 } -
trunk/sources/HeuristicLab.Core.Views/3.3/ItemListView.cs
r5287 r5302 23 23 using System.Collections.Generic; 24 24 using System.Drawing; 25 using System.Linq; 25 26 using System.Windows.Forms; 26 27 using HeuristicLab.Collections; … … 142 143 try { 143 144 return (T)typeSelectorDialog.TypeSelector.CreateInstanceOfSelectedType(); 144 } catch (Exception ex) { 145 } 146 catch (Exception ex) { 145 147 ErrorHandling.ShowErrorDialog(this, ex); 146 148 } … … 216 218 return listViewItems; 217 219 } else { 218 return itemListViewItemMapping[item]; 220 List<ListViewItem> listViewItems = null; 221 itemListViewItemMapping.TryGetValue(item, out listViewItems); 222 return listViewItems == null ? Enumerable.Empty<ListViewItem>() : listViewItems; 219 223 } 220 224 } -
trunk/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionView.cs
r5287 r5302 216 216 return listViewItems; 217 217 } else { 218 return itemListViewItemMapping[item]; 218 List<ListViewItem> listViewItems = null; 219 itemListViewItemMapping.TryGetValue(item, out listViewItems); 220 return listViewItems == null ? Enumerable.Empty<ListViewItem>() : listViewItems; 219 221 } 220 222 }
Note: See TracChangeset
for help on using the changeset viewer.