34 lines
995 B
C#
34 lines
995 B
C#
using System;
|
|
using CPF.Drawing;
|
|
using CPF.ReoGrid.Outline;
|
|
|
|
namespace CPF.ReoGrid.Views
|
|
{
|
|
internal class RowOutlineHeaderView : OutlineHeaderPart
|
|
{
|
|
public RowOutlineHeaderView(IViewportController vc) : base(vc, RowOrColumn.Row)
|
|
{
|
|
}
|
|
|
|
public override void UpdateView()
|
|
{
|
|
OutlineCollection<ReoGridOutline> outlineCollection = this.sheet.outlines[RowOrColumn.Row];
|
|
bool flag = outlineCollection != null;
|
|
if (flag)
|
|
{
|
|
float num = Math.Min(this.scaleFactor, 1f);
|
|
float num2 = (this.scaleFactor > 1f) ? 13f : (13f * num);
|
|
for (int i = 0; i < outlineCollection.Count; i++)
|
|
{
|
|
OutlineGroup<ReoGridOutline> outlineGroup = outlineCollection[i];
|
|
float num3 = (float)(16 * i) * num;
|
|
float num4 = this.bounds.Top + (this.bounds.Height - num2) / 2f;
|
|
OutlineGroup<ReoGridOutline> outlineGroup2 = outlineGroup;
|
|
float num5 = num3 + 1f;
|
|
outlineGroup2.NumberButtonBounds = new Rect(ref num5, ref num4, ref num2, ref num2);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|