private void OnDungeonsOrderChanged(object sender, OrderChangedEventArgs e)
 {
     foreach (DungeonColumnViewModel dcvm in e.NewOrder)
     {
         dcvm.Dungeon.Index = e.NewOrder.ToList().IndexOf(dcvm);
     }
 }
Ejemplo n.º 2
0
        private void DatabaseOrderChanged(object sender, OrderChangedEventArgs e)
        {
            // first start
            if (e.NewOrder == null ||
                e.PreviousOrder == null ||
                e.NewOrder.Count() != e.PreviousOrder.Count())
            {
                return;
            }

            var oldDatabases = e.PreviousOrder.Cast <DatabaseDisplayData>().ToList();
            var newDatabases = e.NewOrder.Cast <DatabaseDisplayData>().ToList();

            var oldDatabaseNames = oldDatabases.Select(d => d.Name).ToList();
            var newDatabaseNames = newDatabases.Select(d => d.Name).ToList();
            var orderEquals      = true;

            for (var i = 0; i < oldDatabaseNames.Count(); i++)
            {
                if (oldDatabaseNames[i] != newDatabaseNames[i])
                {
                    orderEquals = false;
                }
            }

            // no change in order
            if (orderEquals)
            {
                return;
            }

            this.lastOrder = newDatabases;
        }
Ejemplo n.º 3
0
        /// <summary>
        /// 医嘱对象内容改变后触发事件
        /// </summary>
        /// <param name="Sender"></param>
        /// <param name="e"></param>
        internal void AfterOrderChanged(object Sender, OrderChangedEventArgs e)
        {
            int index = Orders.IndexOf(e.NewSerialNo);

            if (index == -1)
            {
                throw new ArgumentOutOfRangeException();
            }

            ResetSpecialFlag(Orders[index], ListChangedType.ItemChanged);
            FireListChanged(new ListChangedEventArgs(ListChangedType.ItemChanged, index));
        }
Ejemplo n.º 4
0
        private void MainSkillOrderChanged(object sender, OrderChangedEventArgs e)
        {
            _mainOrder = e.NewOrder;

            if (_mainOrder.Length < 2)
            {
                return;
            }
            if (!_isDragging)
            {
                //force it here
                //InstanceOnRefreshItemSourcesEvent();
            }
        }
Ejemplo n.º 5
0
        private void OnOrderChanged(object sender, OrderChangedEventArgs orderChangedEventArgs)
        {
            if (sender == null || orderChangedEventArgs == null)
            {
                return;
            }

            Log.Debug(
                $"Items order has changed, \nOld:\n\t{orderChangedEventArgs.PreviousOrder.EmptyIfNull().Select(x => x?.ToString() ?? "(null)").DumpToTable()}, \nNew:\n\t{orderChangedEventArgs.NewOrder.EmptyIfNull().Select(x => x?.ToString() ?? "(null)").DumpToTable()}");
            Items = orderChangedEventArgs.NewOrder
                    .EmptyIfNull()
                    .OfType <T>()
                    .ToArray();
        }
Ejemplo n.º 6
0
 private void StackPositionMonitor_OnOrderChanged(object sender, OrderChangedEventArgs e)
 {
     _order = e.NewOrder;
 }
Ejemplo n.º 7
0
 private void SecondarySkillOrderChanged(object sender, OrderChangedEventArgs e)
 {
     _secondaryOrder = e.NewOrder;
 }
Ejemplo n.º 8
0
 private void PeopleMonitorOnOrderChanged(object sender, OrderChangedEventArgs orderChangedEventArgs)
 {
     PeopleMonitorText = orderChangedEventArgs.NewOrder.OfType <Person>()
                         .Aggregate("", (accumalate, person) => accumalate + person.LastName + ", ");
 }
Ejemplo n.º 9
0
 private void VerticalPositionMonitor_OrderChanged(object sender, OrderChangedEventArgs e)
 {
     //throw new NotImplementedException();
 }
Ejemplo n.º 10
0
 private void MainSkillOrderChanged(object sender, OrderChangedEventArgs e)
 {
     _mainOrder = e.NewOrder;
 }