Exemplo n.º 1
0
 public void AddEntity(VMEntity entity)
 {
     this.Entities.Add(entity);
     entity.Init(Context);
     entity.ObjectID = ObjectId++;
     ObjectsById.Add(entity.ObjectID, entity);
 }
Exemplo n.º 2
0
        public Simantics(VM vm)
        {
            this.vm = vm;
            InitializeComponent();

            ActiveEntity = vm.Entities.FirstOrDefault(x => x is VMAvatar);
        }
Exemplo n.º 3
0
        private void SetSelected(VMEntity entity)
        {
            SelectedEntity = entity;
            propertyGrid.SelectedObject = entity;

            bhavList.Items.Clear();
            var resource = entity.Object;
            var bhavs = resource.Resource.List<BHAV>();
            if (bhavs != null)
            {
                foreach (var bhav in bhavs)
                {
                    bhavList.Items.Add(bhav);
                }
            }

            interactionList.Items.Clear();
            if (entity.TreeTable != null)
            {
                TreeTableSel = entity.TreeTable;
                foreach (var interaction in entity.TreeTable.Interactions)
                {
                    interactionList.Items.Add(entity.TreeTableStrings.GetString((int)interaction.TTAIndex));
                }
            }
        }
Exemplo n.º 4
0
        private void SetSelected(VMEntity entity)
        {
            SelectedEntity = entity;
            propertyGrid.SelectedObject = entity;

            bhavList.Items.Clear();
            var resource = entity.Object;
            var bhavs = resource.Resource.List<BHAV>();
            foreach (var bhav in bhavs){
                bhavList.Items.Add(bhav);
            }
        }