Imports System
Imports System.ComponentModel
Imports System.Drawing
Imports System.Windows.Forms


'Klasa pochodna klasy PictureBox 
' rysuje koło 
' oraz ogród 
Public Class GardenPic
    Inherits PictureBox
    Private gden As Garden

    Public Sub setGarden(ByVal gd As Garden)
        gden = gd      'Skopiuj bieżący ogród
    End Sub

    Protected Overrides Sub OnPaint(ByVal e As PaintEventArgs)
        Dim g As Graphics = e.Graphics
        Dim br As New SolidBrush(Color.Gray)

        'Narysuj koło 
        g.FillEllipse(br, 5, 5, 100, 100)
        'Odrysuj ogród
        gden.draw(g)

    End Sub
End Class

