using FLY.Thick.FilmCasting.Common;
using FLY.Thick.FilmCasting.IService;
using FObjBase;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace FLY.Thick.FilmCasting.Client
{
    public class FilmCastingProfileServiceClient : FObjBase.Reflect.Reflect_SeviceClient, IFilmCastingProfileService
    {
        protected override Type InterfaceType => typeof(IFilmCastingProfileService);

        public FilmCastingProfileParam Param { get; private set; } = new FilmCastingProfileParam();

        /// <summary>
        /// 自动下辊条件 平均值变化 10um
        /// </summary>
        public double RollDown_AvgChanged { get; set; }
        /// <summary>
        /// 自动下辊条件 膜宽度变化 100mm
        /// </summary>
        public double RollDown_FilmWidthChanged { get; set; }
        /// <summary>
        /// 自动下辊条件 生产长度 大于 10000m
        /// </summary>
        public double RollDown_FilmLength { get; set; }
        /// <summary>
        /// 自动下辊条件 生产时间 2小时
        /// </summary>
        public double RollDown_TimeoutHour { get; set; }
        /// <summary>
        /// 自动下辊条件 停止时间 大于 10min
        /// </summary>
        public double RollDown_StopTimeMin { get; set; }


        public FilmCastingProfileServiceClient(UInt32 serviceId) : base(serviceId) { }
        public FilmCastingProfileServiceClient(UInt32 serviceId, string connName) : base(serviceId, connName) { }

        public void Apply()
        {
            Call(nameof(Apply));

        }

        public void ApplyParam(FilmCastingProfileParam param)
        {
            Call(nameof(ApplyParam), new { param });

        }

        public void Del(string productname)
        {
            Call(nameof(Del), new { productname });
        }

        public void GetList(AsyncCBHandler asyncDelegate, object asyncContext)
        {
            Call(nameof(GetList), null, asyncDelegate, asyncContext);
        }

        public void Read(string productname, AsyncCBHandler asyncDelegate, object asyncContext)
        {
            Call(nameof(Read), new { productname }, asyncDelegate, asyncContext);
        }
    }
}
