Пример #1
0
        private void SetACItem(ArrayList list, XmlNode node)
        {
            if (node != null && node.FirstChild != null)
            {
                CACItem config = new CACItem();

                foreach (XmlNode xSubNode in node.ChildNodes)
                {
                    if (xSubNode.FirstChild != null && xSubNode.FirstChild.Value != null)
                    {
                        if (xSubNode.Name.Equals("Name"))
                        {
                            config.Name = xSubNode.FirstChild.Value;
                        }
                        else if (xSubNode.Name.Equals("Type"))
                        {
                            config.Name = xSubNode.FirstChild.Value;
                        }
                        else if (xSubNode.Name.Equals("CtrlOpt"))
                        {
                            config.CtrlOpt = Convert.ToUInt16(xSubNode.FirstChild.Value);
                        }
                    }
                }

                lock (list.SyncRoot)
                {
                    list.Add(config);
                }
            }
        }
Пример #2
0
        public IACItem AppendACItem()
        {
            IACItem acitme = new CACItem();

            lock (mACItemList.SyncRoot)
            {
                mACItemList.Add(acitme);
            }
            return(acitme);
        }