本文整理汇总了C#中Ecell.Objects.EcellObject.SetPosition方法的典型用法代码示例。如果您正苦于以下问题:C# EcellObject.SetPosition方法的具体用法?C# EcellObject.SetPosition怎么用?C# EcellObject.SetPosition使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Ecell.Objects.EcellObject
的用法示例。
在下文中一共展示了EcellObject.SetPosition方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: TestSetPosition
public void TestSetPosition()
{
_unitUnderTest = EcellObject.CreateObject("Model", "", "Model", "", new List<EcellData>());
EcellObject obj = EcellObject.CreateObject("Model", "", "Model", "", new List<EcellData>());
obj.X = 100;
obj.Y = 150;
obj.Width = 200;
obj.Height = 250;
obj.OffsetX = 300;
obj.OffsetY = 350;
_unitUnderTest.SetPosition(obj);
Assert.AreEqual(obj.X, _unitUnderTest.X, "X is unexpected value.");
Assert.AreEqual(obj.Y, _unitUnderTest.Y, "Y is unexpected value.");
Assert.AreEqual(obj.Width, _unitUnderTest.Width, "Width is unexpected value.");
Assert.AreEqual(obj.Height, _unitUnderTest.Height, "Height is unexpected value.");
Assert.AreEqual(obj.OffsetX, _unitUnderTest.OffsetX, "OffsetX is unexpected value.");
Assert.AreEqual(obj.OffsetY, _unitUnderTest.OffsetY, "OffsetY is unexpected value.");
Assert.AreEqual(new RectangleF(100, 150, 200, 250), _unitUnderTest.Rect, "Rect is unexpected value.");
Assert.AreEqual(new PointF(200, 275), _unitUnderTest.CenterPointF, "CenterPointF is unexpected value.");
}