Exemplo n.º 1
0
        /// <summary>
        /// Get GraphicsProperties by draw object name
        /// </summary>
        /// <param name="name"></param>
        /// <returns></returns>
        public GraphicsProperties GetPropertiesByName(string name)
        {
            GraphicsProperties propertie = null;

            switch (name)
            {
            case "Line":
                propertie = properties[0];
                break;

            case "Rectangle":
                propertie = properties[1];
                break;

            case "Ellipse":
                propertie = properties[2];
                break;

            case "Polygon":
                propertie = properties[3];
                break;

            case "Circle":
                propertie = properties[4];
                break;

            case "Text":
                propertie = properties[5];
                break;

            case "Ruler":
                propertie = properties[6];
                break;

            default:
                propertie = properties[0];
                break;
            }
            return(propertie);
        }