Exemplo n.º 1
0
        public XExamTypeVM(XExamType exType)
        {
            if (exType == null)
                throw new ArgumentNullException("Ссылка на объект XExamType не может быть null");

            _exType = exType;
            _paramTypeObsCollection = new ObservableCollection<XParamTypeVM>();

            if (exType.ParamsCollection == null)
                exType.ParamsCollection = new Collection<XParamType>();

            foreach (var v in exType.ParamsCollection)
                _paramTypeObsCollection.Add(new XParamTypeVM(v));

            _paramTypeObsCollection.CollectionChanged += ParamTypeObsCollection_CollectionChanged;

            _paramTypesCVS = new CollectionViewSource();
            _paramTypesCVS.Source = _paramTypeObsCollection;
        }
Exemplo n.º 2
0
 public XExam()
 {
     ParamsCollection = new Collection<XParam>();
     ExamType = new XExamType();
 }