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

Public Class listObs
  Inherits System.Windows.Forms.Form
  Implements Observer

  Public Sub New(ByVal subj As Subject)
    MyBase.New()
    listObs = Me
    InitializeComponent()
    subj.registerInterest(Me)
  End Sub
  '-----
  'Form overrides dispose to clean up the component list.
  Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
    If disposing Then
      If Not (components Is Nothing) Then
        components.Dispose()
      End If
    End If
    MyBase.Dispose(disposing)
  End Sub

#Region " Windows Form Designer generated code "

  'Required by the Windows Form Designer
  Private components As System.ComponentModel.Container
  Private WithEvents lsColors As System.Windows.Forms.ListBox

  Dim WithEvents listObs As System.Windows.Forms.Form

  'NOTE: The following procedure is required by the Windows Form Designer
  'It can be modified using the Windows Form Designer.  
  'Do not modify it using the code editor.
  Private Sub InitializeComponent()
    Me.components = New System.ComponentModel.Container()
    Me.lsColors = New System.Windows.Forms.ListBox()

    '@design Me.TrayHeight = 0
    '@design Me.TrayLargeIcon = False
    '@design Me.TrayAutoArrange = True
    lsColors.Location = New System.Drawing.Point(32, 24)
    lsColors.Size = New System.Drawing.Size(224, 184)
    lsColors.Font = New System.Drawing.Font("Microsoft Sans Serif", 12.0!)
    lsColors.TabIndex = 0

    Me.Text = "listObs"
    Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)

    Me.Controls.Add(lsColors)
  End Sub

#End Region
  '-----
  Public Sub sendNotify(ByVal mesg As System.String) Implements Observer.sendNotify
    lsColors.Items.Add(mesg)
  End Sub

End Class
