Imports System.ComponentModel Public Class DrawShape End Class Public Class Shape_Circle Public Draw_Circle() As C_Epole.S_Circle Public Sub New() Draw_Circle = Nothing End Sub Public Sub Add(ByVal Obj As C_Epole.S_Circle) Try If Me.Draw_Circle Is Nothing Then ReDim Me.Draw_Circle(0) Me.Draw_Circle(0) = Obj ' MsgBox("처음" & Obj.X & "/" & Obj.Y & "/" & Obj.Width & "/" & Obj.Height) Else If Me.Draw_Circle.GetUpperBound(0) < 0 Then ReDim Me.Draw_Circle(0) Me.Draw_Circle(0) = Obj ' MsgBox("처음-1") Else ReDim Preserve Me.Draw_Circle(Me.Draw_Circle.GetUpperBound(0) + 1) Me.Draw_Circle(Me.Draw_Circle.GetUpperBound(0)) = Obj ' MsgBox("추가") End If End If Catch ex As Exception ReDim Me.Draw_Circle(0) Me.Draw_Circle(0) = Obj ' MsgBox("에러") End Try End Sub Public Sub Delete(ByVal Idx As Short) Dim NewBox(Me.Draw_Circle.GetUpperBound(0) - 1) As C_Epole.S_Circle Dim j As Short = 0 For i As Short = 0 To Me.Draw_Circle.GetUpperBound(0) If i <> Idx Then NewBox(j) = Me.Draw_Circle(i) j += 1 End If Next Me.Draw_Circle = NewBox End Sub Public Function Count() As Short Try Return Me.Draw_Circle.GetUpperBound(0) + 1 Catch ex As Exception Return 0 End Try End Function Property item(ByVal idx As Short) As C_Epole.S_Circle Get Return Me.Draw_Circle(idx) End Get Set(ByVal value As C_Epole.S_Circle) Me.Draw_Circle(idx) = value End Set End Property 'Public Function Item(ByVal idx As Short) As C_Epole.S_Box ' Return Me.Draw_Box(idx) 'End Function Public Function Items() As C_Epole.S_Circle() If Me.Count <= 0 Then Return Nothing Return Me.Draw_Circle End Function End Class Public Class Shape_Box Public Draw_Box() As C_Epole.S_Box Public Sub New() Draw_Box = Nothing End Sub Public Sub Add(ByVal Obj As C_Epole.S_Box) Try If Me.Draw_Box Is Nothing Then ReDim Me.Draw_Box(0) Me.Draw_Box(0) = Obj ' MsgBox("처음" & Obj.X & "/" & Obj.Y & "/" & Obj.Width & "/" & Obj.Height) Else If Me.Draw_Box.GetUpperBound(0) < 0 Then ReDim Me.Draw_Box(0) Me.Draw_Box(0) = Obj ' MsgBox("처음-1") Else ReDim Preserve Me.Draw_Box(Me.Draw_Box.GetUpperBound(0) + 1) Me.Draw_Box(Me.Draw_Box.GetUpperBound(0)) = Obj ' MsgBox("추가") End If End If Catch ex As Exception ReDim Me.Draw_Box(0) Me.Draw_Box(0) = Obj ' MsgBox("에러") End Try End Sub Public Sub Delete(ByVal Idx As Short) Dim NewBox(Me.Draw_Box.GetUpperBound(0) - 1) As C_Epole.S_Box Dim j As Short = 0 For i As Short = 0 To Me.Draw_Box.GetUpperBound(0) If i <> Idx Then NewBox(j) = Me.Draw_Box(i) j += 1 End If Next Me.Draw_Box = NewBox End Sub Public Function Count() As Short Try Return Me.Draw_Box.GetUpperBound(0) + 1 Catch ex As Exception Return 0 End Try End Function Property item(ByVal idx As Short) As C_Epole.S_Box Get Return Me.Draw_Box(idx) End Get Set(ByVal value As C_Epole.S_Box) Me.Draw_Box(idx) = value End Set End Property 'Public Function Item(ByVal idx As Short) As C_Epole.S_Box ' Return Me.Draw_Box(idx) 'End Function Public Function Items() As C_Epole.S_Box() If Me.Count <= 0 Then Return Nothing Return Me.Draw_Box End Function End Class Public Class Shape_QRcode Public Draw_QRcode() As C_Epole.S_QRCode Public Sub New() Draw_QRcode = Nothing End Sub Public Sub Add(ByVal Obj As C_Epole.S_QRCode) Try If Me.Draw_QRcode Is Nothing Then ReDim Me.Draw_QRcode(0) Me.Draw_QRcode(0) = Obj ' MsgBox("처음" & Obj.X & "/" & Obj.Y & "/" & Obj.Width & "/" & Obj.Height) Else If Me.Draw_QRcode.GetUpperBound(0) < 0 Then ReDim Me.Draw_QRcode(0) Me.Draw_QRcode(0) = Obj ' MsgBox("처음-1") Else ReDim Preserve Me.Draw_QRcode(Me.Draw_QRcode.GetUpperBound(0) + 1) Me.Draw_QRcode(Me.Draw_QRcode.GetUpperBound(0)) = Obj ' MsgBox("추가") End If End If Catch ex As Exception ReDim Me.Draw_QRcode(0) Me.Draw_QRcode(0) = Obj ' MsgBox("에러") End Try End Sub Public Sub Delete(ByVal Idx As Short) Dim NewQRcode(Me.Draw_QRcode.GetUpperBound(0) - 1) As C_Epole.S_QRCode Dim j As Short = 0 For i As Short = 0 To Me.Draw_QRcode.GetUpperBound(0) If i <> Idx Then NewQRcode(j) = Me.Draw_QRcode(i) j += 1 End If Next Me.Draw_QRcode = NewQRcode End Sub Public Function Count() As Short Try Return Me.Draw_QRcode.GetUpperBound(0) + 1 Catch ex As Exception Return 0 End Try End Function Property item(ByVal idx As Short) As C_Epole.S_QRCode Get Return Me.Draw_QRcode(idx) End Get Set(ByVal value As C_Epole.S_QRCode) Me.Draw_QRcode(idx) = value End Set End Property 'Public Function Item(ByVal idx As Short) As C_Epole.S_Box ' Return Me.Draw_Box(idx) 'End Function Public Function Items() As C_Epole.S_QRCode() If Me.Count <= 0 Then Return Nothing Return Me.Draw_QRcode End Function End Class Public Class Shape_line Public Draw_line() As C_Epole.S_Line Public Sub New() Draw_line = Nothing End Sub Public Sub Add(ByVal Obj As C_Epole.S_Line) Try If Me.Draw_line Is Nothing Then ReDim Me.Draw_line(0) Me.Draw_line(0) = Obj Else If Me.Draw_line.GetUpperBound(0) < 0 Then ReDim Me.Draw_line(0) Me.Draw_line(0) = Obj Else ReDim Preserve Me.Draw_line(Me.Draw_line.GetUpperBound(0) + 1) Me.Draw_line(Me.Draw_line.GetUpperBound(0)) = Obj End If End If Catch ex As Exception ReDim Me.Draw_line(0) Me.Draw_line(0) = Obj End Try End Sub Public Sub Delete(ByVal Idx As Short) Dim NewBox(Me.Draw_line.GetUpperBound(0) - 1) As C_Epole.S_Line Dim j As Short = 0 For i As Short = 0 To Me.Draw_line.GetUpperBound(0) If i <> Idx Then NewBox(j) = Me.Draw_line(i) j += 1 End If Next Me.Draw_line = NewBox End Sub Public Function Count() As Short Try Return Me.Draw_line.GetUpperBound(0) + 1 Catch ex As Exception Return 0 End Try End Function Public Property Item(ByVal idx As Short) As C_Epole.S_Line Get Return Me.Draw_line(idx) End Get Set(ByVal value As C_Epole.S_Line) Me.Draw_line(idx) = value End Set End Property 'Public Function Item(ByVal idx As Short) As C_Epole.S_Line ' Return Me.Draw_line(idx) 'End Function Public Function Items() As C_Epole.S_Line() If Me.Count <= 0 Then Return Nothing Return Me.Draw_line End Function End Class Public Class Shape_Image Public Draw_Image() As C_Epole.S_Image Public Sub New() Draw_Image = Nothing End Sub Public Sub Add(ByVal Obj As C_Epole.S_Image) Try If Me.Draw_Image Is Nothing Then ReDim Me.Draw_Image(0) Me.Draw_Image(0) = Obj ' MsgBox("처음" & Obj.X & "/" & Obj.Y & "/" & Obj.Width & "/" & Obj.Height) Else If Me.Draw_Image.GetUpperBound(0) < 0 Then ReDim Me.Draw_Image(0) Me.Draw_Image(0) = Obj ' MsgBox("처음-1") Else ReDim Preserve Me.Draw_Image(Me.Draw_Image.GetUpperBound(0) + 1) Me.Draw_Image(Me.Draw_Image.GetUpperBound(0)) = Obj ' MsgBox("추가") End If End If Catch ex As Exception ReDim Me.Draw_Image(0) Me.Draw_Image(0) = Obj ' MsgBox("에러") End Try End Sub Public Sub Delete(ByVal Idx As Short) Dim NewBox(Me.Draw_Image.GetUpperBound(0) - 1) As C_Epole.S_Image Dim j As Short = 0 For i As Short = 0 To Me.Draw_Image.GetUpperBound(0) If i <> Idx Then NewBox(j) = Me.Draw_Image(i) j += 1 End If Next Me.Draw_Image = NewBox End Sub Public Function Count() As Short Try Return Me.Draw_Image.GetUpperBound(0) + 1 Catch ex As Exception Return 0 End Try End Function Property item(ByVal idx As Short) As C_Epole.S_Image Get Return Me.Draw_Image(idx) End Get Set(ByVal value As C_Epole.S_Image) Me.Draw_Image(idx) = value End Set End Property 'Public Function Item(ByVal idx As Short) As C_Epole.S_Box ' Return Me.Draw_Box(idx) 'End Function Public Function Items() As C_Epole.S_Image() If Me.Count <= 0 Then Return Nothing Return Me.Draw_Image End Function End Class