Public Class DrawInstance
  Implements Memento
  Private intg As Integer
  Private med As Mediator

  'Traktuje indeks rysunku jak obiekt
  Public Sub New(ByVal a As Integer, ByVal md As Mediator)
    intg = a       'Przechowaj indeks
    med = md
  End Sub

  ReadOnly Property integ() As Integer
    Get
      Return intg
    End Get
  End Property

  Public Sub restore() Implements vbState.Memento.restore
    med.removeDrawing(intg)
  End Sub

End Class
