NSDClientCountEventArgs メンバ
NSDClientCountで定期発生イベントの引数で渡されるクラス。
●コンストラクタ
名前 説明 NSDClientCountEventArgs NSDClientCountEventArgsを初期化します。
●プロパティの一覧
名前 説明 List コンピュータ名のリストを返します。
●NSDClientCountEventArgsコンストラクタの説明
構文:Public Sub New()
使用法:Dim Cls_NSDCEA As New NSDClientCount.NSDClientCountEventArgs
引数:なし。
使用例:
Public Class Form1 Dim Cls_NSDCEA As New NSDClientCount.NSDClientCountEventArgs : End Class
●NSDClientCountEventArgsプロパティの説明
名前:List
構文:Public Property List() As System.Collections.ArrayList
機能:コンピュータ名のリストを設定します。
Get値:コンピュータ名のリストを取得します。
使用例:
Public Class Form1 Dim ClsPrv_NSDCC As NSDClientCount = Nothing Private Sub Form1_Load( sender As System.Object, _ e As System.EventArgs _ ) Handles MyBase.Load Try ClsPrv_NSDCC = New NSDClientCount Dim Str_MailSlotName As String = "Test\Client\Count\Check" If Not ClsPrv_NSDCC.Init_ClientCount(Str_MailSlotName, _ True, _ AddressOf NSDCCTimerTick) Then MsgBox( "初期化に失敗しました。" & _ ControlChars.CrLf & _ "コンピュータを再起動してください。") End End If Catch ex As Exception End Try End Sub Private Sub Form1_FormClosed( sender As Object, _ e As System.Windows.Forms.FormClosedEventArgs _ ) Handles Me.FormClosed Try ' 解放処理。 If Not (ClsPrv_NSDCC Is Nothing) Then ClsPrv_NSDCC.Dispose() ClsPrv_NSDCC = Nothing End If Catch ex As Exception End Try End Sub Private Sub NSDCCTimerTick( ByVal sender As Object, _ ByVal e As NSDClientCount.NSDClientCountEventArgs) Try ' タイマーを停止します。 CType(sender, NSDClientCount).TimerEnabled = False ' コンピュータ名をセットします。 With Me.ListBox1 .Items.Clear() If Not (e.List Is Nothing) Then For Int_Loop As Integer = 0 to e.List.Count - 1 .Items.Add(e.List.Item(Int_Loop)) Next End If End With Catch ex As Exception Finally ' タイマーを開始します。 CType(sender, NSDClientCount).TimerEnabled = True End Try End Sub End Class
Copyright (C) 2013 Nihon System Developer Corp. All Rights Reserved.