Esempio n. 1
0
        public BreakableObjectPropertiesViewModel(
            TreeViewViewModel treeParent,
            CompoundObjectViewModel parentVm,
            MainViewModel mainVm,
            BreakableObjectProperties modelObject,
            bool enabled = true) :
            base(treeParent, parentVm, mainVm, enabled)
        {
            ModelObject = modelObject;

            foreach (SpawnObject so in ModelObject.SpawnObjects)
            {
                SpawnObjectViewModel sovm = new SpawnObjectViewModel(this, parentVm, mainVm, so);
                SpawnObjects.Add(sovm);
            }
        }
Esempio n. 2
0
        public ObjectFactoryPropertiesViewModel(
            TreeViewViewModel treeParent,
            CompoundObjectViewModel parentVm,
            MainViewModel mainVm,
            ObjectFactoryProperties modelObject,
            CoSystemViewModel systemViewModel) :
            base(treeParent, parentVm, mainVm, systemViewModel)
        {
            _modelObject = modelObject;

            if (_modelObject != null)
            {
                _bodyObject = ParentVm.FindBodyObject(_modelObject.Body);
            }

            foreach (SpawnObject so in LocalModelObject.SpawnObjects)
            {
                SpawnObjectViewModel sovm = new SpawnObjectViewModel(this, parentVm, mainVm, this, so);
                SpawnObjects.Add(sovm);
            }

            UpdateCornerPoints();
        }