src/Misc/EFTools/DesignXmlCore/Refactoring/PreviewChangesList.cs
/// <summary>
///     Toggles the state of the given item (may be more than two states)
/// </summary>
/// <param name="index"></param>
/// <param name="ptscr"></param>
/// <returns></returns>
Toggles the state of the given item (may be more than two states)
Toggles the state of the given item ( may be more than two states )
public int ToggleState(uint index, out uint ptscr)
        {
            ArgumentValidation.CheckForOutOfRangeException(index, 0, _changeList.Count - 1);
            var node = _changeList[(int)index];
            if (node.CheckState != __PREVIEWCHANGESITEMCHECKSTATE.PCCS_None)
            {
                var checkState = __PREVIEWCHANGESITEMCHECKSTATE.PCCS_Checked;
                if (node.CheckState == __PREVIEWCHANGESITEMCHECKSTATE.PCCS_Checked)
                {
                    checkState = __PREVIEWCHANGESITEMCHECKSTATE.PCCS_Unchecked;
                }
                node.CheckState = checkState;
                ptscr = (int)_VSTREESTATECHANGEREFRESH.TSCR_ENTIRE;
                _previewBuffer.RefreshTextView();
            }
            else
            {
                ptscr = (int)_VSTREESTATECHANGEREFRESH.TSCR_NONE;
            }
            return VSConstants.S_OK;
        }
public int ToggleState ( uint index , out uint ptscr ) { ArgumentValidation . CheckForOutOfRangeException ( index , 0 , _changeList . Count - 1 ) ; var node = _changeList [ ( int ) index ] ; if ( node . CheckState != __PREVIEWCHANGESITEMCHECKSTATE . PCCS_None ) { var checkState = __PREVIEWCHANGESITEMCHECKSTATE . PCCS_Checked ; if ( node . CheckState == __PREVIEWCHANGESITEMCHECKSTATE . PCCS_Checked ) { checkState = __PREVIEWCHANGESITEMCHECKSTATE . PCCS_Unchecked ; } node . CheckState = checkState ; ptscr = ( int ) _VSTREESTATECHANGEREFRESH . TSCR_ENTIRE ; _previewBuffer . RefreshTextView ( ) ; } else { ptscr = ( int ) _VSTREESTATECHANGEREFRESH . TSCR_NONE ; } return VSConstants . S_OK ; }
Toggles the state of the given item (may be more than two states)
Toggles the state of the given item ( may be more than two states )
None
index
uint
None
uint
out
ptscr
None