Microsoft Chat Server Development Guide

ChatServerPP.pag

Option Explicit

' Hold a late bound (IDispatch) reference to our extension
' This saves use having to reference the typelib for the extensions
Dim gMyExtension As Object


' When ever the check box changes,
' tell the page that to enable the apply button
Private Sub chkLog_Click()
    Changed = True
End Sub


' On OK or APPLY, update the extensions property with the state of the checkbox
Private Sub PropertyPage_ApplyChanges()
    If Not gMyExtension Is Nothing Then
        gMyExtension.EnableLogging = IIf(chkLog, True, False)
        Changed = False
    End If
End Sub


Private Sub PropertyPage_SelectionChanged()
    If SelectedControls.Count > 0 Then ' Just to make sure we have a reference to the ChatServer
        Set gMyExtension = SelectedControls(0).Configuration.ChatExtensions("LogMonitor").Instance
        
        If Not gMyExtension Is Nothing Then
            chkLog.Enabled = True   ' leave the checkbox disabled if we can't access the extension
            chkLog = IIf(gMyExtension.EnableLogging, 1, 0)
            Changed = False
        End If
    End If
End Sub

© 1998 Microsoft Corporation. All rights reserved.