Ejemplo n.º 1
0
        public virtual Process AddProcess(string key, Shape parent)
        {
            if (!Shapes.Contains(parent.Key))
            {
                throw new ArgumentException("Parent shape not found in active container. Process could not be added.", "parent");
            }

            return(AddProcessImplementation(key, parent, null, FlowchartStencilType.Process2));
        }
Ejemplo n.º 2
0
        void Entity_ChangeEvent(EntityChangeData.EntityChangeType changeType, BaseDataBlob db)
        {
            if (changeType == EntityChangeData.EntityChangeType.DBAdded)
            {
                if (db is OrbitDB)
                {
                    _orbitDB = (OrbitDB)db;
                    var i    = _orbitDB.Inclination;
                    var aop  = _orbitDB.ArgumentOfPeriapsis;
                    var loan = _orbitDB.LongitudeOfAscendingNode;
                    _lop = (float)OrbitMath.GetLongditudeOfPeriapsis(i, aop, loan);
                }
                else if (db is NewtonMoveDB)
                {
                    _newtonMoveDB = (NewtonMoveDB)db;

                    if (!Shapes.Contains(_flame))
                    {
                        Shapes.Add(_flame);
                    }
                }
                else if (db is WarpMovingDB)
                {
                    _warpMoveDB = (WarpMovingDB)db;
                }
            }
            else if (changeType == EntityChangeData.EntityChangeType.DBRemoved)
            {
                if (db is OrbitDB)
                {
                    _orbitDB = null;
                }
                if (db is NewtonMoveDB)
                {
                    _newtonMoveDB = null;
                    if (Shapes.Contains(_flame))
                    {
                        Shapes.Remove(_flame);
                    }
                }
                else if (db is WarpMovingDB)
                {
                    _warpMoveDB = null;
                }
            }
        }
Ejemplo n.º 3
0
 public bool Contains(ShapeComponent component)
 {
     return(Shapes.Contains(component));
 }