GrapeCity.Win.MultiRow Namespace : PrintInfoCell Class |
<ToolboxItemFilterAttribute(FilterString="GrapeCity.Win.MultiRow.Template7", FilterType=ToolboxItemFilterType.Custom Or _ ToolboxItemFilterType.Prevent Or _ ToolboxItemFilterType.Require)> <DesignerAttribute(DesignerBaseTypeName="System.ComponentModel.Design.IDesigner", DesignerTypeName="GrapeCity.Win.MultiRow.Design.PrintInfoCellDesigner,GrapeCity.Win.MultiRow.Design, Version=7.20.20141.0, Culture=neutral, PublicKeyToken=0f7a722ee3c2bdd9")> <BindableCellAttribute(False)> <ToolboxBitmapAttribute()> <ValueTypeEditorAttribute(TypeName="System.Drawing.Design.UITypeEditor, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", AavailableForNullValue=True)> <SRDescriptionAttribute("Displays print information such as page number, print date, and so on.")> <DefaultPropertyAttribute("FormatString")> Public Class PrintInfoCell Inherits LabelCell
Dim instance As PrintInfoCell
[ToolboxItemFilter(FilterString="GrapeCity.Win.MultiRow.Template7", FilterType=ToolboxItemFilterType.Custom | ToolboxItemFilterType.Prevent | ToolboxItemFilterType.Require)] [Designer(DesignerBaseTypeName="System.ComponentModel.Design.IDesigner", DesignerTypeName="GrapeCity.Win.MultiRow.Design.PrintInfoCellDesigner,GrapeCity.Win.MultiRow.Design, Version=7.20.20141.0, Culture=neutral, PublicKeyToken=0f7a722ee3c2bdd9")] [BindableCell(false)] [ToolboxBitmap()] [ValueTypeEditor(TypeName="System.Drawing.Design.UITypeEditor, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", AavailableForNullValue=true)] [SRDescription("Displays print information such as page number, print date, and so on.")] [DefaultProperty("FormatString")] public class PrintInfoCell : LabelCell
void AddPrintInfoCellColumnFooterSection(Template template, int height) { ColumnFooterSection columnFooterSection1 = new ColumnFooterSection(); columnFooterSection1.Height = height; PrintInfoCell printInfoCell1 = new PrintInfoCell(); printInfoCell1.Size = new Size(500, height); printInfoCell1.Location = new Point(template.Width - 500, 0); printInfoCell1.Style.Border = Border.Empty; printInfoCell1.Style.TextAlign = MultiRowContentAlignment.MiddleRight; CultureInfo provider = new CultureInfo("ja-JP",true); provider.DateTimeFormat.Calendar = new JapaneseCalendar(); printInfoCell1.Style.FormatProvider = provider; //Indicate the page number and DateTime. printInfoCell1.FormatString = "{PageNumber:}/{PageCount:} {DateTime:yyyy年MM月dd日}"; //You can add other information when printing, such as UserName, CompanyName and so on. //printInfoCell1.FormatString = String.Format("{{DateTime:yyyy年MM月dd日}} {0} {1} ",new object[] { Environment.UserName, Application.CompanyName }); columnFooterSection1.Cells.Add(printInfoCell1); template.ColumnFooters.Add(columnFooterSection1); }
Private Sub AddPrintInfoCellColumnFooterSection(ByVal template As Template, ByVal height As Integer) Dim columnFooterSection1 As New ColumnFooterSection() columnFooterSection1.Height = height Dim printInfoCell1 As New PrintInfoCell() printInfoCell1.Size = New Size(500, height) printInfoCell1.Location = New Point(template.Width - 500, 0) printInfoCell1.Style.Border = Border.Empty printInfoCell1.Style.TextAlign = MultiRowContentAlignment.MiddleRight Dim provider As New CultureInfo("ja-JP", True) provider.DateTimeFormat.Calendar = New JapaneseCalendar() printInfoCell1.Style.FormatProvider = provider 'Indicate the page number and DateTime. printInfoCell1.FormatString = "{PageNumber:}/{PageCount:} {DateTime:yyyy年MM月dd日}" 'You can add other information when printing, such as UserName, CompanyName and so on. 'printInfoCell1.FormatString = String.Format("{{DateTime:yyyy年MM月dd日}} {0} {1} ",new object[] { Environment.UserName, Application.CompanyName }); columnFooterSection1.Cells.Add(printInfoCell1) template.ColumnFooters.Add(columnFooterSection1) End Sub
System.Object
System.MarshalByRefObject
System.ComponentModel.Component
GrapeCity.Win.MultiRow.Cell
GrapeCity.Win.MultiRow.LabelCell
GrapeCity.Win.MultiRow.PrintInfoCell
Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2