src/Misc/EFTools/DesignXmlCore/VirtualTreeGrid/Provider/VirtualTree.cs
/// <summary>
///     Synchronize the state of the given items to the state of another branch.
/// </summary>
/// <param name="itemsToSynchronize">items whose state should be synchronized.</param>
/// <param name="matchBranch">Branch to synchronize with</param>
/// <param name="matchRow">Row in branch to synchronize with</param>
/// <param name="matchColumn">Column in branch to synchronize with</param>
/// <param name="translateSingleColumnView">True if this synchronize is coming from a single column view attached to the tree.</param>
Synchronize the state of the given items to the state of another branch.
Synchronize the state of the given items to the state of another branch .
protected internal void SynchronizeState(
            ColumnItemEnumerator itemsToSynchronize, IBranch matchBranch, int matchRow, int matchColumn, bool translateSingleColumnView)
        {
            SynchronizeStateEventArgs e = null;
            if (!translateSingleColumnView && SynchronizationBeginning != null
                || SynchronizationEnding != null)
            {
                e = new SynchronizeStateEventArgs(this, itemsToSynchronize, matchBranch, matchRow, matchColumn);
            }
            if (!translateSingleColumnView
                && SynchronizationBeginning != null)
            {
                SynchronizationBeginning(this, e);
            }
            if (e == null
                || !e.Handled)
            {
                itemsToSynchronize.Reset();
                if (!translateSingleColumnView)
                {
                    while (itemsToSynchronize.MoveNext())
                    {
                        if (
                            !(itemsToSynchronize.Branch == matchBranch && itemsToSynchronize.RowInBranch == matchRow
                              && itemsToSynchronize.ColumnInBranch == matchColumn))
                        {
                            DoToggleState(itemsToSynchronize.RowInTree, itemsToSynchronize.ColumnInTree, matchBranch, matchRow, matchColumn);
                        }
                    }
                }
                else
                {
                    while (itemsToSynchronize.MoveNext())
                    {
                        if (
                            !(itemsToSynchronize.Branch == matchBranch && itemsToSynchronize.RowInBranch == matchRow
                              && itemsToSynchronize.ColumnInBranch == matchColumn))
                        {
                            DoToggleState(TranslateSingleColumnRow(itemsToSynchronize.RowInTree), 0, matchBranch, matchRow, matchColumn);
                        }
                    }
                }
            }
            if (!translateSingleColumnView
                && SynchronizationEnding != null)
            {
                SynchronizationEnding(this, e);
            }
        }
protected internal void SynchronizeState ( ColumnItemEnumerator itemsToSynchronize , IBranch matchBranch , int matchRow , int matchColumn , bool translateSingleColumnView ) { SynchronizeStateEventArgs e = null ; if ( ! translateSingleColumnView && SynchronizationBeginning != null || SynchronizationEnding != null ) { e = new SynchronizeStateEventArgs ( this , itemsToSynchronize , matchBranch , matchRow , matchColumn ) ; } if ( ! translateSingleColumnView && SynchronizationBeginning != null ) { SynchronizationBeginning ( this , e ) ; } if ( e == null || ! e . Handled ) { itemsToSynchronize . Reset ( ) ; if ( ! translateSingleColumnView ) { while ( itemsToSynchronize . MoveNext ( ) ) { if ( ! ( itemsToSynchronize . Branch == matchBranch && itemsToSynchronize . RowInBranch == matchRow && itemsToSynchronize . ColumnInBranch == matchColumn ) ) { DoToggleState ( itemsToSynchronize . RowInTree , itemsToSynchronize . ColumnInTree , matchBranch , matchRow , matchColumn ) ; } } } else { while ( itemsToSynchronize . MoveNext ( ) ) { if ( ! ( itemsToSynchronize . Branch == matchBranch && itemsToSynchronize . RowInBranch == matchRow && itemsToSynchronize . ColumnInBranch == matchColumn ) ) { DoToggleState ( TranslateSingleColumnRow ( itemsToSynchronize . RowInTree ) , 0 , matchBranch , matchRow , matchColumn ) ; } } } } if ( ! translateSingleColumnView && SynchronizationEnding != null ) { SynchronizationEnding ( this , e ) ; } }
Synchronize the state of the given items to the state of another branch.
Synchronize the state of the given items to the state of another branch .
// UNDONE : check translateSingleColumnView before firing events because sync batching is not currently supported  // for the single column view.
itemsToSynchronize
ColumnItemEnumerator
items whose state should be synchronized.
items whose state should be synchronized .
matchBranch
IBranch
Branch to synchronize with
Branch to synchronize with
matchRow
int
Row in branch to synchronize with
Row in branch to synchronize with
matchColumn
int
Column in branch to synchronize with
Column in branch to synchronize with
translateSingleColumnView
bool
True if this synchronize is coming from a single column view attached to the tree.
True if this synchronize is coming from a single column view attached to the tree .