src/Misc/EFTools/DesignXmlCore/VirtualTreeGrid/UI/ColumnHeader.cs
/// <summary>
///     Return a column that can be used to autofill fixed columns
/// </summary>
/// <param name="headers">A header array</param>
/// <returns>-1 if autofill is not needed (there are variable columns), or if all columns are nonadjustable</returns>
Return a column that can be used to autofill fixed columns
Return a column that can be used to autofill fixed columns
private int FindAutoFillIndex(VirtualTreeColumnHeader[] headers)
        {
            if (headers == null)
            {
                return -1;
            }
            var count = headers.Length;
            int start;
            int end;
            int incr;
            if (RightToLeft == RightToLeft.Yes)
            {
                start = 0;
                end = count;
                incr = 1;
            }
            else
            {
                start = count - 1;
                end = -1;
                incr = -1;
            }
            for (var i = start; i != end; i += incr)
            {
                if (headers[i].Percentage == 0f)
                {
                    if (headers[i].IsColumnAdjustable)
                    {
                        return i;
                    }
                }
            }
            return -1;
        }
private int FindAutoFillIndex ( VirtualTreeColumnHeader [ ] headers ) { if ( headers == null ) { return - 1 ; } var count = headers . Length ; int start ; int end ; int incr ; if ( RightToLeft == RightToLeft . Yes ) { start = 0 ; end = count ; incr = 1 ; } else { start = count - 1 ; end = - 1 ; incr = - 1 ; } for ( var i = start ; i != end ; i += incr ) { if ( headers [ i ] . Percentage == 0f ) { if ( headers [ i ] . IsColumnAdjustable ) { return i ; } } } return - 1 ; }
Return a column that can be used to autofill fixed columns
Return a column that can be used to autofill fixed columns
// Search from the left // Search from the right
1 if autofill is not needed (there are variable columns), or if all columns are nonadjustable
1 if autofill is not needed ( there are variable columns ) or if all columns are nonadjustable
headers
VirtualTreeColumnHeader[]
A header array
A header array