XMLDA.NET Reference
ShowBrowseTree Class
Members  Example  See Also  Send Feedback
xmldanet Namespace : ShowBrowseTree Class

Glossary Item Box

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

ShowBrowseTree Class

Syntax

Visual Basic (Usage)Copy Code
Dim instance As ShowBrowseTree
C# 
public class ShowBrowseTree 

Remarks

This class contains methods to browse the XML-DA server and display the branches and items in a TreeView control.

It can be used in two modes:

  • initially browse only the root branch and browse each sub-branch when it is selected the first time

  • initially browse the complete server. This may take a long ime with some servers and connections

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 BasicCopy 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

System.Object
   xmldanet.ShowBrowseTree

Requirements

Target Platforms: Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows 7, Windows Server 2008 family

See Also

© 2002-2012 Advosol Inc. All Rights Reserved.