public short Render(IVisio.Shape shape)
        {
            short sec_index = ShapeGeometryHelper.AddSection(shape);
            short row_count = shape.RowCount[sec_index];

            var writer = new VisioAutomation.ShapeSheet.Writers.SrcWriter();

            var src_nofill      = new VA.ShapeSheet.Src(sec_index, 0, ShapeSheet.SrcConstants.GeometryNoFill.Cell);
            var src_noline      = new VA.ShapeSheet.Src(sec_index, 0, ShapeSheet.SrcConstants.GeometryNoLine.Cell);
            var src_noshow      = new VA.ShapeSheet.Src(sec_index, 0, ShapeSheet.SrcConstants.GeometryNoShow.Cell);
            var src_nosnap      = new VA.ShapeSheet.Src(sec_index, 0, ShapeSheet.SrcConstants.GeometryNoSnap.Cell);
            var src_noquickdrag = new VA.ShapeSheet.Src(sec_index, 0, ShapeSheet.SrcConstants.GeometryNoQuickDrag.Cell);

            writer.SetValue(src_nofill, this.NoFill);
            writer.SetValue(src_noline, this.NoLine);
            writer.SetValue(src_noshow, this.NoShow);
            writer.SetValue(src_nosnap, this.NoSnap);
            writer.SetValue(src_noquickdrag, this.NoQuickDrag);

            foreach (var row in this.Rows)
            {
                row.AddTo(shape, writer, row_count, sec_index);
                row_count++;
            }

            writer.Commit(shape, CellValueType.Formula);

            return(0);
        }
        public bool section_is_skippable(VA.ShapeSheet.Src src)
        {
            bool can_skip = (src.Section == (short)IVisio.VisSectionIndices.visSectionFirst) ||
                            (src.Section == (short)IVisio.VisSectionIndices.visSectionFirstComponent) ||
                            (src.Section == (short)IVisio.VisSectionIndices.visSectionLast) ||
                            (src.Section == (short)IVisio.VisSectionIndices.visSectionInval) ||
                            (src.Section == (short)IVisio.VisSectionIndices.visSectionNone) ||
                            (src.Section == (short)IVisio.VisSectionIndices.visSectionFirst) ||
                            (src.Section == (short)IVisio.VisSectionIndices.visSectionLastComponent);

            return(can_skip);
        }
 public CellTuple(string name, VASS.Src src, string formula)
 {
     this.Name    = name;
     this.Src     = src;
     this.Formula = formula;
 }
Exemple #4
0
        public void Add(VisioAutomation.ShapeSheet.Src src, FormatPaintCategory paint_category, string name)
        {
            var format_cell = new FormatPaintCell(src, name, paint_category);

            this.Cells.Add(format_cell);
        }
Exemple #5
0
        public void AddCell(short id, VisioAutomation.ShapeSheet.Src src)
        {
            var sidsrc = new VisioAutomation.ShapeSheet.SidSrc(id, src);

            this.SidSrcStreamBuilder.Add(sidsrc);
        }