Ejemplo n.º 1
0
        public void RegisterShapeTypeRenderer(IShapeRenderer renderer)
        {
            ShapeTypesInfoMap[renderer.RenderingShapeTypeName()].Renderers.Add(renderer.Name(), renderer);

            if (null == ShapeTypesInfoMap[renderer.RenderingShapeTypeName()].Renderer)
            {
                ShapeTypesInfoMap[renderer.RenderingShapeTypeName()].Renderer = renderer;
            }
        }
Ejemplo n.º 2
0
            public ShapeTypeInfo(IShapeCreator creator, IShapeRenderer renderer)
            {
                this.Creator   = creator;
                this.Renderers = new Dictionary <string, IShapeRenderer>();

                if (null != renderer)
                {
                    this.Renderers.Add(renderer.Name(), renderer);
                    this.Renderer = renderer;
                }
            }
Ejemplo n.º 3
0
        public bool LoadShapeTypeRenderer(string filePath, ref string rendererLoaded)
        {
            IShapeRenderer newShapeRenderer = GetInstanceOfTypeFromAssembly <IShapeRenderer>(filePath);

            if (null != newShapeRenderer)
            {
                Settings.RegisterShapeTypeRenderer(newShapeRenderer);

                rendererLoaded = newShapeRenderer.Name();
                return(true);
            }
            else
            {
                return(false);
            }
        }