Exemplo n.º 1
0
        private static void _delete_section(IVisio.Shape shape, short index)
        {
            if (shape == null)
            {
                throw new System.ArgumentNullException(nameof(shape));
            }

            short target_section_index = ShapeGeometryHelper._get_geometry_section_index(index);

            shape.DeleteSection(target_section_index);
        }
Exemplo n.º 2
0
        public static short AddSection(IVisio.Shape shape)
        {
            if (shape == null)
            {
                throw new System.ArgumentNullException(nameof(shape));
            }

            int   num_geometry_sections = shape.GeometryCount;
            short new_sec_index         = ShapeGeometryHelper._get_geometry_section_index((short)num_geometry_sections);
            short actual_sec_index      = shape.AddSection(new_sec_index);

            if (actual_sec_index != new_sec_index)
            {
                throw new InternalAssertionException();
            }
            short row_index = shape.AddRow(new_sec_index, (short)IVisio.VisRowIndices.visRowComponent, (short)IVisio.VisRowTags.visTagComponent);

            return(new_sec_index);
        }