Imports DigitalData.Modules.Logging
Imports DigitalData.Modules.Database

Public Class Form1
    Private _Database As MSSQLServer
    Private Sub Form1_Load(sender As Object, e As EventArgs) Handles Me.Load
        Dim oLogConfig As New LogConfig(LogConfig.PathType.CustomPath, Application.StartupPath)
        Dim oConnectionString = "Server=sDD-VMP04-SQL17\DD_DEVELOP01;Database=IDB_TEST;User Id=sa;Password=dd;"
        Me._Database = New MSSQLServer(oLogConfig, oConnectionString)
        ChatControl1.Init(oLogConfig, oConnectionString, "Email", "JenneJ", "de-DE", Nothing)
        ChatControl1.GetConversations(10070,True)
        Dim oSQL = "SELECT GUID as UserID,NAME,USERNAME,EMAIL from TBDD_USER"
        Dim oDTUSERS As DataTable = _Database.GetDatatable(oSQL)

        ChatNewConv1.Init(oLogConfig, oConnectionString, 10070, "SchreiberM", "de-DE", oDTUSERS, Nothing)
        AddHandler ChatNewConv1.Conversation_Created, AddressOf onConversationCreated

    End Sub
    Sub onConversationCreated()
        MsgBox("Created")
    End Sub

End Class
