From 45f2854c4953b01593fda306f162a20fbfc0501d Mon Sep 17 00:00:00 2001 From: chi Date: Sun, 24 May 2020 21:12:27 +0900 Subject: [PATCH 1/2] =?UTF-8?q?fp5,fp13=20=EC=86=94=EB=A3=A8=EC=85=98=20?= =?UTF-8?q?=ED=8C=8C=EC=9D=BC=20=ED=86=B5=ED=95=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Project/CEpole.vbproj.user | 19 +++++++++++++++++++ Project/desktop.ini | 2 -- Project_fp13/CEpole_fp13.vbproj | 2 +- Project_fp13/CEpole_fp13.vbproj.user | 19 +++++++++++++++++++ Project_fp5/CEpole_fp5.vbproj | 2 +- Project_fp5/CEpole_fp5.vbproj.user | 19 +++++++++++++++++++ 6 files changed, 59 insertions(+), 4 deletions(-) create mode 100644 Project/CEpole.vbproj.user delete mode 100644 Project/desktop.ini create mode 100644 Project_fp13/CEpole_fp13.vbproj.user create mode 100644 Project_fp5/CEpole_fp5.vbproj.user diff --git a/Project/CEpole.vbproj.user b/Project/CEpole.vbproj.user new file mode 100644 index 0000000..856def9 --- /dev/null +++ b/Project/CEpole.vbproj.user @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + ko-KR + false + + \ No newline at end of file diff --git a/Project/desktop.ini b/Project/desktop.ini deleted file mode 100644 index ba588e2..0000000 --- a/Project/desktop.ini +++ /dev/null @@ -1,2 +0,0 @@ -[.ShellClassInfo] -IconResource=C:\Windows\system32\SHELL32.dll,17 diff --git a/Project_fp13/CEpole_fp13.vbproj b/Project_fp13/CEpole_fp13.vbproj index 3fc9244..a31a14c 100644 --- a/Project_fp13/CEpole_fp13.vbproj +++ b/Project_fp13/CEpole_fp13.vbproj @@ -240,7 +240,7 @@ - + {FC8D5F6B-9892-48A4-BD90-4FA6F427567C} ArinClassV2 diff --git a/Project_fp13/CEpole_fp13.vbproj.user b/Project_fp13/CEpole_fp13.vbproj.user new file mode 100644 index 0000000..856def9 --- /dev/null +++ b/Project_fp13/CEpole_fp13.vbproj.user @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + ko-KR + false + + \ No newline at end of file diff --git a/Project_fp5/CEpole_fp5.vbproj b/Project_fp5/CEpole_fp5.vbproj index 9b5943e..30b6638 100644 --- a/Project_fp5/CEpole_fp5.vbproj +++ b/Project_fp5/CEpole_fp5.vbproj @@ -232,7 +232,7 @@ - + {FC8D5F6B-9892-48A4-BD90-4FA6F427567C} ArinClassV2 diff --git a/Project_fp5/CEpole_fp5.vbproj.user b/Project_fp5/CEpole_fp5.vbproj.user new file mode 100644 index 0000000..856def9 --- /dev/null +++ b/Project_fp5/CEpole_fp5.vbproj.user @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + ko-KR + false + + \ No newline at end of file From 33633b398221d3c26ab56f43ee1d1fb18ec72a59 Mon Sep 17 00:00:00 2001 From: chii Date: Thu, 5 Nov 2020 22:05:11 +0900 Subject: [PATCH 2/2] =?UTF-8?q?=ED=81=AC=EA=B8=B0=EB=B3=80=EA=B2=BD?= =?UTF-8?q?=EB=90=9C=20=EA=B0=9C=EC=B2=B4=EC=9D=98=20=EA=B8=80=EC=9E=90?= =?UTF-8?q?=ED=81=AC=EA=B8=B0=20=EA=B3=84=EC=82=B0=EC=8B=9D=20=EB=B3=80?= =?UTF-8?q?=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Project_fp5/CEpole_fp5.vbproj | 2 +- Project_fp5/C_label.vb | 8 +++++++ Project_fp5/Defalut_PrintForm.vb | 41 +++++++++++++++++++++++--------- 3 files changed, 39 insertions(+), 12 deletions(-) diff --git a/Project_fp5/CEpole_fp5.vbproj b/Project_fp5/CEpole_fp5.vbproj index 30b6638..a47809c 100644 --- a/Project_fp5/CEpole_fp5.vbproj +++ b/Project_fp5/CEpole_fp5.vbproj @@ -5,7 +5,7 @@ AnyCPU 9.0.21022 2.0 - {78345183-B834-4478-BD7A-775BFCCE2168} + {A8FF605F-231E-4DC1-9CD8-FD1466FDE5CD} Library CEpole CEpole diff --git a/Project_fp5/C_label.vb b/Project_fp5/C_label.vb index e823889..3af9cc9 100644 --- a/Project_fp5/C_label.vb +++ b/Project_fp5/C_label.vb @@ -62,8 +62,16 @@ Public Class C_label ''' ''' ''' + Public Function GetSize(g As Graphics) As SizeF + ' Return System.Windows.Forms.TextRenderer.MeasureText(text2, Font) + Return g.MeasureString(text2, Font) + + End Function + Public Function GetSize() As SizeF Return System.Windows.Forms.TextRenderer.MeasureText(text2, Font) + 'Return g.MeasureString(text2, Font) + End Function Private Sub RotateAt(ByVal gr As Graphics, ByVal cx As Integer, ByVal cy As Integer, ByVal angle As Single) diff --git a/Project_fp5/Defalut_PrintForm.vb b/Project_fp5/Defalut_PrintForm.vb index 567f75a..c5d8aae 100644 --- a/Project_fp5/Defalut_PrintForm.vb +++ b/Project_fp5/Defalut_PrintForm.vb @@ -1507,18 +1507,35 @@ Public Class Defalut_PrintForm If obj.WordWidth = 100 AndAlso obj.WordHeight = 100 Then '//이미지확대축소 디지않았을경우 Ga.DrawString(obj.text2, obj.Font, Brush, NewLeft, NewTop) - Else '//이미지확대축소 됬을경우 + Else '//이미지확대축소 됬을경우 + + 'Dim aNewX = obj.GetSize().Width * (obj.WordWidth / 100.0) '* (Ga.DpiX / SrcG.DpiX) + 'Dim aNewY = obj.GetSize().Height * (obj.WordHeight / 100.0) ' * (Ga.DpiY / SrcG.DpiY) + + If Not Print Then - NewX = obj.GetSize.Width * (obj.WordWidth / 100) '* (Ga.DpiX / SrcG.DpiX) - NewY = obj.GetSize.Height * (obj.WordHeight / 100) ' * (Ga.DpiY / SrcG.DpiY) + NewX = obj.GetSize(Ga).Width * (obj.WordWidth / 100.0) '* (Ga.DpiX / SrcG.DpiX) + NewY = obj.GetSize(Ga).Height * (obj.WordHeight / 100.0) ' * (Ga.DpiY / SrcG.DpiY) Else - NewX = obj.GetSize.Width * (obj.WordWidth / 100) * (Ga.DpiX / SrcG.DpiX) - NewY = obj.GetSize.Height * (obj.WordHeight / 100) * (Ga.DpiY / SrcG.DpiY) + NewX = obj.GetSize(Ga).Width * (obj.WordWidth / 100.0) * (Ga.DpiX / SrcG.DpiX) + NewY = obj.GetSize(Ga).Height * (obj.WordHeight / 100.0) * (Ga.DpiY / SrcG.DpiY) End If + + 'If Not Print Then + ' NewX = obj.GetSize().Width * (obj.WordWidth / 100.0) '* (Ga.DpiX / SrcG.DpiX) + ' NewY = obj.GetSize().Height * (obj.WordHeight / 100.0) ' * (Ga.DpiY / SrcG.DpiY) + 'Else + ' NewX = obj.GetSize().Width * (obj.WordWidth / 100.0) * (Ga.DpiX / SrcG.DpiX) + ' NewY = obj.GetSize().Height * (obj.WordHeight / 100.0) * (Ga.DpiY / SrcG.DpiY) + 'End If + + Dim BMP As New Bitmap(NewX, NewY, Ga) Dim G As Graphics = Graphics.FromImage(BMP) - G.ScaleTransform((obj.WordWidth / 100), (obj.WordHeight / 100)) - G.DrawString(obj.text2, obj.Font, Brush, 0, 0) + 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 @@ -3061,11 +3078,12 @@ Public Class Defalut_PrintForm Dim selitem As New ArrayList '//마우스클릭했을때 여러개가 겹친경우 해당 아이템들을 넣는곳 + Dim g As Graphics = CreateGraphics() Tobj = Nothing For i As Integer = 0 To Me.AllLabels.GetUpperBound(0) If Me.AllLabels(i).visible AndAlso Me.AllLabels(i).Text <> "" AndAlso _ - ((e.X >= Me.AllLabels(i).Left) And e.X <= (Me.AllLabels(i).Left + Me.AllLabels(i).GetSize.Width)) _ - AndAlso ((e.Y >= Me.AllLabels(i).Top) AndAlso (e.Y <= (Me.AllLabels(i).Top + Me.AllLabels(i).GetSize.Height))) Then + ((e.X >= Me.AllLabels(i).Left) And e.X <= (Me.AllLabels(i).Left + Me.AllLabels(i).GetSize(g).Width)) _ + AndAlso ((e.Y >= Me.AllLabels(i).Top) AndAlso (e.Y <= (Me.AllLabels(i).Top + Me.AllLabels(i).GetSize(g).Height))) Then Tobj = Me.AllLabels(i) selitem.Add(Me.AllLabels(i)) 'Exit For @@ -3157,10 +3175,11 @@ Public Class Defalut_PrintForm '//더블클릭하면 번호표시형태를 변경할수 있게한다. If Me.DMode = E_DesignMode.Text Then Dim Tobj As CEpole.C_label = Nothing + Dim g As Graphics = CreateGraphics() For i As Integer = 0 To Me.AllLabels.GetUpperBound(0) If Me.AllLabels(i).visible AndAlso Me.AllLabels(i).Text <> "" AndAlso _ - ((e.X >= Me.AllLabels(i).Left) And e.X <= (Me.AllLabels(i).Left + Me.AllLabels(i).GetSize.Width)) _ - AndAlso ((e.Y >= Me.AllLabels(i).Top) AndAlso (e.Y <= (Me.AllLabels(i).Top + Me.AllLabels(i).GetSize.Height))) Then + ((e.X >= Me.AllLabels(i).Left) And e.X <= (Me.AllLabels(i).Left + Me.AllLabels(i).GetSize(g).Width)) _ + AndAlso ((e.Y >= Me.AllLabels(i).Top) AndAlso (e.Y <= (Me.AllLabels(i).Top + Me.AllLabels(i).GetSize(g).Height))) Then Tobj = Me.AllLabels(i) Exit For End If