Example #1
0
        public frmInputLinkOPC(OpcBridgeSupport opc)
        {
            InitializeComponent();
            this.CDT = 0;
            this.opc = opc;
            string servers = opc.GetServers();

            if (!String.IsNullOrWhiteSpace(servers))
            {
                tvServers.Nodes.Clear();
                string[] list = servers.Split(new char[] { ';' });
                string   root = String.Empty;
                TreeNode node = null;
                foreach (string line in list)
                {
                    if (!String.IsNullOrWhiteSpace(line))
                    {
                        string[] items = line.Split(new char[] { '=' });
                        if (items[0] != root)
                        {
                            root = items[0];
                            node = tvServers.Nodes.Add(root);
                        }
                        if (node != null && items.Length == 2)
                        {
                            node.Nodes.Add(items[1]).Nodes.Add("stab");
                        }
                    }
                }
            }
        }
Example #2
0
 public frmFetchingOPC()
 {
     InitializeComponent();
     opc       = new OpcBridgeSupport();
     this.Size = new System.Drawing.Size();
 }