public Formatting() { this.FormatCells = new Shapes.FormatCells(); this.CharacterCells = new Text.CharacterCells(); this.ParagraphCells = new Text.ParagraphCells(); this.TextBlockCells = new Text.TextBlockCells(); }
public VisioAutomation.Shapes.FormatCells GetCells(System.Collections.Generic.IList <ShapeSheet.CellData <double> > row) { var cells = new Shapes.FormatCells(); cells.FillBkgnd = Extensions.CellDataMethods.ToInt(row[this.FillBkgnd]); cells.FillBkgndTrans = row[this.FillBkgndTrans]; cells.FillForegnd = Extensions.CellDataMethods.ToInt(row[this.FillForegnd]); cells.FillForegndTrans = row[this.FillForegndTrans]; cells.FillPattern = Extensions.CellDataMethods.ToInt(row[this.FillPattern]); cells.ShapeShdwObliqueAngle = row[this.ShapeShdwObliqueAngle]; cells.ShapeShdwOffsetX = row[this.ShapeShdwOffsetX]; cells.ShapeShdwOffsetY = row[this.ShapeShdwOffsetY]; cells.ShapeShdwScaleFactor = row[this.ShapeShdwScaleFactor]; cells.ShapeShdwType = Extensions.CellDataMethods.ToInt(row[this.ShapeShdwType]); cells.ShdwBkgnd = Extensions.CellDataMethods.ToInt(row[this.ShdwBkgnd]); cells.ShdwBkgndTrans = row[this.ShdwBkgndTrans]; cells.ShdwForegnd = Extensions.CellDataMethods.ToInt(row[this.ShdwForegnd]); cells.ShdwForegndTrans = row[this.ShdwForegndTrans]; cells.ShdwPattern = Extensions.CellDataMethods.ToInt(row[this.ShdwPattern]); cells.BeginArrow = Extensions.CellDataMethods.ToInt(row[this.BeginArrow]); cells.BeginArrowSize = row[this.BeginArrowSize]; cells.EndArrow = Extensions.CellDataMethods.ToInt(row[this.EndArrow]); cells.EndArrowSize = row[this.EndArrowSize]; cells.LineCap = Extensions.CellDataMethods.ToInt(row[this.LineCap]); cells.LineColor = Extensions.CellDataMethods.ToInt(row[this.LineColor]); cells.LineColorTrans = row[this.LineColorTrans]; cells.LinePattern = Extensions.CellDataMethods.ToInt(row[this.LinePattern]); cells.LineWeight = row[this.LineWeight]; cells.Rounding = row[this.Rounding]; return(cells); }
public VisioAutomation.Shapes.FormatCells GetCells(System.Collections.Generic.IList<ShapeSheet.CellData<double>> row) { var cells = new Shapes.FormatCells(); cells.FillBkgnd = Extensions.CellDataMethods.ToInt(row[this.FillBkgnd]); cells.FillBkgndTrans = row[this.FillBkgndTrans]; cells.FillForegnd = Extensions.CellDataMethods.ToInt(row[this.FillForegnd]); cells.FillForegndTrans = row[this.FillForegndTrans]; cells.FillPattern = Extensions.CellDataMethods.ToInt(row[this.FillPattern]); cells.ShapeShdwObliqueAngle = row[this.ShapeShdwObliqueAngle]; cells.ShapeShdwOffsetX = row[this.ShapeShdwOffsetX]; cells.ShapeShdwOffsetY = row[this.ShapeShdwOffsetY]; cells.ShapeShdwScaleFactor = row[this.ShapeShdwScaleFactor]; cells.ShapeShdwType = Extensions.CellDataMethods.ToInt(row[this.ShapeShdwType]); cells.ShdwBkgnd = Extensions.CellDataMethods.ToInt(row[this.ShdwBkgnd]); cells.ShdwBkgndTrans = row[this.ShdwBkgndTrans]; cells.ShdwForegnd = Extensions.CellDataMethods.ToInt(row[this.ShdwForegnd]); cells.ShdwForegndTrans = row[this.ShdwForegndTrans]; cells.ShdwPattern = Extensions.CellDataMethods.ToInt(row[this.ShdwPattern]); cells.BeginArrow = Extensions.CellDataMethods.ToInt(row[this.BeginArrow]); cells.BeginArrowSize = row[this.BeginArrowSize]; cells.EndArrow = Extensions.CellDataMethods.ToInt(row[this.EndArrow]); cells.EndArrowSize = row[this.EndArrowSize]; cells.LineCap = Extensions.CellDataMethods.ToInt(row[this.LineCap]); cells.LineColor = Extensions.CellDataMethods.ToInt(row[this.LineColor]); cells.LineColorTrans = row[this.LineColorTrans]; cells.LinePattern = Extensions.CellDataMethods.ToInt(row[this.LinePattern]); cells.LineWeight = row[this.LineWeight]; cells.Rounding = row[this.Rounding]; return cells; }
public TextBlock(Drawing.Size size, string text) { this.Text = text; this.Size = size; this.TextBlockCells = new Text.TextBlockCells(); this.ParagraphCells = new Text.ParagraphCells(); this.FormatCells = new Shapes.FormatCells(); this.CharacterCells = new Text.CharacterCells(); }
public void Set(IList <IVisio.Shape> target_shapes, Shapes.FormatCells format) { this.Client.Application.AssertApplicationAvailable(); this.Client.Document.AssertDocumentAvailable(); var shapes = this.GetTargetShapes(target_shapes); if (shapes.Count < 1) { return; } var update = new ShapeSheet.Update(); var shapeids = shapes.Select(s => s.ID).ToList(); foreach (int shapeid in shapeids) { update.SetFormulas((short)shapeid, format); } var application = this.Client.Application.Get(); update.Execute(application.ActivePage); }