using FLY.Thick.Base.Common;
using FObjBase;
using FObjBase.Reflect;
using Misc;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace FLY.Thick.FilmCasting.IService
{
    public interface IBoltMapFilmCastingService: INotifyPropertyChanged
    {
        #region 设定
        /// <summary>
        /// 螺丝宽度 mm, 是double, 那就可以设置英寸
        /// </summary>
        double BoltWidth { get; set; }

        /// <summary>
        /// 总螺丝数 
        /// </summary>
        int BoltCnt { get; set; }

        /// <summary>
        /// 与机架方向相反
        /// </summary>
        bool IsReversed { get; set; }

        /// <summary>
        /// 平滑，以前后分区平均滤波 ，=0，只有自己，1，左右各一个
        /// </summary>
        int Smooth { get; set; }

        #endregion



        #region 状态

        /// <summary>
        /// 总分区数
        /// </summary>
        int NBolts { get; }

        /// <summary>
        /// 第1个分区号
        /// </summary>
        int FirstBoltNo { get; }

        #endregion


        DateTime DebugUpdate { get; }

        [Call(typeof(BoltMapFilmCastingDebugData))]
        void GetDebugData(AsyncCBHandler asyncDelegate, object asyncContext);

        /// <summary>
        /// 应用
        /// </summary>
        void Apply();
    }

    public class BoltMapFilmCastingDebugData
    {
        public int posOfGrid;
        public int posBegin;
        public double[] buf;
        public RangeStruct border;
    }
}
