using System.Windows.Forms;
using Deltares.Geotechnics;
using Deltares.Standard.Forms;
using Deltares.Standard.Forms.DExpress;
namespace Deltares.DSoilModel.Forms
{
///
/// Earthquake Dialog.
///
public partial class BoringControl : UserControl, IPropertyControl
{
private Boring boring;
///
/// Constructor.
///
public BoringControl()
{
InitializeComponent();
((IPropertyControl) this).Name = "Boring";
BindSupport.BindTextValueAndUnit(this, XLabel, XEdit, typeof(Boring), "X");
BindSupport.BindTextValueAndUnit(this, ZLabel, ZEdit, typeof(Boring), "Y");
BindSupport.BindTextAndValue(this, NameLabel, NameEdit, typeof(Boring), "Name");
BindSupport.BindTextAndValue(this, DescriptionLabel, DescriptionEdit, typeof(Boring), "Description");
BindSupport.Bind(this, BoringValuesGridControl, p => p.BoringLayers);
BoringValuesGridControl.ShowToolbar = false;
IdentificationGroupControl.Text = "IdentificationGroupControl";
LocationGroupControl.Text = "LocationGroupControl";
BoringValuesGroupControl.Text = "BoringValuesGroupControl";
LocalizationSupport.RegisterAndTranslate(typeof(BoringControl), IdentificationGroupControl,
LocationGroupControl, BoringValuesGroupControl);
FormsSupport.RepairRightAnchoredControls(this);
}
#region IPropertyControl Members
public object SelectedObject
{
get
{
return boring;
}
set
{
var boring1 = value as Boring;
if (boring1 != null)
{
boring = boring1;
}
BindSupport.Assign(this, boring);
}
}
public bool IsVisible
{
get
{
return true;
}
}
#endregion
}
}