本文整理汇总了C#中Microsoft.Office.Interop.Visio.AddGuide方法的典型用法代码示例。如果您正苦于以下问题:C# Microsoft.Office.Interop.Visio.AddGuide方法的具体用法?C# Microsoft.Office.Interop.Visio.AddGuide怎么用?C# Microsoft.Office.Interop.Visio.AddGuide使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Microsoft.Office.Interop.Visio
的用法示例。
在下文中一共展示了Microsoft.Office.Interop.Visio.AddGuide方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CopyPage
/// <summary>
/// Formats the to Page similar to the from page and
/// copies all from FromPage to ToPage
/// </summary>
/// <param name="fromPage">Source page</param>
/// <param name="toPage">Destination page</param>
private void CopyPage(Visio.Page fromPage, Visio.Page toPage)
{
SetupDestinationPage(fromPage, toPage);
//Copy shapes
fromPage.AddGuide((short)Visio.VisGuideTypes.visPoint, 0, 0);
Visio.Selection selection = fromPage.CreateSelection(Visio.VisSelectionTypes.visSelTypeAll);
selection.Copy();
toPage.Paste();
Visio.Selection resultSelection = toPage.CreateSelection(Visio.VisSelectionTypes.visSelTypeAll);
double origX, origY, newX, newY, dummy1, dummy2;
selection.BoundingBox(1, out origX, out origY, out dummy1, out dummy2);
resultSelection.BoundingBox(1, out newX, out newY, out dummy1, out dummy2);
double diffX = origX - newX;
double diffY = origY - newY;
resultSelection.Move(diffX, diffY);
}