Esempio n. 1
0
        public void Load(OpcGroupModel model)
        {
            base.Load(model);

            Address = model.Address;

            var items = new List <OpcItem>();

            foreach (var itemModel in model.OpcItemModels)
            {
                var item = new OpcItem();
                item.Parent = this;
                item.Load(itemModel);
                items.Add(item);
            }
            OpcItems = items.ToReadOnlyCollection();
        }
Esempio n. 2
0
 public OpcAccessor <T> SetSource([MustNotEqualNull] OpcItem source)
 {
     _source              = source;
     _source.DataChanged += (obj, args) => { SetValue(ConvertFrom(args.Value, _source.TypeCode)); };
     return(this);
 }