Opc.Ua.Client.Controls.SelectNodeDlg.ShowDialog C# (CSharp) Method

ShowDialog() public method

Prompts the user to select a node.
public ShowDialog ( Session session, Opc.Ua.NodeId rootId, string caption ) : Opc.Ua.NodeId
session Opc.Ua.Client.Session
rootId Opc.Ua.NodeId
caption string
return Opc.Ua.NodeId
        public NodeId ShowDialog(
            Session session,
            NodeId rootId,
            string caption,
            params NodeId[] referenceTypeIds)
        {
            // set the caption.
            if (!String.IsNullOrEmpty(caption))
            {
                this.Text = caption;
            }

            // set default root.
            if (NodeId.IsNull(rootId))
            {
                rootId = Opc.Ua.ObjectIds.ObjectsFolder;
            }

            // set default reference type.
            if (referenceTypeIds == null)
            {
                referenceTypeIds = new NodeId[] { Opc.Ua.ReferenceTypeIds.HierarchicalReferences };
            }

            // initialize the control.
            BrowseCTRL.Initialize(session, rootId, referenceTypeIds);

            // display the dialog.
            if (ShowDialog() != DialogResult.OK)
            {
                return null;
            }

            // convert to a node id.
            ReferenceDescription reference = BrowseCTRL.SelectedNode;

            if (reference != null && !reference.NodeId.IsAbsolute)
            {
                return (NodeId)reference.NodeId;
            }

            return null;
        }

Same methods

SelectNodeDlg::ShowDialog ( Session session, Opc.Ua.NodeId rootId, ViewDescription view, string caption ) : ReferenceDescription