当前位置: 首页>>代码示例>>C#>>正文


C# Shape.get_CellsU方法代码示例

本文整理汇总了C#中Shape.get_CellsU方法的典型用法代码示例。如果您正苦于以下问题:C# Shape.get_CellsU方法的具体用法?C# Shape.get_CellsU怎么用?C# Shape.get_CellsU使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Shape的用法示例。


在下文中一共展示了Shape.get_CellsU方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: FixConnectorTextControl

 public static void FixConnectorTextControl(Shape shape)
 {
     if (Common.GetShapeType(shape) == ShapeTypes.Connector) {
         string pinX = Common.GetCellFormula(shape, "TxtPinX");
         // if the current TxtPinX already is updating another cell via setatref, we don't need to
         // do anything
         if (!pinX.Contains("SETATREF")) {
             shape.AddNamedRow((short)VisSectionIndices.visSectionControls, "TextPosition", 0);
             // get old values and reuse them if we already have text
             string pinY = Common.GetCellFormula(shape, "TxtPinY");
             if (shape.Text.Length > 0) {
                 shape.get_CellsU("Controls.TextPosition.X").Formula = pinX;
                 shape.get_CellsU("Controls.TextPosition.Y").Formula = pinY;
             }
             else {
                 shape.get_CellsU("Controls.TextPosition.Y").FormulaU = "Height*0.5";
                 shape.get_CellsU("Controls.TextPosition.X").FormulaU = "Width*0.5";
             }
             shape.get_CellsU("Controls.TextPosition.XDyn").FormulaU = "Controls.TextPosition.X";
             shape.get_CellsU("Controls.TextPosition.YDyn").FormulaU = "Controls.TextPosition.Y";
             shape.get_CellsU("Controls.TextPosition.XCon").FormulaU = "IF(OR(STRSAME(SHAPETEXT(TheText),\"\"),HideText),5,0)";
             shape.get_CellsU("Controls.TextPosition.CanGlue").FormulaU = "FALSE";
             shape.get_CellsU("Controls.TextPosition.Prompt").FormulaU = "\"Reposition Text\"";
             shape.get_CellsU("TxtPinX").FormulaU = "SETATREF(Controls.TextPosition)";
             shape.get_CellsU("TxtPinY").FormulaU = "SETATREF(Controls.TextPosition.Y)";
         }
     }
 }
开发者ID:pathmakertool,项目名称:pathmaker_os_files,代码行数:28,代码来源:Common.cs


注:本文中的Shape.get_CellsU方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。