using System.Drawing; using System.Windows.Forms; using JD.Kernel.StaticHelpers; namespace JD.ScreenWrappers { /// /// Wraps a Windows.Forms.Control as IControl /// public class WindowsFormsControl : IControl { #region Variables private readonly Control m_control; #endregion #region Constructor public WindowsFormsControl(Control control) { Throw.IfNull(control, "control"); m_control = control; } #endregion #region Properties public Size Size { get { return m_control.Size; } } public int Width { get { return m_control.Width; } } public int Height { get { return m_control.Height; } } #endregion #region Methods public Point PointToScreen(Point point) { return m_control.PointToScreen(point); } public Point PointToClient(Point screenPoint) { return m_control.PointToClient(screenPoint); } #endregion } }