예제 #1
0
        private IShapeHandler GetShapeHandler(Hashtable dictionary, Shape shape, string shapeName, string mode)
        {
            IShapeHandler shapeHandler = (IShapeHandler)dictionary[shape];

            if (shapeHandler != null)
            {
                return(shapeHandler);
            }

            XmlForm form = new XmlForm( );

            form.LoadDefinition(shapeName, shape);
            form.Design(mode);
            form.Close();
            form.Dispose();

            shapeHandler = (IShapeHandler)form.Tag;
            shapeHandler.LoadProperties();

            dictionary[shape] = shapeHandler;

            return(shapeHandler);
        }