using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Controls;

namespace AIRS
{
    /// <summary>
    /// 脚本执行返回数据类型
    /// </summary>
    public enum CallbackDataType {
        /// <summary>
        /// 执行脚本命令
        /// </summary>
        Command,
        /// <summary>
        /// 返回数据
        /// </summary>
        ReturnData,
        /// <summary>
        /// 其他信息
        /// </summary>
        Info,
        /// <summary>
        /// 进度信息
        /// </summary>
        Progress,
        /// <summary>
        /// 参数错误信息
        /// </summary>
        ParameterError
    }
    /// <summary>
    /// function：ControlData，用于接收异步后台控件更新数据
    /// author  ：lbf
    /// date    ：2020/5/20 15:27:42 
    /// </summary>
    public class ControlData
    {
        /// <summary>
        /// 控件
        /// </summary>
        public Control Control { get; set; }
        /// <summary>
        /// 返回结果时，带的索引
        /// </summary>
        public int Index { get; set; }
        /// <summary>
        /// 返回数据类型
        /// </summary>
        public CallbackDataType CallbackDataType { get; set; }
        /// <summary>
        /// 返回数据，根据CallbackDataType，数据分为不同类型
        /// </summary>
        public string DataString { get; set; }

    }
    /// <summary>
    /// 检测参数 
    /// </summary>
    public class DetectParams
    {
        /// <summary>
        /// 带状横竖参数
        /// </summary>
        [JsonProperty(PropertyName = "YGXG-DZ")]
        public YGXG_DZ YGXG_DZ { get; set; }
    }
    /// <summary>
    /// 带状横竖参数，h横向，v竖向
    /// </summary>
    public class YGXG_DZ
    {
        public string direction { get; set; }
    }
}
