From 9ec318366c050d3a3ea0e57b1ff14522945c12d9 Mon Sep 17 00:00:00 2001 From: Kathy Date: Fri, 27 Jan 2012 12:44:42 +0000 Subject: [PATCH] --- PROMS/Volian.Controls.Library/vlnExpander.cs | 27 +++++++++++++------- 1 file changed, 18 insertions(+), 9 deletions(-) diff --git a/PROMS/Volian.Controls.Library/vlnExpander.cs b/PROMS/Volian.Controls.Library/vlnExpander.cs index 0d93b1e6..d5beef86 100644 --- a/PROMS/Volian.Controls.Library/vlnExpander.cs +++ b/PROMS/Volian.Controls.Library/vlnExpander.cs @@ -120,6 +120,12 @@ namespace Volian.Controls.Library get { return _Attachment; } set { _Attachment = value; this.Refresh(); } } + private bool _AutoTOC = false; + public bool AutoTOC + { + get { return _AutoTOC; } + set { _AutoTOC = value; this.Refresh(); } + } private ExpanderStyle _MyExpanderStyle = ExpanderStyle.Square; public ExpanderStyle MyExpanderStyle { @@ -184,15 +190,18 @@ namespace Volian.Controls.Library { if (Attachment) { - PointF[] myArrow = new PointF[7]; - myArrow[0] = new PointF(7 * weight, 3 * weight); - myArrow[1] = new PointF(11 * weight, 6 * weight); - myArrow[2] = new PointF(7 * weight, 9 * weight); - myArrow[3] = new PointF(7 * weight, 7 * weight); - myArrow[4] = new PointF(2 * weight, 7 * weight); - myArrow[5] = new PointF(2 * weight, 5 * weight); - myArrow[6] = new PointF(7 * weight, 5 * weight); - e.Graphics.FillPolygon(bBackground, myArrow); + if (!AutoTOC) + { + PointF[] myArrow = new PointF[7]; + myArrow[0] = new PointF(7 * weight, 3 * weight); + myArrow[1] = new PointF(11 * weight, 6 * weight); + myArrow[2] = new PointF(7 * weight, 9 * weight); + myArrow[3] = new PointF(7 * weight, 7 * weight); + myArrow[4] = new PointF(2 * weight, 7 * weight); + myArrow[5] = new PointF(2 * weight, 5 * weight); + myArrow[6] = new PointF(7 * weight, 5 * weight); + e.Graphics.FillPolygon(bBackground, myArrow); + } } else {