Browses the server ans displays all branches in the TreeView control
and the items of the selected branch in the ListView control.
Browses the server ans displays all branches in the TreeView control
and the items of the selected branch in the ListView control.
Object Model
Syntax
C# | |
---|
public class ShowBrowseTree |
Remarks
Example
C# | Copy Code |
---|
string serverUrl = "http://tswinc.us/XMLDADemo/ts_sim/OpcDaGateway.asmx";
private void btnBrowseTreeList_Click(object sender, System.EventArgs e)
{
XmlServer Srv = new XmlServer( serverUrl );
try
{
OPCError[] err ;
ShowBrowseTreeList sbtl = new ShowBrowseTree( Srv, tvTree );
//sbtl.BrowseModeOneLevel = false ; // force full initial browse
err = sbtl.Show( null ); // no root name displayed
if( (err != null) && (err.Length>0) )
MessageBox.Show( err[0].Text, "Error at Browse" );
}
catch( Exception ex )
{
MessageBox.Show( ex.Message, "Error at Browse" );
}
} |
Visual Basic | Copy Code |
---|
Dim serverUrl As String = "http://tswinc.us/XMLDADemo/ts_sim/OpcDaGateway.asmx"
Private Sub btnBrowseTreeList_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) _
Handles btnBrowseTreeList.Click
Dim Srv As XmlServer = New XmlServer(serverUrl)
Dim err As OPCError()
Try
Dim sbtl As ShowBrowseTreeList = New ShowBrowseTree(Srv, tvTree)
' sbtl.BrowseModeOneLevel = False 'force full initial browse
err = sbtl.Show(Nothing) ' no root name displayed
If Not err Is Nothing Then
If err.Length > 0 Then
MessageBox.Show(err(0).Text, "Error at Browse")
End If
End If
Catch ex As Exception
MessageBox.Show(ex.Message, "Error at Browse")
End Try
End Sub |
Inheritance Hierarchy
Requirements
Target Platforms: Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows 7, Windows Server 2008 family
See Also