📄 basepagenumber.cs
字号:
//------------------------------------------------------------------------------
// <autogenerated>
// This code was generated by a tool.
// Runtime Version: 1.1.4322.2032
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </autogenerated>
//------------------------------------------------------------------------------
using System;
using System.Globalization;
using System.ComponentModel;
using System.Drawing;
/// <summary>
/// BaseClass for PageNumbers
/// </summary>
/// <remarks>
/// created by - Forstmeier Peter
/// created on - 12.09.2005 22:34:54
/// </remarks>
namespace SharpReportCore {
public class BasePageNumber : BaseFunction {
static string fnName = "SharpReport.Toolbar.Functions.PageNumber";
public BasePageNumber():base(fnName) {
}
public override void Render(ReportPageEventArgs rpea) {
base.Render(rpea);
string formattedString = base.FireFormatOutput(rpea.PageNumber.ToString(CultureInfo.InvariantCulture),
base.FormatString,"");
RectangleF rect = base.PrepareRectangle (rpea,formattedString);
//Printout the textpart
base.PrintTheStuff (rpea,this.Text,rect);
//here we print the functionpart
StringFormat fmt = StringFormat;
fmt.Alignment = StringAlignment.Far;
fmt.LineAlignment = StringAlignment.Near;
rpea.PrintPageEventArgs.Graphics.DrawString(rpea.PageNumber.ToString(CultureInfo.InvariantCulture),
this.Font,
Brushes.Black,
rect,
fmt);
base.NotiyfyAfterPrint (rpea.LocationAfterDraw);
}
public override string ToString() {
return "BasePageNumber";
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -