public ChildObjectViewModel(
            TreeViewViewModel treeParent,
            CompoundObjectViewModel parentVm,
            MainViewModel mainVm,
            ChildObject modelObject,
            bool enabled = true) :
            base(treeParent, parentVm, mainVm, enabled)
        {
            ModelObject = modelObject;

            if (_modelObject.CompObj != null)
            {
                CompObj = new ChildCOViewModel(this, parentVm, mainVm, _modelObject.CompObj, enabled);
                _co.Clear();
                _co.Add(CompObj);

                if (IsFileReferenceChild)
                {
                    CompObj.BuildViewModel(false);
                }
                else
                {
                    CompObj.BuildViewModel(true);
                }
            }
            else
            {
                CompObj = null;
            }
        }
Beispiel #2
0
        public ChildObjectViewModel(
            TreeViewViewModel treeParent,
            CompoundObjectViewModel parentVm,
            MainViewModel mainVm,
            ChildObject modelObject,
            bool enabled = true) :
            base(treeParent, parentVm, mainVm, enabled)
        {
            ModelObject = modelObject;

            foreach (TStateProperties <ChildObjectStateProperties> cosp in ModelObject.StateProperties)
            {
                ChildCOViewModel cospvm = new ChildCOViewModel(this, parentVm, mainVm, cosp, enabled);
                StateProperties.Add(cospvm);

                // Since this COVM is the child of another COVM we need to check if the COVM
                // is a reference to a file or not. If it is, the children of the COVM shall
                // not be selectable, i.e. they shall be disabled. If it it is not a file ref
                // it shall be selectable.
                if (cospvm.IsFileReferenceChild)
                {
                    cospvm.BuildViewModel(false);
                }
                else
                {
                    cospvm.BuildViewModel(true);
                }
            }
        }
Beispiel #3
0
 public ScenePropertyCollectionBaseViewModel(
     TreeViewViewModel treeParent,
     CompoundObjectViewModel parentVm,
     MainViewModel mainVm,
     bool enabled = true) :
     base(treeParent, parentVm, mainVm, enabled)
 {
 }
 public ConditionalSelectTreeViewViewModel(
     TreeViewViewModel treeParent,
     CompoundObjectViewModel parentVm,
     MainViewModel mainVm,
     bool enabled = true) :
     base(treeParent, parentVm, mainVm, enabled)
 {
 }
Beispiel #5
0
 public FlameEmitterPropertiesViewModel(
     TreeViewViewModel treeParent,
     CompoundObjectViewModel parentVm,
     MainViewModel mainVm,
     FlameEmitterProperties modelObject) :
     base(treeParent, parentVm, mainVm)
 {
     ModelObject = modelObject;
 }
Beispiel #6
0
 public ObjectFactoryPropertiesViewModel(
     TreeViewViewModel treeParent,
     CompoundObjectViewModel parentVm,
     MainViewModel mainVm,
     ObjectFactoryProperties modelObject) :
     base(treeParent, parentVm, mainVm)
 {
     _modelObject = modelObject;
 }
Beispiel #7
0
        //private ObservableCollection<CollectionViewModelBase> _treeCollection = new ObservableCollection<CollectionViewModelBase>();

        #endregion

        #region Constructors

        public ChildCOViewModel(
            TreeViewViewModel treeParent,
            CompoundObjectViewModel parentVm,
            MainViewModel mainVm,
            CompoundObject compoundObject,
            bool enabled = true) :
            base(treeParent, parentVm, mainVm, compoundObject)
        {
        }
 public ShieldPropertiesViewModel(
     TreeViewViewModel treeParent,
     CompoundObjectViewModel parentVm,
     MainViewModel mainVm,
     ShieldProperties modelObject) :
     base(treeParent, parentVm, mainVm)
 {
     ModelObject = modelObject;
 }
 public ParallaxBackgroundPropertiesViewModel(
     TreeViewViewModel treeParent,
     CompoundObjectViewModel parentVm,
     MainViewModel mainVm,
     ParallaxBackgroundProperties modelObject,
     bool enabled = true) :
     base(treeParent, parentVm, mainVm, enabled)
 {
     ModelObject = modelObject;
 }
Beispiel #10
0
 public LfDynamicCircleViewModel(
     TreeViewViewModel treeParent,
     CompoundObjectViewModel parentVm,
     MainViewModel mainVm,
     LfDynamicCircle modelObject,
     bool enabled = true) :
     base(treeParent, parentVm, mainVm, modelObject, enabled)
 {
     ModelObject = modelObject;
 }
 public SteerableObjectPropertiesViewModel(
     TreeViewViewModel treeParent,
     CompoundObjectViewModel parentVm,
     MainViewModel mainVm,
     SteerableObjectProperties modelObject,
     bool enabled = true) :
     base(treeParent, parentVm, mainVm, enabled)
 {
     ModelObject = modelObject;
 }
Beispiel #12
0
 public FileCOViewModel(
     TreeViewViewModel treeParent,
     CompoundObjectViewModel parentVm,
     MainViewModel mainVm,
     string fileName,
     CompoundObject modelObject) :
     base(treeParent, parentVm, mainVm, modelObject)
 {
     _fileName = fileName;
 }
Beispiel #13
0
 public BodyOriginSystemViewModel(
     TreeViewViewModel treeParent,
     CompoundObjectViewModel parentVm,
     MainViewModel mainVm,
     BodyOriginSystem modelObject,
     CoSystemViewModel systemViewModel) :
     base(treeParent, parentVm, mainVm, systemViewModel)
 {
     _modelObject = modelObject;
 }
 public ReentryFlameEmitterPropertiesViewModel(
     TreeViewViewModel treeParent,
     CompoundObjectViewModel parentVm,
     MainViewModel mainVm,
     ReentryFlameEmitterProperties modelObject,
     CoSystemViewModel systemViewModel) :
     base(treeParent, parentVm, mainVm, systemViewModel)
 {
     _modelObject = modelObject;
 }
 public CompoundShapesObjectViewModel(
     TreeViewViewModel treeParent,
     CompoundObjectViewModel parentVm,
     MainViewModel mainVm,
     CompoundShapesObject modelObject,
     bool enabled = true) :
     base(treeParent, parentVm, mainVm, enabled)
 {
     _shapes         = new ShapeCollectionViewModel(this, null, mainVm, enabled);
     ModelBaseObject = modelObject;
 }
Beispiel #16
0
 public StateViewModel(
     TreeViewViewModel treeParent,
     CompoundObjectViewModel parentVm,
     MainViewModel mainVm,
     ScenePropertiesViewModel sceneVm,
     string stateName,
     bool enabled = true) :
     base(treeParent, parentVm, mainVm, enabled)
 {
     _sceneVm  = sceneVm;
     StateName = stateName;
 }
Beispiel #17
0
        public ScenePropertiesViewModel(
            TreeViewViewModel treeParent,
            CompoundObjectViewModel parentVm,
            MainViewModel mainVm,
            SceneProperties modelObject,
            bool enabled = true) :
            base(treeParent, parentVm, mainVm, enabled)
        {
            ModelObject = modelObject;

            SelectedSceneTypeIndex = SceneTypes.IndexOf(ModelObject.SceneType);
        }
        public PickupObjectPropertiesViewModel(
            TreeViewViewModel treeParent,
            CompoundObjectViewModel parentVm,
            MainViewModel mainVm,
            PickupObjectProperties modelObject,
            bool enabled = true) :
            base(treeParent, parentVm, mainVm, enabled)
        {
            ModelObject = modelObject;

            SelectedPickupTypeIndex = PickupTypes.IndexOf(LocalModelObject.PickupType);
            SelectedAmountTypeIndex = AmountTypes.IndexOf(LocalModelObject.PickupAmountType);
        }
        public SpawnObjectViewModel(
            TreeViewViewModel treeParent,
            CompoundObjectViewModel parentVm,
            MainViewModel mainVm,
            SpawnObject modelObject,
            bool enabled = true) :
            base(treeParent, parentVm, mainVm)
        {
            ModelObject = modelObject;

            ChildObjectViewModel chvm = new ChildObjectViewModel(this, parentVm, mainVm, modelObject.MyChildObject);

            SpawnChildObject.Add(chvm);
        }