예제 #1
0
 public void SetFormulas(VisioAutomation.ShapeSheet.Writers.FormulaWriterSIDSRC writer, short id)
 {
     writer.SetFormula(id, VisioAutomation.ShapeSheet.SRCConstants.PinX, this.PinX);
     writer.SetFormula(id, VisioAutomation.ShapeSheet.SRCConstants.PinY, this.PinY);
     writer.SetFormula(id, VisioAutomation.ShapeSheet.SRCConstants.LocPinX, this.LocPinX);
     writer.SetFormula(id, VisioAutomation.ShapeSheet.SRCConstants.LocPinY, this.LocPinY);
     writer.SetFormula(id, VisioAutomation.ShapeSheet.SRCConstants.Width, this.Width);
     writer.SetFormula(id, VisioAutomation.ShapeSheet.SRCConstants.Height, this.Height);
 }
예제 #2
0
        private static void ModifySizes(IVisio.Page page, IList <int> sorted_shape_ids, List <VisioAutomation.Drawing.Size> newsizes)
        {
            var writer = new VisioAutomation.ShapeSheet.Writers.FormulaWriterSIDSRC();

            for (int i = 0; i < newsizes.Count; i++)
            {
                writer.SetFormula((short)sorted_shape_ids[i], VisioAutomation.ShapeSheet.SRCConstants.Width, newsizes[i].Width);
                writer.SetFormula((short)sorted_shape_ids[i], VisioAutomation.ShapeSheet.SRCConstants.Height, newsizes[i].Height);
            }
            writer.Commit(page);
        }
예제 #3
0
        private static void ModifyPinPositions(IVisio.Page page, IList <int> sorted_shape_ids, List <VisioAutomation.Drawing.Point> newpositions)
        {
            var writer = new VisioAutomation.ShapeSheet.Writers.FormulaWriterSIDSRC();

            for (int i = 0; i < newpositions.Count; i++)
            {
                writer.SetFormula((short)sorted_shape_ids[i], VisioAutomation.ShapeSheet.SRCConstants.PinX, newpositions[i].X);
                writer.SetFormula((short)sorted_shape_ids[i], VisioAutomation.ShapeSheet.SRCConstants.PinY, newpositions[i].Y);
            }
            writer.Commit(page);
        }