VERSION 1.0 CLASS
BEGIN
  MultiUse = -1  'True
  Persistable = 0  'NotPersistable
  DataBindingBehavior = 0  'vbNone
  DataSourceBehavior  = 0  'vbNone
  MTSTransactionMode  = 0  'NotAnMTSObject
END
Attribute VB_Name = "plugin"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = True
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = True
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''
'Events:
' Setup = Wenn Plugin Clientseitig geladen
' SetUpServer = Wenn Plugin Serverseitig geladen wird
'
' Desc = Client fragt Beschreibung ab für Plugin-Form
' Author = Client fragt Autor ab für Plugin-Form
'
' ShowClient = Client (bzw. User) startet Plugin :)
'
' GetData(<data>) = Plugin empfängt daten!
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''
'Public Commands
' OBJ.Pluginstatus "text" = Added einen Text in den Statuslog des Clienten
' OBJ.PluginSendData "text" = Daten an Plugin @ Server senden (wird mit GetData() empfangen!)
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Public Sub SetUp(NewForm As Object, tIndex As Long)
    Set OBJ = NewForm
    Index2 = tIndex
End Sub
Public Sub SetUpServer(NewForm As Object)
    Set OBJ = NewForm
End Sub
Public Function Desc() As String
    Desc = "Editing Time and Date at server's computer"
End Function
Public Function Author() As String
    Author = "sNiper109"
End Function

Public Function ShowClient() As String
    FormClient.Show
End Function

Public Sub GetData(DATA As String)
    'Das empfängt der server:
    
    If DATA = "GET_TIMEDATE" Then 'Client will datum/zeit abfragen (siehe FormClient)
        OBJ.PluginSendData Now   'Datum/Zeit zurückschicken
    End If
    
    If Split(DATA, " ")(0) = "SET_TIMEDATE" Then 'Client will datum/zeit SETZEN (siehe FormClient)
        Date = Split(DATA, " ")(1) 'datum/zeit splitten + setzen
        Time = Split(DATA, " ")(2)
        OBJ.PluginSendData "OK" 'ein OK ausgeben ;)
    End If
    
    'und das der client:
    If DATA Like "??.??.???? ??:??:??" Then 'Wir haben wohl ein datum/zeit string empfangen ;)
        FormClient.txtDate = Split(DATA, " ")(0) 'datum/zeit splitten + ausgeben
        FormClient.txtTime = Split(DATA, " ")(1)
    End If
    
    If DATA = "OK" Then 'ok von server bekommen :)
        MsgBox "New Time/Date should be set!", vbInformation
    End If
End Sub

