WeightSystem_OBJProxy.cs 1.37 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11
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;
12
using FLY.OBJComponents.IService;
13 14 15 16 17 18 19 20 21

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



22
        public WeightSystem_OBJProxy(int objsys_idx, UInt32 id, WeightSystem data):base(objsys_idx)
23
        {
24
            ID = id;
25 26 27 28 29 30
            this.data = data;

            //--------------------------------------------------------------
            //属性同步
            Dictionary<string, INotifyPropertyChanged> objnames = new Dictionary<string, INotifyPropertyChanged>();
            objnames.Add(".", data);
潘栩锋's avatar
潘栩锋 committed
31
            objnames.Add(nameof(data.Accessory), data.Accessory);
32
            for (int i = 0; i < data.Items.Count(); i++)
潘栩锋's avatar
潘栩锋 committed
33
                objnames.Add($"{nameof(data.Items)}[{i}]", data.Items[i]);
34

35 36

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

39
            var plcOS_OBJProxy = new FObjBase.Reflect.Reflect_Proxy(
40 41
                objsys_idx,
                ID + 2,
42
                typeof(IPLCProxySystemService),
43 44 45 46 47 48 49
                data.PLCos
                );


        }
    }
}