Пример #1
0
        public void InvalidateGroupStats(DataGridCollectionViewGroup group, bool calculateAllStats = false)
        {
            if (group == null)
            {
                return;
            }

            lock (this)
            {
                if (this.RefreshPending)
                {
                    return;
                }

                DataGridCollectionViewGroup parent = group;

                while (parent != null)
                {
                    if (!m_invalidatedGroups.Contains(parent))
                    {
                        m_invalidatedGroups.Add(parent);
                    }

                    parent.ClearStatFunctionsResult();
                    parent.CalculateAllStats = calculateAllStats;
                    parent = parent.Parent;
                }

                if (m_dispatcher != null)
                {
                    if (m_dispatcherOperation == null)
                    {
                        m_dispatcherOperation          = m_dispatcher.BeginInvoke(DispatcherPriority.DataBind, new DispatcherOperationCallback(this.Dispatched_Process), null);
                        m_dispatcherOperationStartTime = DateTime.UtcNow;
                    }
                    else
                    {
                        m_hasNewOperationsSinceStartTime = true;
                    }
                }
            }
        }
Пример #2
0
        internal void InvalidateGroupStats(DataGridCollectionViewGroup group)
        {
            if (group == null)
            {
                return;
            }

            lock (this)
            {
                if (this.RefreshPending)
                {
                    return;
                }

                if (m_invalidatedGroups == null)
                {
                    m_invalidatedGroups = new List <DataGridCollectionViewGroup>(64);
                }

                DataGridCollectionViewGroup parent = group;

                while (parent != null)
                {
                    if (!m_invalidatedGroups.Contains(parent))
                    {
                        parent.ClearStatFunctionsResult();
                        m_invalidatedGroups.Add(parent);
                    }

                    parent = parent.Parent;
                }

                if ((m_dispatcherOperation == null) && (m_dispatcher != null))
                {
                    m_dispatcherOperation = m_dispatcher.BeginInvoke(
                        DispatcherPriority.DataBind,
                        new DispatcherOperationCallback(this.Dispatched_Process),
                        null);
                }
            }
        }