Пример #1
0
 public static void ItemIndexDecrement <T>(this NotifiableCollection <T> collection, T item, int count = 1)
 {
     if (collection != null)
     {
         collection.Move(collection.IndexOf(item), count);
     }
 }
Пример #2
0
        public ColumnManager(IAccount account, NotifiableCollection <ColumnBase> allColumns)
        {
            this._account    = account;
            this._allColumns = allColumns;
            this._columns    = new List <ColumnBase>(10);
            this.ResetColumns(this._columns);

            this._allColumns.CollectionChanged += this.OnCollectionChanged;
        }
Пример #3
0
 public ColumnRemoveCommand() : base(true)
 {
     this._columns = App.Columns;
 }
Пример #4
0
 public static bool CanItemIndexIncrement <T>(this NotifiableCollection <T> collection, T item, int downCount = 1)
 {
     return(collection.CanItemIndexIncrement(collection.IndexOf(item), downCount));
 }
Пример #5
0
 public static bool CanItemIndexIncrement <T>(this NotifiableCollection <T> collection, int currentIndex, int downCount = 1)
 {
     return(MathEx.IsWithin(currentIndex, 0, collection.Count - (1 + downCount)));
 }
Пример #6
0
 public static void ItemIndexIncrement <T>(this NotifiableCollection <T> collection, T item, int count = 1)
 {
     collection.ItemIndexIncrement(collection.IndexOf(item), count);
 }
Пример #7
0
 public static void ItemIndexIncrement <T>(this NotifiableCollection <T> collection, int oldIndex, int count = 1)
 {
     collection.Move(oldIndex, oldIndex + count);
 }
Пример #8
0
 public static bool CanItemIndexDecrement <T>(this NotifiableCollection <T> collection, int currentIndex, int count)
 {
     return(MathEx.IsWithin(currentIndex, count, collection.Count - 1));
 }
Пример #9
0
 public ColumnMoveLeftCommand() : base(true)
 {
     this._columns = App.Columns;
     this._columns.CollectionChanged += this.ColumnsChanged;
 }