Changeset 5928
- Timestamp:
- 04/02/11 01:52:19 (14 years ago)
- Location:
- trunk/sources
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Collections/3.3/IObservableArray.cs
r5445 r5928 26 26 public interface IObservableArray<T> : IList<T>, INotifyObservableArrayItemsChanged<T>, INotifyPropertyChanged { 27 27 int Length { get; } 28 29 void Reverse(); 30 void Reverse(int index, int count); 28 31 } 29 32 } -
trunk/sources/HeuristicLab.Collections/3.3/IObservableList.cs
r5445 r5928 23 23 24 24 namespace HeuristicLab.Collections { 25 public interface IObservableList<T> : IList<T>, IObservableCollection<T>, INotifyObservableListItemsChanged<T> { } 25 public interface IObservableList<T> : IList<T>, IObservableCollection<T>, INotifyObservableListItemsChanged<T> { 26 void Reverse(); 27 void Reverse(int index, int count); 28 } 26 29 } -
trunk/sources/HeuristicLab.Collections/3.3/ReadOnlyObservableArray.cs
r5445 r5928 98 98 throw new NotSupportedException(); 99 99 } 100 101 void IObservableArray<T>.Reverse() { 102 throw new NotSupportedException(); 103 } 104 void IObservableArray<T>.Reverse(int index, int count) { 105 throw new NotSupportedException(); 106 } 100 107 #endregion 101 108 -
trunk/sources/HeuristicLab.Collections/3.3/ReadOnlyObservableList.cs
r5445 r5928 93 93 94 94 void ICollection<T>.Clear() { 95 throw new NotSupportedException(); 96 } 97 98 void IObservableList<T>.Reverse() { 99 throw new NotSupportedException(); 100 } 101 void IObservableList<T>.Reverse(int index, int count) { 95 102 throw new NotSupportedException(); 96 103 } -
trunk/sources/HeuristicLab.Core.Views/3.3/ItemArrayView.cs
r5839 r5928 337 337 if (itemsListView.SelectedItems.Count == 1) { 338 338 int index = itemsListView.SelectedIndices[0]; 339 T item = Content[index - 1]; 340 Content[index - 1] = Content[index]; 339 Content.Reverse(index - 1, 2); 341 340 itemsListView.Items[index].Selected = false; 342 341 itemsListView.Items[index - 1].Selected = true; 343 Content[index] = item;344 342 } 345 343 } … … 347 345 if (itemsListView.SelectedItems.Count == 1) { 348 346 int index = itemsListView.SelectedIndices[0]; 349 T item = Content[index + 1]; 350 Content[index + 1] = Content[index]; 347 Content.Reverse(index, 2); 351 348 itemsListView.Items[index].Selected = false; 352 349 itemsListView.Items[index + 1].Selected = true; 353 Content[index] = item;354 350 } 355 351 } -
trunk/sources/HeuristicLab.Core.Views/3.3/ItemListView.cs
r5839 r5928 352 352 if (itemsListView.SelectedItems.Count == 1) { 353 353 int index = itemsListView.SelectedIndices[0]; 354 T item = Content[index - 1]; 355 Content[index - 1] = Content[index]; 354 Content.Reverse(index - 1, 2); 356 355 itemsListView.Items[index].Selected = false; 357 356 itemsListView.Items[index - 1].Selected = true; 358 Content[index] = item;359 357 } 360 358 } … … 362 360 if (itemsListView.SelectedItems.Count == 1) { 363 361 int index = itemsListView.SelectedIndices[0]; 364 T item = Content[index + 1]; 365 Content[index + 1] = Content[index]; 362 Content.Reverse(index, 2); 366 363 itemsListView.Items[index].Selected = false; 367 364 itemsListView.Items[index + 1].Selected = true; 368 Content[index] = item;369 365 } 370 366 }
Note: See TracChangeset
for help on using the changeset viewer.