print/ReportTextBoxPrintElement.vb

(开头部分) 1KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

''' <summary>
''' 报表中的一个打印元素,包含文字 对齐方式 宽度 高度 字体等
''' </summary>
Public Class ReportTextBoxPrintElement

    '文字部分
    Private m_TextContent As String
    '文字对齐方式
    Private m_TextAlign As ContentAlignment
    '绘制矩形大小
    Private m_TextRectangle As Rectangle
    '绘制使用的字体
    Private m_TextFont As Font

#Region "打印元素初始化"

    Public Sub New()

        '默认是矩形居中对齐
        m_TextAlign = ContentAlignment.MiddleCenter
        '默认是宋体8号字
        m_TextFont = New Font("宋体", 8, FontStyle.Regular)

    End Sub

    Public Sub New(ByVal s As String, ByVal a As ContentAlignment, ByVal rect As Rectangle, ByVal f As Font)
        m_TextContent = s
        m_TextAlign = a
        m_TextRectangle = rect
        m_TextFont = f
    End Sub

#End Region


#Region "打印元素属性"

    Public Property TextContent As String
        Get
            Return m_TextContent
        End Get
        Set(value As String)
            m_TextContent = value
        End Set
    End Property

    Public Property TextAlign As ContentAlignment
        Get
            Return m_TextAlign
        End Get
        Set(value As ContentAlignment)
            m_TextAlign = value
        End Set
    End Property

    Public Property TextRectangle As Rectangle
        Get
            Return m_TextRectangle
        End Get
        Set(value As Rectangle)
后面还有 15 行代码,解锁后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明

AI 解读

登录后可用,每次 10 积分,解读结果公开显示在下面。

还没有人解读过这个文件。