using System.Drawing;
using System.ComponentModel;
namespace FastReport.Dialog
{
///
/// Base class for all dialog components.
///
public abstract partial class DialogComponentBase : ComponentBase
{
#region Properties
///
/// Gets or sets the coordinates of the upper-left corner of the control relative to the upper-left corner of its container.
///
[Category("Layout")]
public Point Location
{
get { return new Point((int)Left, (int)Top); }
set
{
Left = value.X;
Top = value.Y;
}
}
///
/// Gets or sets the height and width of the control.
///
[Category("Layout")]
public Size Size
{
get { return new Size((int)Width, (int)Height); }
set
{
Width = value.Width;
Height = value.Height;
}
}
#endregion
#region Public Methods
///
public override void Assign(Base source)
{
BaseAssign(source);
}
#endregion
///
/// Initializes a new instance of the DialogComponentBase class with default settings.
///
public DialogComponentBase()
{
if (BaseName.EndsWith("Component"))
BaseName = ClassName.Remove(ClassName.IndexOf("Component"));
if (BaseName.EndsWith("Control"))
BaseName = ClassName.Remove(ClassName.IndexOf("Control"));
}
}
}