가로등 통합 anycpu 로 변경

This commit is contained in:
Arin(asus)
2023-10-01 23:07:39 +09:00
parent d5e8b1b2ff
commit 46ef9da6f9
13 changed files with 397 additions and 363 deletions

View File

@@ -265,7 +265,7 @@ Public Class Defalut_PrintForm
''' 초기화합니다.
''' </summary>
''' <remarks></remarks>
Public Sub Initialize(ByVal V_Srctable As DataTable, ByVal styleTag As String, _
Public Sub Initialize(ByVal V_Srctable As DataTable, ByVal styleTag As String,
ByVal v_SettingFile As String, ByVal v_DefStyleIndex As Short, Optional ByVal ADT As DataTable = Nothing, Optional ByVal OT As Boolean = False)
RaiseEvent StatusMessage("폼을 초기화합니다", e_EventMessage.Normal)
@@ -1402,7 +1402,12 @@ Public Class Defalut_PrintForm
If MsgBox("인쇄를 하시겠습니까?", MsgBoxStyle.Information + MsgBoxStyle.OkCancel, "확인") = MsgBoxResult.Ok Then
RaiseEvent StatusMessage("<< [P] Print", e_EventMessage.Normal)
If Me.Prepare_Print() Then
' Try
pDoc.Print()
' Catch ex As Exception
' MsgBox("인쇄 실패\n" + ex.Message)
' End Try
Else
MsgBox("인쇄가능한 목록이 없거나 인쇄범위(=페이지수)에 문제가 있습니다", MsgBoxStyle.Critical, "확인")
End If
@@ -1414,7 +1419,7 @@ Public Class Defalut_PrintForm
' Private Sub Build_PrintPage(ByRef Ga As Graphics, ByVal dummycnt As Short, ByVal Print As Boolean, ByVal CNT As Short, ByVal Row As Short)
Private Sub Build_PrintPage(ByRef Ga As Graphics, ByVal dummycnt As Short, ByVal Print As Boolean)
Dim Brush As SolidBrush
Dim Brush As SolidBrush = Nothing
Dim obj As CEpole.C_label
Dim NewX, NewY, NewLeft, NewTop As Integer
Dim SrcG As Graphics = Me.v_picturebox1.CreateGraphics
@@ -1468,8 +1473,10 @@ Public Class Defalut_PrintForm
Brush = New SolidBrush(obj.ForeColor2) '//160515
Else
If Me.DMode Then
If Not Brush Is Nothing Then Brush.Dispose()
Brush = New SolidBrush(Drawing.Color.Gainsboro) '//전경색으로 브러쉬를 만든다.
Else
If Not Brush Is Nothing Then Brush.Dispose()
Brush = New SolidBrush(obj.ForeColor) '//전경색으로 브러쉬를 만든다.
End If
End If
@@ -1510,11 +1517,16 @@ Public Class Defalut_PrintForm
NewLeft = NewLeft + rcnt * obj.RepeatX
NewTop = NewTop + rcnt * obj.RepeatY
If Me.DMode Then
If Not Brush Is Nothing Then Brush.Dispose()
Brush = New SolidBrush(obj.ForeColor) '//전경색으로 브러쉬를 만든다.
Else
If Not Brush Is Nothing Then Brush.Dispose()
Brush = New SolidBrush(Drawing.Color.LightGreen) '//전경색으로 브러쉬를 만든다.
End If
If Print Then Brush = New SolidBrush(obj.ForeColor)
If Print Then
If Not Brush Is Nothing Then Brush.Dispose()
Brush = New SolidBrush(obj.ForeColor)
End If
End If
@@ -1542,20 +1554,20 @@ Public Class Defalut_PrintForm
' NewY = obj.GetSize().Height * (obj.WordHeight / 100.0) * (Ga.DpiY / SrcG.DpiY)
'End If
Using BMP As New Bitmap(NewX, NewY, Ga)
Using G As Graphics = Graphics.FromImage(BMP)
G.ScaleTransform((obj.WordWidth / 100.0), (obj.WordHeight / 100.0))
Using sf As New StringFormat()
G.DrawString(obj.text2, obj.Font, Brush, 0.0F, 0.0F)
End Using
End Using
Try
Ga.DrawImage(BMP, NewLeft, NewTop) ', CInt(GetSize.Width * (vwordwidth / 100)), GetSize.Height)
Catch ex As Exception
' MsgBox("Graphic DrawError", MsgBoxStyle.Information, obj.Desc)
End Try
End Using
Dim BMP As New Bitmap(NewX, NewY, Ga)
Dim G As Graphics = Graphics.FromImage(BMP)
G.ScaleTransform((obj.WordWidth / 100.0), (obj.WordHeight / 100.0))
Dim sf As New StringFormat()
G.DrawString(obj.text2, obj.Font, Brush, 0.0F, 0.0F)
G.Dispose()
Try
Ga.DrawImage(BMP, NewLeft, NewTop) ', CInt(GetSize.Width * (vwordwidth / 100)), GetSize.Height)
Catch ex As Exception
' MsgBox("Graphic DrawError", MsgBoxStyle.Information, obj.Desc)
End Try
End If
Next
End If
@@ -1614,34 +1626,36 @@ Public Class Defalut_PrintForm
Try
If Not Me.Draw_Box Is Nothing AndAlso Not Me.Draw_Box.Items Is Nothing Then
For Each Rect As S_Box In Me.Draw_Box.Items
Dim Pen As New Drawing.Pen(Rect.PenColor, Rect.PenWidth)
Using Pen As New Drawing.Pen(Rect.PenColor, Rect.PenWidth)
Dim NewSX As Single = Rect.X
Dim NewSY As Single = Rect.Y
Dim NewSX As Single = Rect.X
Dim NewSY As Single = Rect.Y
If RowIndex > 0 Then '//연속출력일때에는 줄구분 값을 사용한다.
NewSX += SetForm.MyProperty_Paper.연속여백x * (dummycnt - RowIndex * SetForm.MyProperty_Paper.분리갯수)
NewSY += SetForm.MyProperty_Paper.연속여백y * (dummycnt - RowIndex * SetForm.MyProperty_Paper.분리갯수)
Else
NewSX += SetForm.MyProperty_Paper.연속여백x * dummycnt
NewSY += SetForm.MyProperty_Paper.연속여백y * dummycnt
End If
If RowIndex > 0 Then '//연속출력일때에는 줄구분 값을 사용한다.
NewSX += SetForm.MyProperty_Paper.연속여백x * (dummycnt - RowIndex * SetForm.MyProperty_Paper.분리갯수)
NewSY += SetForm.MyProperty_Paper.연속여백y * (dummycnt - RowIndex * SetForm.MyProperty_Paper.분리갯수)
Else
NewSX += SetForm.MyProperty_Paper.연속여백x * dummycnt
NewSY += SetForm.MyProperty_Paper.연속여백y * dummycnt
End If
NewSX += RowOffsetX
NewSY += RowOffsetY
NewSX += RowOffsetX
NewSY += RowOffsetY
If Print Then
NewSX += +SetForm.MyProperty_Paper.출력여백X
NewSY += +SetForm.MyProperty_Paper.출력여백Y
End If
If Print Then
NewSX += +SetForm.MyProperty_Paper.출력여백X
NewSY += +SetForm.MyProperty_Paper.출력여백Y
End If
If Rect.Radius = 0 Then
Ga.DrawRectangle(Pen, NewSX, NewSY, Rect.Width, Rect.Height)
Else
Dim rRect As Rectangle = New Rectangle(NewSX, NewSY, Rect.Width, Rect.Height)
Dim rpath As System.Drawing.Drawing2D.GraphicsPath = ACC.MYGDI.GetRoundedRectPath(rRect, Rect.Radius)
Ga.DrawPath(Pen, rpath)
End If
If Rect.Radius = 0 Then
Ga.DrawRectangle(Pen, NewSX, NewSY, Rect.Width, Rect.Height)
Else
Dim rRect As Rectangle = New Rectangle(NewSX, NewSY, Rect.Width, Rect.Height)
Using rpath As System.Drawing.Drawing2D.GraphicsPath = ACC.MYGDI.GetRoundedRectPath(rRect, Rect.Radius)
Ga.DrawPath(Pen, rpath)
End Using
End If
End Using
Next
End If
@@ -1654,29 +1668,30 @@ Public Class Defalut_PrintForm
Try
If Not Draw_Circle Is Nothing AndAlso Not Me.Draw_Circle.Items Is Nothing Then
For Each Rect As S_Circle In Me.Draw_Circle.Items
Dim Pen As New Drawing.Pen(Rect.PenColor, Rect.PenWidth)
Using Pen As New Drawing.Pen(Rect.PenColor, Rect.PenWidth)
Dim NewSX As Single = Rect.X
Dim NewSY As Single = Rect.Y
Dim NewSX As Single = Rect.X
Dim NewSY As Single = Rect.Y
If RowIndex > 0 Then '//연속출력일때에는 줄구분 값을 사용한다.
NewSX += SetForm.MyProperty_Paper.연속여백x * (dummycnt - RowIndex * SetForm.MyProperty_Paper.분리갯수)
NewSY += SetForm.MyProperty_Paper.연속여백y * (dummycnt - RowIndex * SetForm.MyProperty_Paper.분리갯수)
Else
NewSX += SetForm.MyProperty_Paper.연속여백x * dummycnt
NewSY += SetForm.MyProperty_Paper.연속여백y * dummycnt
End If
If RowIndex > 0 Then '//연속출력일때에는 줄구분 값을 사용한다.
NewSX += SetForm.MyProperty_Paper.연속여백x * (dummycnt - RowIndex * SetForm.MyProperty_Paper.분리갯수)
NewSY += SetForm.MyProperty_Paper.연속여백y * (dummycnt - RowIndex * SetForm.MyProperty_Paper.분리갯수)
Else
NewSX += SetForm.MyProperty_Paper.연속여백x * dummycnt
NewSY += SetForm.MyProperty_Paper.연속여백y * dummycnt
End If
NewSX += RowOffsetX
NewSY += RowOffsetY
NewSX += RowOffsetX
NewSY += RowOffsetY
If Print Then
NewSX += +SetForm.MyProperty_Paper.출력여백X
NewSY += +SetForm.MyProperty_Paper.출력여백Y
End If
If Print Then
NewSX += +SetForm.MyProperty_Paper.출력여백X
NewSY += +SetForm.MyProperty_Paper.출력여백Y
End If
Ga.DrawEllipse(Pen, NewSX, NewSY, Rect.Width, Rect.Height)
Ga.DrawEllipse(Pen, NewSX, NewSY, Rect.Width, Rect.Height)
End Using
Next
End If
@@ -1694,34 +1709,33 @@ Public Class Defalut_PrintForm
' MsgBox(F)
If System.IO.File.Exists(F) Then
Dim Image As Image = Image.FromFile(F) '//파일로부터 이미지를 가져옴
Using Image As Image = Image.FromFile(F) '//파일로부터 이미지를 가져옴
Dim NewSX As Single = Rect.X
Dim NewSY As Single = Rect.Y
Dim NewSX As Single = Rect.X
Dim NewSY As Single = Rect.Y
If RowIndex > 0 Then '//연속출력일때에는 줄구분 값을 사용한다.
NewSX += SetForm.MyProperty_Paper.연속여백x * (dummycnt - RowIndex * SetForm.MyProperty_Paper.분리갯수)
NewSY += SetForm.MyProperty_Paper.연속여백y * (dummycnt - RowIndex * SetForm.MyProperty_Paper.분리갯수)
Else
NewSX += SetForm.MyProperty_Paper.연속여백x * dummycnt
NewSY += SetForm.MyProperty_Paper.연속여백y * dummycnt
End If
If RowIndex > 0 Then '//연속출력일때에는 줄구분 값을 사용한다.
NewSX += SetForm.MyProperty_Paper.연속여백x * (dummycnt - RowIndex * SetForm.MyProperty_Paper.분리갯수)
NewSY += SetForm.MyProperty_Paper.연속여백y * (dummycnt - RowIndex * SetForm.MyProperty_Paper.분리갯수)
Else
NewSX += SetForm.MyProperty_Paper.연속여백x * dummycnt
NewSY += SetForm.MyProperty_Paper.연속여백y * dummycnt
End If
NewSX += RowOffsetX
NewSY += RowOffsetY
NewSX += RowOffsetX
NewSY += RowOffsetY
If Print Then
NewSX += +SetForm.MyProperty_Paper.출력여백X
NewSY += +SetForm.MyProperty_Paper.출력여백Y
End If
If Rect.Width = 0 OrElse Rect.Height = 0 Then
Ga.DrawImage(Image, NewSX, NewSY)
Else
Ga.DrawImage(Image, NewSX, NewSY, Rect.Width, Rect.Height)
End If
If Print Then
NewSX += +SetForm.MyProperty_Paper.출력여백X
NewSY += +SetForm.MyProperty_Paper.출력여백Y
End If
If Rect.Width = 0 OrElse Rect.Height = 0 Then
Ga.DrawImage(Image, NewSX, NewSY)
Else
Ga.DrawImage(Image, NewSX, NewSY, Rect.Width, Rect.Height)
End If
End Using
End If
End If
@@ -1739,7 +1753,7 @@ Public Class Defalut_PrintForm
For Each Rect As S_QRCode In Me.Draw_QRcode.Items
'Dim scale As Int16
' Dim version As Int16
Dim image As Image
Dim image As Image = Nothing
Dim data As String = ""
' Dim errorCorrect As String
Dim qrCodeEncoder1 As New ThoughtWorks.QRCode.Codec.QRCodeEncoder()
@@ -1823,6 +1837,7 @@ Public Class Defalut_PrintForm
End If
End If
If Not image Is Nothing Then image.Dispose()
Next
End If
@@ -1842,9 +1857,9 @@ Public Class Defalut_PrintForm
Private Sub pDoc_PrintPage(ByVal sender As Object, ByVal e As System.Drawing.Printing.PrintPageEventArgs) Handles pDoc.PrintPage
RaiseEvent StatusMessage("<< [P] pDoc_PrintPage : Build Print Pages", e_EventMessage.Normal)
Dim fmt As New StringFormat(StringFormatFlags.LineLimit)
Dim NewFontSize As Int16 = 10
Dim dummy As Boolean = False '//이값이 true 이면 출력시 변위를 지정해서 출력한다.
'Dim fmt As New StringFormat(StringFormatFlags.LineLimit)
'Dim NewFontSize As Int16 = 10
'Dim dummy As Boolean = False '//이값이 true 이면 출력시 변위를 지정해서 출력한다.
If Me.printindex <> -1 And SetForm.rad_repeat.Checked = False Then Me.GeTviewData(Me.PrintArray(Me.printindex), False) '//페이지를 갱신하고 출력을 시작한다.
e.Graphics.ScaleTransform(SetForm.MyProperty_Paper.가로확대비율, SetForm.MyProperty_Paper.세로확대비율) '//확대,축소비율적용