Public Class MainWindow Inherits System.Windows.Forms.Form Implements ULServerSyncListener
Private conn As ULConnection
Public Sub New(ByVal args() As String) MyBase.New()
'呼び出し InitializeComponent() が、Windows Form Designer には必要です
'Add any initialization after the InitializeComponent() call ULConnection.DatabaseManager.SetServerSyncListener( _ "myCompany.mymsg",
"myCompany.myapp", Me _ ) 'Create Connection ...End Sub
Protected Overrides Sub OnClosing( _ ByVal e As System.ComponentModel.CancelEventArgs _ ) ULConnection.DatabaseManager.SetServerSyncListener(
_ Nothing, Nothing, Nothing _ ) MyBase.OnClosing(e) End Sub
Public Sub ServerSyncInvoked(ByVal messageName As String) _ Implements ULServerSyncListener.ServerSyncInvoked
Me.Invoke(New EventHandler(AddressOf Me.ServerSyncAction)) End Sub
Public Sub ServerSyncAction( _ ByVal sender As Object, ByVal e As EventArgs _ ) ' Do Server sync conn.Synchronize() End Sub
End Class