Beispiel #1
0
        public short Render(IVisio.Shape shape)
        {
            short sec_index = GeometryHelper.AddSection(shape);
            short row_count = shape.RowCount[sec_index];

            var update = new ShapeSheet.Update();

            var src_nofill      = ShapeSheet.SRCConstants.Geometry_NoFill.ForSectionAndRow(sec_index, 0);
            var src_noline      = ShapeSheet.SRCConstants.Geometry_NoLine.ForSectionAndRow(sec_index, 0);
            var src_noshow      = ShapeSheet.SRCConstants.Geometry_NoShow.ForSectionAndRow(sec_index, 0);
            var src_nosnap      = ShapeSheet.SRCConstants.Geometry_NoSnap.ForSectionAndRow(sec_index, 0);
            var src_noquickdrag = ShapeSheet.SRCConstants.Geometry_NoQuickDrag.ForSectionAndRow(sec_index, 0);

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

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

            update.Execute(shape);
            return(0);
        }
Beispiel #2
0
        private void Update(short section, short row_index, ShapeSheet.Update update)
        {
            var x_src = ShapeSheet.SRCConstants.Geometry_X.ForSectionAndRow(section, row_index);
            var y_src = ShapeSheet.SRCConstants.Geometry_Y.ForSectionAndRow(section, row_index);
            var a_src = ShapeSheet.SRCConstants.Geometry_A.ForSectionAndRow(section, row_index);
            var b_src = ShapeSheet.SRCConstants.Geometry_B.ForSectionAndRow(section, row_index);
            var c_src = ShapeSheet.SRCConstants.Geometry_C.ForSectionAndRow(section, row_index);
            var d_src = ShapeSheet.SRCConstants.Geometry_D.ForSectionAndRow(section, row_index);
            var e_src = ShapeSheet.SRCConstants.Geometry_E.ForSectionAndRow(section, row_index);

            update.SetFormulaIgnoreNull(x_src, this.X);
            update.SetFormulaIgnoreNull(y_src, this.Y);
            update.SetFormulaIgnoreNull(a_src, this.A);
            update.SetFormulaIgnoreNull(b_src, this.B);
            update.SetFormulaIgnoreNull(c_src, this.C);
            update.SetFormulaIgnoreNull(d_src, this.D);
            update.SetFormulaIgnoreNull(e_src, this.E);
        }
Beispiel #3
0
        public void Apply(ShapeSheet.Update update, short id)
        {
            update.SetFormulaIgnoreNull(id, ShapeSheet.SRCConstants.Width, this.Width);
            update.SetFormulaIgnoreNull(id, ShapeSheet.SRCConstants.Height, this.Height);
            update.SetFormulaIgnoreNull(id, ShapeSheet.SRCConstants.PinX, this.PinX);
            update.SetFormulaIgnoreNull(id, ShapeSheet.SRCConstants.PinY, this.PinY);
            update.SetFormulaIgnoreNull(id, ShapeSheet.SRCConstants.LocPinX, this.LocPinX);
            update.SetFormulaIgnoreNull(id, ShapeSheet.SRCConstants.LocPinY, this.LocPinY);
            update.SetFormulaIgnoreNull(id, ShapeSheet.SRCConstants.Angle, this.Angle);
            update.SetFormulaIgnoreNull(id, ShapeSheet.SRCConstants.BeginArrow, this.BeginArrow);
            update.SetFormulaIgnoreNull(id, ShapeSheet.SRCConstants.BeginArrowSize, this.BeginArrowSize);

            update.SetFormulaIgnoreNull(id, ShapeSheet.SRCConstants.FillBkgnd, this.FillBkgnd);
            update.SetFormulaIgnoreNull(id, ShapeSheet.SRCConstants.FillBkgndTrans, this.FillBkgndTrans);
            update.SetFormulaIgnoreNull(id, ShapeSheet.SRCConstants.FillForegnd, this.FillForegnd);
            update.SetFormulaIgnoreNull(id, ShapeSheet.SRCConstants.FillForegndTrans, this.FillForegndTrans);
            update.SetFormulaIgnoreNull(id, ShapeSheet.SRCConstants.FillPattern, this.FillPattern);

            update.SetFormulaIgnoreNull(id, ShapeSheet.SRCConstants.ShapeShdwObliqueAngle, this.ShapeShdwObliqueAngle);
            update.SetFormulaIgnoreNull(id, ShapeSheet.SRCConstants.ShapeShdwOffsetX, this.ShapeShdwOffsetX);
            update.SetFormulaIgnoreNull(id, ShapeSheet.SRCConstants.ShapeShdwOffsetY, this.ShapeShdwOffsetY);
            update.SetFormulaIgnoreNull(id, ShapeSheet.SRCConstants.ShapeShdwScaleFactor, this.ShapeShdwScaleFactor);
            update.SetFormulaIgnoreNull(id, ShapeSheet.SRCConstants.ShapeShdwType, this.ShapeShdwType);
            update.SetFormulaIgnoreNull(id, ShapeSheet.SRCConstants.ShdwBkgnd, this.ShdwBkgnd);
            update.SetFormulaIgnoreNull(id, ShapeSheet.SRCConstants.ShdwBkgndTrans, this.ShdwBkgndTrans);
            update.SetFormulaIgnoreNull(id, ShapeSheet.SRCConstants.ShdwForegnd, this.ShdwForegnd);
            update.SetFormulaIgnoreNull(id, ShapeSheet.SRCConstants.ShdwForegndTrans, this.ShdwForegndTrans);
            update.SetFormulaIgnoreNull(id, ShapeSheet.SRCConstants.ShdwPattern, this.ShdwPattern);

            update.SetFormulaIgnoreNull(id, ShapeSheet.SRCConstants.CharCase, this.CharCase);
            update.SetFormulaIgnoreNull(id, ShapeSheet.SRCConstants.CharFont, this.CharFont);
            update.SetFormulaIgnoreNull(id, ShapeSheet.SRCConstants.CharColor, this.CharColor);
            update.SetFormulaIgnoreNull(id, ShapeSheet.SRCConstants.CharSize, this.CharSize);
            update.SetFormulaIgnoreNull(id, ShapeSheet.SRCConstants.CharLetterspace, this.CharLetterspace);
            update.SetFormulaIgnoreNull(id, ShapeSheet.SRCConstants.CharStyle, this.CharStyle);
            update.SetFormulaIgnoreNull(id, ShapeSheet.SRCConstants.CharColorTrans, this.CharTransparency);

            update.SetFormulaIgnoreNull(id, ShapeSheet.SRCConstants.EndArrow, this.EndArrow);
            update.SetFormulaIgnoreNull(id, ShapeSheet.SRCConstants.EndArrowSize, this.EndArrowSize);

            // Line
            update.SetFormulaIgnoreNull(id, ShapeSheet.SRCConstants.LineColor, this.LineColor);
            update.SetFormulaIgnoreNull(id, ShapeSheet.SRCConstants.LineColorTrans, this.LineColorTrans);
            update.SetFormulaIgnoreNull(id, ShapeSheet.SRCConstants.LinePattern, this.LinePattern);
            update.SetFormulaIgnoreNull(id, ShapeSheet.SRCConstants.LineWeight, this.LineWeight);

            // Text
            update.SetFormulaIgnoreNull(id, ShapeSheet.SRCConstants.BottomMargin, this.BottomMargin);
            update.SetFormulaIgnoreNull(id, ShapeSheet.SRCConstants.DefaultTabStop, this.DefaultTabstop);
            update.SetFormulaIgnoreNull(id, ShapeSheet.SRCConstants.LeftMargin, this.LeftMargin);
            update.SetFormulaIgnoreNull(id, ShapeSheet.SRCConstants.RightMargin, this.RightMargin);
            update.SetFormulaIgnoreNull(id, ShapeSheet.SRCConstants.TextBkgnd, this.TextBkgnd);
            update.SetFormulaIgnoreNull(id, ShapeSheet.SRCConstants.TextBkgndTrans, this.TextBkgndTrans);
            update.SetFormulaIgnoreNull(id, ShapeSheet.SRCConstants.TextDirection, this.TextDirection);
            update.SetFormulaIgnoreNull(id, ShapeSheet.SRCConstants.TopMargin, this.TopMargin);
            update.SetFormulaIgnoreNull(id, ShapeSheet.SRCConstants.VerticalAlign, this.VerticalAlign);

            // Paragraph

            update.SetFormulaIgnoreNull(id, ShapeSheet.SRCConstants.Para_Bullet, this.ParaBullet);
            update.SetFormulaIgnoreNull(id, ShapeSheet.SRCConstants.Para_BulletFont, this.ParaBulletFont);
            update.SetFormulaIgnoreNull(id, ShapeSheet.SRCConstants.Para_BulletFontSize, this.ParaBulletFontSize);
            update.SetFormulaIgnoreNull(id, ShapeSheet.SRCConstants.Para_BulletStr, this.ParaBulletString);
            update.SetFormulaIgnoreNull(id, ShapeSheet.SRCConstants.Para_Flags, this.ParaFlags);
            update.SetFormulaIgnoreNull(id, ShapeSheet.SRCConstants.Para_HorzAlign, this.ParaHorizontalAlign);
            update.SetFormulaIgnoreNull(id, ShapeSheet.SRCConstants.Para_IndFirst, this.ParaIndentFirst);
            update.SetFormulaIgnoreNull(id, ShapeSheet.SRCConstants.Para_IndLeft, this.ParaIndentLeft);
            update.SetFormulaIgnoreNull(id, ShapeSheet.SRCConstants.Para_IndRight, this.ParaIndentRight);
            update.SetFormulaIgnoreNull(id, ShapeSheet.SRCConstants.Para_LocalizeBulletFont, this.ParaLocBulletFont);
            update.SetFormulaIgnoreNull(id, ShapeSheet.SRCConstants.Para_SpAfter, this.ParaSpacingAfter);
            update.SetFormulaIgnoreNull(id, ShapeSheet.SRCConstants.Para_SpBefore, this.ParaSpacingBefore);
            update.SetFormulaIgnoreNull(id, ShapeSheet.SRCConstants.Para_SpLine, this.ParaSpacingLine);
            update.SetFormulaIgnoreNull(id, ShapeSheet.SRCConstants.Para_TextPosAfterBullet, this.ParaTextPosAfterBullet);

            // TextXForm
            update.SetFormulaIgnoreNull(id, ShapeSheet.SRCConstants.TxtAngle, this.TxtAngle);
            update.SetFormulaIgnoreNull(id, ShapeSheet.SRCConstants.TxtHeight, this.TxtHeight);
            update.SetFormulaIgnoreNull(id, ShapeSheet.SRCConstants.TxtLocPinX, this.TxtLocPinX);
            update.SetFormulaIgnoreNull(id, ShapeSheet.SRCConstants.TxtLocPinY, this.TxtLocPinY);
            update.SetFormulaIgnoreNull(id, ShapeSheet.SRCConstants.TxtPinX, this.TxtPinX);
            update.SetFormulaIgnoreNull(id, ShapeSheet.SRCConstants.TxtPinY, this.TxtPinY);
            update.SetFormulaIgnoreNull(id, ShapeSheet.SRCConstants.TxtWidth, this.TxtWidth);

            // ShapeLayout
            update.SetFormulaIgnoreNull(id, ShapeSheet.SRCConstants.ConFixedCode, this.ConFixedCode);
            update.SetFormulaIgnoreNull(id, ShapeSheet.SRCConstants.ConLineJumpCode, this.ConLineJumpCode);
            update.SetFormulaIgnoreNull(id, ShapeSheet.SRCConstants.ConLineJumpDirX, this.ConLineJumpDirX);
            update.SetFormulaIgnoreNull(id, ShapeSheet.SRCConstants.ConLineJumpDirY, this.ConLineJumpDirY);
            update.SetFormulaIgnoreNull(id, ShapeSheet.SRCConstants.ConLineJumpStyle, this.ConLineJumpStyle);
            update.SetFormulaIgnoreNull(id, ShapeSheet.SRCConstants.ConLineRouteExt, this.ConLineRouteExt);
            update.SetFormulaIgnoreNull(id, ShapeSheet.SRCConstants.ShapeFixedCode, this.ShapeFixedCode);
            update.SetFormulaIgnoreNull(id, ShapeSheet.SRCConstants.ShapePermeablePlace, this.ShapePermeablePlace);
            update.SetFormulaIgnoreNull(id, ShapeSheet.SRCConstants.ShapePermeableX, this.ShapePermeableX);
            update.SetFormulaIgnoreNull(id, ShapeSheet.SRCConstants.ShapePermeableY, this.ShapePermeableY);
            update.SetFormulaIgnoreNull(id, ShapeSheet.SRCConstants.ShapePlaceFlip, this.ShapePlaceFlip);
            update.SetFormulaIgnoreNull(id, ShapeSheet.SRCConstants.ShapePlaceStyle, this.ShapePlaceStyle);
            update.SetFormulaIgnoreNull(id, ShapeSheet.SRCConstants.ShapePlowCode, this.ShapePlowCode);
            update.SetFormulaIgnoreNull(id, ShapeSheet.SRCConstants.ShapeRouteStyle, this.ShapeRouteStyle);
            update.SetFormulaIgnoreNull(id, ShapeSheet.SRCConstants.ShapeSplit, this.ShapeSplit);
            update.SetFormulaIgnoreNull(id, ShapeSheet.SRCConstants.ShapeSplittable, this.ShapeSplittable);
        }
Beispiel #4
0
 public void Apply(ShapeSheet.Update update, short id)
 {
     update.SetFormulaIgnoreNull(id, ShapeSheet.SRCConstants.AvenueSizeX, this.AvenueSizeX);
     update.SetFormulaIgnoreNull(id, ShapeSheet.SRCConstants.AvenueSizeY, this.AvenueSizeY);
     update.SetFormulaIgnoreNull(id, ShapeSheet.SRCConstants.BlockSizeX, this.BlockSizeX);
     update.SetFormulaIgnoreNull(id, ShapeSheet.SRCConstants.BlockSizeY, this.BlockSizeY);
     update.SetFormulaIgnoreNull(id, ShapeSheet.SRCConstants.CtrlAsInput, this.CtrlAsInput);
     update.SetFormulaIgnoreNull(id, ShapeSheet.SRCConstants.DynamicsOff, this.DynamicsOff);
     update.SetFormulaIgnoreNull(id, ShapeSheet.SRCConstants.EnableGrid, this.EnableGrid);
     update.SetFormulaIgnoreNull(id, ShapeSheet.SRCConstants.LineAdjustFrom, this.LineAdjustFrom);
     update.SetFormulaIgnoreNull(id, ShapeSheet.SRCConstants.LineAdjustTo, this.LineAdjustTo);
     update.SetFormulaIgnoreNull(id, ShapeSheet.SRCConstants.LineJumpCode, this.LineJumpCode);
     update.SetFormulaIgnoreNull(id, ShapeSheet.SRCConstants.LineJumpFactorX, this.LineJumpFactorX);
     update.SetFormulaIgnoreNull(id, ShapeSheet.SRCConstants.LineJumpFactorY, this.LineJumpFactorY);
     update.SetFormulaIgnoreNull(id, ShapeSheet.SRCConstants.LineJumpStyle, this.LineJumpStyle);
     update.SetFormulaIgnoreNull(id, ShapeSheet.SRCConstants.LineRouteExt, this.LineRouteExt);
     update.SetFormulaIgnoreNull(id, ShapeSheet.SRCConstants.LineToLineX, this.LineToLineX);
     update.SetFormulaIgnoreNull(id, ShapeSheet.SRCConstants.LineToLineY, this.LineToLineY);
     update.SetFormulaIgnoreNull(id, ShapeSheet.SRCConstants.LineToNodeX, this.LineToNodeX);
     update.SetFormulaIgnoreNull(id, ShapeSheet.SRCConstants.LineToNodeY, this.LineToNodeY);
     update.SetFormulaIgnoreNull(id, ShapeSheet.SRCConstants.PageLineJumpDirX, this.PageLineJumpDirX);
     update.SetFormulaIgnoreNull(id, ShapeSheet.SRCConstants.PageLineJumpDirY, this.PageLineJumpDirY);
     update.SetFormulaIgnoreNull(id, ShapeSheet.SRCConstants.PageShapeSplit, this.PageShapeSplit);
     update.SetFormulaIgnoreNull(id, ShapeSheet.SRCConstants.PlaceDepth, this.PlaceDepth);
     update.SetFormulaIgnoreNull(id, ShapeSheet.SRCConstants.PlaceFlip, this.PlaceFlip);
     update.SetFormulaIgnoreNull(id, ShapeSheet.SRCConstants.PlaceStyle, this.PlaceStyle);
     update.SetFormulaIgnoreNull(id, ShapeSheet.SRCConstants.PlowCode, this.PlowCode);
     update.SetFormulaIgnoreNull(id, ShapeSheet.SRCConstants.ResizePage, this.ResizePage);
     update.SetFormulaIgnoreNull(id, ShapeSheet.SRCConstants.RouteStyle, this.RouteStyle);
 }
Beispiel #5
0
 internal void ApplyFormulas(ShapeSheet.Update update, short row)
 {
     update.SetFormulaIgnoreNull(SRCCON.CharColor.ForRow(row), this.Color);
     update.SetFormulaIgnoreNull(SRCCON.CharFont.ForRow(row), this.Font);
     update.SetFormulaIgnoreNull(SRCCON.CharSize.ForRow(row), this.Size);
     update.SetFormulaIgnoreNull(SRCCON.CharStyle.ForRow(row), this.Style);
     update.SetFormulaIgnoreNull(SRCCON.CharColorTrans.ForRow(row), this.Transparency);
     update.SetFormulaIgnoreNull(SRCCON.CharAsianFont.ForRow(row), this.AsianFont);
     update.SetFormulaIgnoreNull(SRCCON.CharCase.ForRow(row), this.Case);
     update.SetFormulaIgnoreNull(SRCCON.CharComplexScriptFont.ForRow(row), this.ComplexScriptFont);
     update.SetFormulaIgnoreNull(SRCCON.CharComplexScriptSize.ForRow(row), this.ComplexScriptSize);
     update.SetFormulaIgnoreNull(SRCCON.CharDblUnderline.ForRow(row), this.DoubleUnderline);
     update.SetFormulaIgnoreNull(SRCCON.CharDoubleStrikethrough.ForRow(row), this.DoubleStrikeThrough);
     update.SetFormulaIgnoreNull(SRCCON.CharLangID.ForRow(row), this.LangID);
     update.SetFormulaIgnoreNull(SRCCON.CharFontScale.ForRow(row), this.FontScale);
     update.SetFormulaIgnoreNull(SRCCON.CharLangID.ForRow(row), this.LangID);
     update.SetFormulaIgnoreNull(SRCCON.CharLetterspace.ForRow(row), this.Letterspace);
     update.SetFormulaIgnoreNull(SRCCON.CharLocale.ForRow(row), this.Locale);
     update.SetFormulaIgnoreNull(SRCCON.CharLocalizeFont.ForRow(row), this.LocalizeFont);
     update.SetFormulaIgnoreNull(SRCCON.CharOverline.ForRow(row), this.Overline);
     update.SetFormulaIgnoreNull(SRCCON.CharPerpendicular.ForRow(row), this.Perpendicular);
     update.SetFormulaIgnoreNull(SRCCON.CharPos.ForRow(row), this.Pos);
     update.SetFormulaIgnoreNull(SRCCON.CharRTLText.ForRow(row), this.RTLText);
     update.SetFormulaIgnoreNull(SRCCON.CharStrikethru.ForRow(row), this.Strikethru);
     update.SetFormulaIgnoreNull(SRCCON.CharUseVertical.ForRow(row), this.UseVertical);
 }
 internal void ApplyFormulas(ShapeSheet.Update update, short row)
 {
     update.SetFormulaIgnoreNull(SRCCON.Para_IndLeft.ForRow(row), this.IndentLeft);
     update.SetFormulaIgnoreNull(SRCCON.Para_IndFirst.ForRow(row), this.IndentFirst);
     update.SetFormulaIgnoreNull(SRCCON.Para_IndRight.ForRow(row), this.IndentRight);
     update.SetFormulaIgnoreNull(SRCCON.Para_SpAfter.ForRow(row), this.SpacingAfter);
     update.SetFormulaIgnoreNull(SRCCON.Para_SpBefore.ForRow(row), this.SpacingBefore);
     update.SetFormulaIgnoreNull(SRCCON.Para_SpLine.ForRow(row), this.SpacingLine);
     update.SetFormulaIgnoreNull(SRCCON.Para_HorzAlign.ForRow(row), this.HorizontalAlign);
     update.SetFormulaIgnoreNull(SRCCON.Para_BulletFont.ForRow(row), this.BulletFont);
     update.SetFormulaIgnoreNull(SRCCON.Para_Bullet.ForRow(row), this.Bullet);
     update.SetFormulaIgnoreNull(SRCCON.Para_BulletFontSize.ForRow(row), this.BulletFontSize);
     update.SetFormulaIgnoreNull(SRCCON.Para_LocalizeBulletFont.ForRow(row), this.LocBulletFont);
     update.SetFormulaIgnoreNull(SRCCON.Para_TextPosAfterBullet.ForRow(row), this.TextPosAfterBullet);
     update.SetFormulaIgnoreNull(SRCCON.Para_Flags.ForRow(row), this.Flags);
     update.SetFormulaIgnoreNull(SRCCON.Para_BulletStr.ForRow(row), this.BulletString);
 }