Changeset 5371
- Timestamp:
- 01/25/11 13:23:45 (14 years ago)
- Location:
- trunk/sources
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Core.Views/3.3/ItemArrayView.cs
r5302 r5371 163 163 } 164 164 protected virtual void AddListViewItem(ListViewItem listViewItem) { 165 if (listViewItem == null) throw new ArgumentNullException(); 165 166 T item = (listViewItem.Tag as T); 166 167 itemsListView.Items.Add(listViewItem); … … 174 175 } 175 176 protected virtual void InsertListViewItem(int index, ListViewItem listViewItem) { 177 if (listViewItem == null) throw new ArgumentNullException(); 176 178 T item = (listViewItem.Tag as T); 177 179 itemsListView.Items.Insert(index, listViewItem); … … 185 187 } 186 188 protected virtual void RemoveListViewItem(ListViewItem listViewItem) { 189 if (listViewItem == null) throw new ArgumentNullException(); 187 190 T item = (listViewItem.Tag as T); 188 191 if (item != null) { … … 196 199 } 197 200 protected virtual void UpdateListViewItemImage(ListViewItem listViewItem) { 201 if (listViewItem == null) throw new ArgumentNullException(); 198 202 T item = listViewItem.Tag as T; 199 203 int i = listViewItem.ImageIndex; … … 203 207 } 204 208 protected virtual void UpdateListViewItemText(ListViewItem listViewItem) { 209 if (listViewItem == null) throw new ArgumentNullException(); 205 210 T item = listViewItem.Tag as T; 206 211 listViewItem.Text = item == null ? "null" : item.ToString(); -
trunk/sources/HeuristicLab.Core.Views/3.3/ItemCollectionView.cs
r5302 r5371 151 151 } 152 152 protected virtual void AddListViewItem(ListViewItem listViewItem) { 153 if (listViewItem == null) throw new ArgumentNullException(); 153 154 T item = (listViewItem.Tag as T); 154 155 itemsListView.Items.Add(listViewItem); … … 164 165 } 165 166 protected virtual void RemoveListViewItem(ListViewItem listViewItem) { 167 if (listViewItem == null) throw new ArgumentNullException(); 166 168 T item = (listViewItem.Tag as T); 167 169 if (item != null) { … … 177 179 } 178 180 protected virtual void UpdateListViewItemImage(ListViewItem listViewItem) { 181 if (listViewItem == null) throw new ArgumentNullException(); 179 182 T item = listViewItem.Tag as T; 180 183 int i = listViewItem.ImageIndex; … … 184 187 } 185 188 protected virtual void UpdateListViewItemText(ListViewItem listViewItem) { 189 if (listViewItem == null) throw new ArgumentNullException(); 186 190 T item = listViewItem.Tag as T; 187 191 listViewItem.Text = item == null ? "null" : item.ToString(); -
trunk/sources/HeuristicLab.Core.Views/3.3/ItemListView.cs
r5302 r5371 166 166 } 167 167 protected virtual void AddListViewItem(ListViewItem listViewItem) { 168 if (listViewItem == null) throw new ArgumentNullException(); 168 169 T item = (listViewItem.Tag as T); 169 170 itemsListView.Items.Add(listViewItem); … … 177 178 } 178 179 protected virtual void InsertListViewItem(int index, ListViewItem listViewItem) { 180 if (listViewItem == null) throw new ArgumentNullException(); 179 181 T item = (listViewItem.Tag as T); 180 182 itemsListView.Items.Insert(index, listViewItem); … … 188 190 } 189 191 protected virtual void RemoveListViewItem(ListViewItem listViewItem) { 192 if (listViewItem == null) throw new ArgumentNullException(); 190 193 T item = (listViewItem.Tag as T); 191 194 if (item != null) { … … 199 202 } 200 203 protected virtual void UpdateListViewItemImage(ListViewItem listViewItem) { 204 if (listViewItem == null) throw new ArgumentNullException(); 201 205 T item = listViewItem.Tag as T; 202 206 int i = listViewItem.ImageIndex; … … 206 210 } 207 211 protected virtual void UpdateListViewItemText(ListViewItem listViewItem) { 212 if (listViewItem == null) throw new ArgumentNullException(); 208 213 T item = listViewItem.Tag as T; 209 214 listViewItem.Text = item == null ? "null" : item.ToString(); -
trunk/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionView.cs
r5302 r5371 175 175 } 176 176 private void AddListViewItem(ListViewItem listViewItem) { 177 if (listViewItem == null) throw new ArgumentNullException(); 177 178 itemsListView.Items.Add(listViewItem); 178 179 IRun run = listViewItem.Tag as IRun; … … 186 187 } 187 188 private void RemoveListViewItem(ListViewItem listViewItem) { 189 if (listViewItem == null) throw new ArgumentNullException(); 188 190 IRun run = listViewItem.Tag as IRun; 189 191 if (run != null) { … … 197 199 } 198 200 private void UpdateListViewItemImage(ListViewItem listViewItem) { 201 if (listViewItem == null) throw new ArgumentNullException(); 199 202 IRun item = listViewItem.Tag as IRun; 200 203 int i = listViewItem.ImageIndex; … … 204 207 } 205 208 private void UpdateListViewItemText(ListViewItem listViewItem) { 209 if (listViewItem == null) throw new ArgumentNullException(); 206 210 IRun item = listViewItem.Tag as IRun; 207 211 listViewItem.Text = item == null ? "null" : item.ToString();
Note: See TracChangeset
for help on using the changeset viewer.