using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace FPGACoder.ViewModel
{
    public class ProjectViewModel:ViewModelBase<Model.IModel>
    {
        private string targetClass = string.Empty;

        public string TargetClass { get => targetClass; set =>UpdateProperty(ref targetClass, value); }
        public ObservableCollection<DMAViewModel> DMA { get; } = new ObservableCollection<DMAViewModel>();
        public void UpdateProject(NIFPGA.lvbitx.Project project)
        {
            TargetClass = project.TargetClass;
            DMA.Clear();
            project.DMA.ForEach(x => DMA.Add(DMAViewModel.GetDMA(x)));           
        }
    }
}
