WeightSystem_OBJProxy.cs 1.37 KB
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using FObjBase;
using FLY.Weight2.OBJ_INTERFACE;
using System.Net;
using FLY.Weight2.Common;
using FLY.OBJComponents.Server.OBJProxy;
using System.ComponentModel;
using FLY.Weight2.Server.Model;
using FLY.OBJComponents.IService;

namespace FLY.Weight2.Server.OBJProxy
{
    public class WeightSystem_OBJProxy : FObj
    {
        WeightSystem data;



        public WeightSystem_OBJProxy(int objsys_idx, UInt32 id, WeightSystem data):base(objsys_idx)
        {
            ID = id;
            this.data = data;

            //--------------------------------------------------------------
            //属性同步
            Dictionary<string, INotifyPropertyChanged> objnames = new Dictionary<string, INotifyPropertyChanged>();
            objnames.Add(".", data);
            objnames.Add(nameof(data.Accessory), data.Accessory);
            for (int i = 0; i < data.Items.Count(); i++)
                objnames.Add($"{nameof(data.Items)}[{i}]", data.Items[i]);


            var syncProp_OBJProxy = new SyncProp_OBJProxy(
                objsys_idx, ID + 1, objnames);

            var plcOS_OBJProxy = new FObjBase.Reflect.Reflect_Proxy(
                objsys_idx,
                ID + 2,
                typeof(IPLCProxySystemService),
                data.PLCos
                );


        }
    }
}