VERSION 1.0 CLASS
BEGIN
  MultiUse = -1  'True
  Persistable = 0  'NotPersistable
  DataBindingBehavior = 0  'vbNone
  DataSourceBehavior  = 0  'vbNone
  MTSTransactionMode  = 0  'NotAnMTSObject
END
Attribute VB_Name = "ImgChain"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = True
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = False
Option Explicit
'Klasa ImgChain
Implements Chain
Private chn As Chain
Private hasLink As Boolean
Private fl As File
Private img As Image
'--------
Private Sub Chain_addChain(c As Chain)
  Set chn = c
  hasLink = True
End Sub
'--------
Private Function Chain_getChain() As Chain
  Set Chain_getChain = chn
End Function
'--------
Private Function Chain_hasChain() As Boolean
  Chain_hasChain = hasLink
End Function
'--------
Private Sub Chain_sendToChain(mesg As String)
  fl.setFilename App.Path & "\" & mesg & ".jpg"
  If fl.exists Then
    img.Picture = LoadPicture(fl.getFilename)
  Else
    chn.sendToChain mesg
  End If
End Sub
'--------
Private Sub Chain_setControl(c As Control)
  Set img = c
End Sub
'--------
Private Sub Class_Initialize()
  hasLink = False
  Set fl = New File
End Sub
