static void Main(string[] args) { Circle mycircle = new Circle(); mycircle.Radius = 7.5; Console.WriteLine($"The radius of {mycircle.Radius} is {mycircle.CalculateArea()}" + $" and a perimeter of {mycircle.CalculatePerimeter()}"); Circle circle2 = new Circle(); circle2.Radius = 8282828282; double areaofcircle2 = circle2.CalculateArea(); double perimeterofcircle2 = circle2.CalculatePerimeter; Circle circle3 = new Circle(3.5); Rectangle myrectangle = new RectangleL(); myrectangle.Length = 6; Console.WriteLine($"The length of {myrectangle.Length} is {myrectangle.CalculateArea()}" + $" and a perimeter of {myrectangle.CalculatePerimeter()}"); Rectangle rectangle2 = new RectangleW(); rectangle2.Length = 43; rectangle2.Width = 23; double areaofrectangle2 = rectangle2.CalculateArea(); double perimeterofrectangle2 = rectangle2.CalculatePerimeter(); }
public DisplayConfigDesktopImageInfo(PointL pathSourceSize, RectangleL desktopImageRegion, RectangleL desktopImageClip) { PathSourceSize = pathSourceSize; DesktopImageRegion = desktopImageRegion; DesktopImageClip = desktopImageClip; }
public override void ViewportChanged(IMapViewport viewport, ViewportChangeAction action) { if (this.Image == null) { base.ViewportChanged(viewport, action); return; } long mapSize = MapTileSystemHelper.MapSize(viewport.ZoomLevel); if ((action & ViewportChangeAction.Zoom) != 0) { this.pixelLocation = MapTileSystemHelper.LatLongToPixelXY(this.Location, viewport.ZoomLevel); } if ((action & ViewportChangeAction.Pan) != 0) { this.drawRect = new RectangleL(pixelLocation.X - this.Image.Size.Width / 2, pixelLocation.Y - this.Image.Size.Height, this.Image.Size.Width, this.Image.Size.Height); } RectangleL wraparoundDrawRect = this.drawRect; for (int i = 0; i <= viewport.NumberOfWraparounds; i++) { if (wraparoundDrawRect.IntersectsWith(viewport.ViewportInPixels)) { this.isImageInViewPort = true; break; } wraparoundDrawRect.Offset(mapSize, 0L); } if (!this.IsInViewport) { return; } }
internal static extern IntPtr MonitorFromRect( [In] RectangleL rectangle, MonitorFromFlag flag );