using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel;
using System.Collections.ObjectModel;
using FLY.FilmCasting.AutoDie.Common;
using FObjBase;
using System.Text.RegularExpressions;
using System.Net;
using FObjBase.Reflect;

namespace FLY.FilmCasting.AutoDie.IService
{
    public interface IFeedbackHeatService : INotifyPropertyChanged
    {
        #region 参数

        /// <summary>
        /// 自控使能, 不保存！！！
        /// </summary>
        bool IsAuto { get; set; }

        /// <summary>
        /// 加热后起效延时,单位s;
        /// 从加热，到起效，再到被测量时间=Delay+mRenZiJiaService.FilmLength/mRenZiJiaService.Velocity
        /// </summary>
        int Delay { get; set; }

        /// <summary>
        /// 膜距离 m
        /// 模头到测厚仪的距离
        /// </summary>
        double FilmLength { get; set; }

        /// <summary>
        /// 测厚仪厚度数据混合数
        /// </summary>
        int Mix { get; set; }

        /// <summary>
        /// 有检测功能
        /// </summary>
        bool HasCheck { get; set; }

        /// <summary>
        /// 检测线速度 使能
        /// </summary>
        bool HasCheckFilmVelocity { get; set; }

        /// <summary>
        /// 手动加热步进
        /// </summary>
        int Step { get; set; }


        #endregion
        #region 动态数据

        /// <summary>
        /// 通道数， 从测厚仪获取的！！！！
        /// </summary>
        int ChannelCnt { get; }

        /// <summary>
        /// 保存的加热策略名称
        /// </summary>
        string HeatsProductName { get; }

        /// <summary>
        /// 连接到PLC?
        /// </summary>
        bool IsConnectedWithPLC { get; }

        /// <summary>
        /// 上一次加热修改时间
        /// </summary>
        DateTime LastChangedTime { get; }
        #endregion


        #region 异常检测

        /// <summary>
        /// 当前风机启动中
        /// </summary>
        bool HasFan { get; }

        /// <summary>
        /// 加热棒有电流
        /// </summary>
        bool HasElectricity { get; }

        /// <summary>
        /// 检测动作 使能
        /// </summary>
        bool CheckEnable { set; get; }

        /// <summary>
        /// 烧了的加热棒
        /// </summary>
        bool[] Bads { get; }

        #endregion

        /// <summary>
        /// 参数应用
        /// </summary>
        void Apply();

        /// <summary>
        /// 保存当前加热量
        /// </summary>
        void SaveHeats(string productname);



        /// <summary>
        /// 获取保存的加热量文件列表 返回类型为 List&lt;string&gt;
        /// </summary>
        /// <param name="asyncDelegate"></param>
        /// <param name="asyncContext"></param>
        [Call(typeof(List<string>))]
        void GetHeatsFileList(AsyncCBHandler asyncDelegate, object asyncContext);

        /// <summary>
        /// 删除 加热量文件
        /// </summary>
        /// <param name="productname"></param>
        void DelHeatsFile(string productname);

        /// <summary>
        /// 加载 加热量文件 
        /// </summary>
        /// <param name="filename"></param>
        void LoadHeatsFile(string productname);

        #region 撤销

        /// <summary>
        /// 撤销的ID
        /// </summary>
        long UndoId { get; }

        /// <summary>
        /// 撤销中
        /// </summary>
        bool IsInUndo { get; }

        /// <summary>
        /// 这次撤销动作的时间
        /// </summary>
        DateTime UndoTime { get; }

        /// <summary>
        /// UndoId-- 
        /// </summary>
        void Undo();
        /// <summary>
        /// UndoId++
        /// </summary>
        void Redo();
        #endregion
    }

}
