Ejemplo n.º 1
0
        private void ReplayChanges(IndividualCollectionChange change, IList ilist)
        {
            _UIDispatcher.Run(() =>
                              //CefCoreSessionSingleton.Session.UIDispatcher.Run(() =>
            {
                switch (change.CollectionChangeType)
                {
                case CollectionChangeType.Add:
                    if (change.Index == ilist.Count)
                    {
                        ilist.Add(change.Object.CValue);
                        Items.Add(change.Object);
                    }
                    else
                    {
                        ilist.Insert(change.Index, change.Object.CValue);
                        Items.Insert(change.Index, change.Object);
                    }
                    break;

                case CollectionChangeType.Remove:
                    ilist.RemoveAt(change.Index);
                    Items.RemoveAt(change.Index);
                    break;
                }
            });
        }
Ejemplo n.º 2
0
        private void ReplayChanges(IndividualCollectionChange change, IList ilist)
        {
            _UIDispatcher.Run(() => 
            //CefCoreSessionSingleton.Session.UIDispatcher.Run(() =>
            {
                switch (change.CollectionChangeType)
                {
                    case CollectionChangeType.Add:
                    if (change.Index == ilist.Count)
                    {
                        ilist.Add(change.Object.CValue);
                        Items.Add(change.Object);
                    }
                    else
                    {
                        ilist.Insert(change.Index, change.Object.CValue);
                        Items.Insert(change.Index, change.Object);
                    }
                    break;

                    case CollectionChangeType.Remove:
                        ilist.RemoveAt(change.Index);
                        Items.RemoveAt(change.Index);
                    break;
                }
            });
        }