示例#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);
            }
        }
示例#2
0
 public void RegisterShapeType(IShapeCreator creator, IShapeRenderer renderer)
 {
     ShapeTypesInfoMap[creator.ShapeTypeName()] = new ShapeTypeInfo(creator, renderer);
 }
示例#3
0
 public void RegisterShapeType(IShapeCreator creator)
 {
     ShapeTypesInfoMap[creator.ShapeTypeName()] = new ShapeTypeInfo(creator, null);
 }