using FLY.Winder.Common;
using FLY.Winder.OBJ_INTERFACE;
using FLY.OBJComponents.Server.OBJProxy;
using FObjBase;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace FLY.Winder.Server.OBJProxy
{
    public class WinderSystem_OBJProxy : FObj
    {
        WinderSystem data;
        PLCProxySystem_OBJProxy plcos_objproxy;
        SyncProp_OBJProxy syncProp_OBJProxy;

        public WinderSystem_OBJProxy(int objsys_idx, WinderSystem data) : base(objsys_idx)
        {
            ID = OBJ_INTERFACE.OBJ_INTERFACE.WINDER_OBJ_ID;
            this.data = data;

            syncProp_OBJProxy = new SyncProp_OBJProxy(
                objsys_idx, ID + 1,
                new Dictionary<string, INotifyPropertyChanged>
                {
                    { "Accessory", data.Accessory },
                    { "Items[0]", data.Items[0]},
                    { "Items[1]", data.Items[1]}
                });

            plcos_objproxy = new PLCProxySystem_OBJProxy(
                objsys_idx,
                OBJ_INTERFACE.OBJ_INTERFACE.WINDER_OBJ_PLCOS_ID,
                data.PLCos
                );
            
        }
    }
}