本文整理汇总了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)";
}
}
}