using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Xml.Linq;
using AntdUI;

namespace DH.Commons.Base
{
    public class GlobalConfig : NotifyProperty
    {
        bool _EnableVibrator=false;
        bool _EnableBelt = false;
        int _ClearTime=0;
        string _name;
        private BindingList<PLCItem> _InitProcessList = new BindingList<PLCItem>();
        private BindingList<PLCItem> _StartProcessList = new BindingList<PLCItem>();
        private BindingList<PLCItem> _StopProcessList = new BindingList<PLCItem>();
        private BindingList<PLCItem> _StartResetList = new BindingList<PLCItem>();
        private BindingList<PLCItem> _StopResetList = new BindingList<PLCItem>();
        public string Name
        {
            get => _name;
            set
            {
                if (_name != value)
                {
                    _name = value;
                    OnPropertyChanged(nameof(Name));
                }
            }
        }
        public bool EnableBelt
        {
            get => _EnableBelt;
            set
            {
                if (_EnableBelt != value)
                {
                    _EnableBelt = value;
                    OnPropertyChanged(nameof(EnableBelt));
                }
            }
        }
        public bool EnableVibrator
        {
            get => _EnableVibrator;
            set
            {
                if (_EnableVibrator != value)
                {
                    _EnableVibrator = value;
                    OnPropertyChanged(nameof(EnableVibrator));
                }
            }
        }
        public int ClearTime
        {
            get => _ClearTime;
            set
            {
                if (_ClearTime != value)
                {
                    _ClearTime = value;
                    OnPropertyChanged(nameof(ClearTime));
                }
            }
        }
        public BindingList<PLCItem> InitProcessList
        {
            get => _InitProcessList;
            set
            {
                if (_InitProcessList == value) return;
                _InitProcessList = value;
                OnPropertyChanged(nameof(InitProcessList));
            }
        }
        public BindingList<PLCItem> StartProcessList
        {
            get => _StartProcessList;
            set
            {
                if (_StartProcessList == value) return;
                _StartProcessList = value;
                OnPropertyChanged(nameof(StartProcessList));
            }
        }
        public BindingList<PLCItem> StopProcessList
        {
            get => _StopProcessList;
            set
            {
                if (_StopProcessList == value) return;
                _StopProcessList = value;
                OnPropertyChanged(nameof(StopProcessList));
            }
        }
        public BindingList<PLCItem> StartResetList
        {
            get => _StartResetList;
            set
            {
                if (_StartResetList == value) return;
                _StartResetList = value;
                OnPropertyChanged(nameof(StartResetList));
            }
        }
        public BindingList<PLCItem> StopResetList
        {
            get => _StopResetList;
            set
            {
                if (_StopResetList == value) return;
                _StopResetList = value;
                OnPropertyChanged(nameof(StopResetList));
            }
        }

      
        string _imgSavePath;
        string _dbSavePath;
        string _configSavePath;
      
        public string ImgSavePath
        {
            get => _imgSavePath;
            set
            {
                if (_imgSavePath != value)
                {
                    _imgSavePath = value;
                    OnPropertyChanged(nameof(ImgSavePath));
                }
            }
        }

        public string DbSavePath
        {
            get => _dbSavePath;
            set
            {
                if (_dbSavePath != value)
                {
                    _dbSavePath = value;
                    OnPropertyChanged(nameof(DbSavePath));
                }
            }
        }

        public string ConfigSavePath
        {
            get => _configSavePath;
            set
            {
                if (_configSavePath != value)
                {
                    _configSavePath = value;
                    OnPropertyChanged(nameof(ConfigSavePath));
                }
            }
        }
    }



}