using PropertyChanged;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Controls;

namespace BDU.Models
{
    [AddINotifyPropertyChangedInterface]
    public class ProgramModel
    {

        #region 构造函数

        public ProgramModel()
        {

        }

        public ProgramModel(ProgramModel source)
        {
            ID = source.ID;
            StepCollection = new(source.StepCollection.Select(p => new StepModel(p)));
            Devices = new(source.Devices.Select(p => new DeviceModel(p)));
            Parameters = new(source.Parameters.Select(p => new ParameterModel(p)));
        }

        #endregion

        public Guid ID { get; set; } = Guid.NewGuid();

        public ObservableCollection<StepModel> StepCollection { get; set; } = [];

        public ObservableCollection<ParameterModel> Parameters { get; set; } = [];

        public ObservableCollection<DeviceModel> Devices { get; set; } = [];
    }
}
