Пример #1
0
        private void AddTreeNode(IOPCBrowseServerAddressSpace srv, TreeNodeCollection root, string tag)
        {
            TreeNode       item    = root.Add(tag);
            OPCChannelInfo channel = new OPCChannelInfo();

            channel.progId = serversComboBox.Text;
            channel.host   = localServerButton.Checked ? "localhost" : serverTextBox.Text;
            srv.GetItemID(tag, out channel.channel);
            item.Tag = channel;
        }
Пример #2
0
        private void AddTreeNode(IOPCBrowseServerAddressSpace srv, TreeNodeCollection root, string tag)
        {
            TreeNode       item    = root.Add(tag);
            OPCChannelInfo channel = new OPCChannelInfo
            {
                progId = txtOPCServer.Text,
                host   = txtOPCServerPath.Text
            };

            srv.GetItemID(tag, out channel.channel);
            item.Tag = channel;
        }