Exemple #1
0
        public bool LoadShapeType(string filePath, ref string shapeTypeLoaded)
        {
            IShapeCreator newShapeTypeCreator = GetInstanceOfTypeFromAssembly <IShapeCreator>(filePath);

            if (null != newShapeTypeCreator)
            {
                Settings.RegisterShapeType(newShapeTypeCreator);

                shapeTypeLoaded = newShapeTypeCreator.ShapeTypeName();
                return(true);
            }
            else
            {
                return(false);
            }
        }
Exemple #2
0
 public void RegisterShapeType(IShapeCreator creator, IShapeRenderer renderer)
 {
     ShapeTypesInfoMap[creator.ShapeTypeName()] = new ShapeTypeInfo(creator, renderer);
 }
Exemple #3
0
 public void RegisterShapeType(IShapeCreator creator)
 {
     ShapeTypesInfoMap[creator.ShapeTypeName()] = new ShapeTypeInfo(creator, null);
 }