using CommunityToolkit.Mvvm.Input;
using LiveCharts;
using System;
using System.Collections.ObjectModel;
using System.ComponentModel;


namespace FLY.Thick.Base.UI
{
    /// <summary>
    /// 
    /// </summary>
    interface IPgGridVm : INotifyPropertyChanged
    {
        /// <summary>
        /// 目标位置 单位:脉冲
        /// </summary>
        int TargetPos { get; set; }
        /// <summary>
        /// 目标位置 单位:mm
        /// </summary>
        double TargetMm { get; }
        /// <summary>
        /// AD值模式
        /// </summary>
        bool IsADMode { get; set; }

        /// <summary>
        /// 最多6条曲线
        /// </summary>
        ObservableCollection<SeriesInfo> SeriesInfos { get; }

        #region 曲线
        Func<double, string> XFormatter { get; }
        Func<double, string> YFormatter { get; }

        double XUpper { get; set; }
        double XLower { get; set; }

        double YUpper { get; set; }
        double YLower { get; set; }

        double XMax { get; }
        double XMin { get; }

        double YMax { get; }
        double YMin { get; }

        double SectionValue { get; }
        double SectionWidth { get; }
        SeriesCollection Series { get; }
        #endregion

        #region 测量
        /// <summary>
        /// 测量开始位置 单位:脉冲
        /// </summary>
        int MeasureValuePos { get; set; }
        /// <summary>
        /// 测量开始位置 单位:mm
        /// </summary>
        double MeasureValueMm { get; }
        /// <summary>
        /// 测量宽度 单位:脉冲
        /// </summary>
        int MeasureWidthPos { get; set; }
        /// <summary>
        /// 测量宽度 单位:mm
        /// </summary>
        double MeasureWidthMm { get; }
        #endregion

        #region command
        RelayCommand RunToCmd { get; }
        RelayCommand GetFDataCmd { get; }
        RelayCommand GetBDataCmd { get; }

        RelayCommand ClearCmd { get; }
        RelayCommand MeasureCmd { get; }

        RelayCommand SaveCmd { get; }

        RelayCommand<SeriesInfo> SelectCmd { get; }
        #endregion


        #region 输出使用
        int PosOfGrid { get; }
        double Mmpp { get; }
        #endregion
    }
}
