public void Test_ToString() { var size = new Size(10, 12); var sizeText = size.ToString(); Assert.IsTrue(sizeText.Contains("10")); Assert.IsTrue(sizeText.Contains("12")); }
private Point MapToScreen(Point point) { var originalSize = new Size(this.handDataSource.Width, this.handDataSource.Height); return(new Point( -50 + (float)(point.X / originalSize.Width * (SystemParameters.PrimaryScreenWidth + 100)), -50 + (float)(point.Y / originalSize.Height * (SystemParameters.PrimaryScreenHeight + 100)), point.Z)); }
public void Test_Equals() { var size = new Size(10, 10); var equalSize = new Size(10, 10); var unequalSize = new Size(11, 10); Assert.AreEqual(size, equalSize); Assert.AreNotEqual(size, unequalSize); Assert.AreNotEqual(size, null); Assert.AreNotEqual(size, new object()); }
private Point MapToScreen(Point point) { var originalSize = new Size(this.handSource.Width, this.handSource.Height); return new Point(-50 + (float)(point.X / originalSize.Width * (System.Windows.SystemParameters.PrimaryScreenWidth + 100)), -50 + (float)(point.Y / originalSize.Height * (System.Windows.SystemParameters.PrimaryScreenHeight + 100)), point.Z); }
private System.Drawing.Point MapToScreen(Point point, CCT.NUI.Core.Size originalSize) { int border = 50; return(new System.Drawing.Point(-border + (int)(point.X / originalSize.Width * (Screen.PrimaryScreen.Bounds.Width + 2 * border)), -border + (int)(point.Y / originalSize.Height * (Screen.PrimaryScreen.Bounds.Height + 2 * border)))); }
public void Test_GetHashcode() { var size = new Size(11, 10); Assert.IsTrue(size.GetHashCode() != 0); }
public Rectangle(Point location, Size size) : this() { this.Location = location; this.Size = size; }