DrawAutoFillWorkbookResults
(
DrawingObjects oDrawingObjects
)
{
Debug.Assert(oDrawingObjects != null);
AssertValid();
// If there are autofilled edge and vertex results, two columns are
// drawn, with the edge results in the first column and the vertex
// results in the second. If there are only edge or vertex results,
// one column is drawn.
Rectangle oColumn1Rectangle, oColumn2Rectangle;
Boolean bHasTwoColumns = false;
if (m_oAutoFillWorkbookResults.AutoFilledEdgeColumnCount > 0 &&
m_oAutoFillWorkbookResults.AutoFilledVertexNonXYColumnCount > 0)
{
ControlRectangleToTwoColumns(oDrawingObjects,
out oColumn1Rectangle, out oColumn2Rectangle);
bHasTwoColumns = true;
}
else
{
oColumn1Rectangle = oDrawingObjects.ControlRectangle;
AddMarginsToColumnRectangle(ref oColumn1Rectangle);
oColumn2Rectangle = oColumn1Rectangle;
}
Int32 iBottom = Math.Max(
DrawAutoFilledEdgeResults(oDrawingObjects, oColumn1Rectangle),
DrawAutoFilledVertexResults(oDrawingObjects, oColumn2Rectangle)
);
if (bHasTwoColumns)
{
DrawColumnSeparator(oDrawingObjects, oColumn2Rectangle);
}
return (iBottom);
}