using System.Windows.Forms; using Deltares.Geotechnics.ConePenetrationTest; using Deltares.Standard.Forms; using Deltares.Standard.Forms.DExpress; namespace Deltares.DSoilModel.Forms { public partial class CPTLookupControl : UserControl, IPropertyControl { private ConePenetrationTestLookup2D conePenetrationTestLookup; public CPTLookupControl() { InitializeComponent(); ((IPropertyControl)this).Name = "Sondering"; BindSupport.BindTextValueAndUnit(this, XLabel, XEdit, typeof(ConePenetrationTestLookup2D), "Xlocal"); BindSupport.BindTextValueAndUnit(this, ZLabel, ZEdit, typeof(ConePenetrationTestLookup2D), "Zlocal"); BindSupport.BindTextValueAndUnit(this, CPTNameLabelControl, CPTNameTextEdit, typeof(ConePenetrationTestLookup2D), "CPTName"); BindSupport.BindTextValueAndUnit(this, ProfileNameLabelControl, ProfileNameTextEdit, typeof(ConePenetrationTestLookup2D), "SoilProfileName"); OffsetGroupControl.Text = "CPT Lookup"; LocalizationSupport.RegisterAndTranslate(typeof(CPTControl), OffsetGroupControl); FormsSupport.RepairRightAnchoredControls(this); } #region IPropertyControl Members public object SelectedObject { get { return conePenetrationTestLookup; } set { var lookup = value as ConePenetrationTestLookup2D; if (lookup != null) { conePenetrationTestLookup = lookup; } BindSupport.Assign(this, conePenetrationTestLookup); } } public bool IsVisible { get { return true; } } #endregion } }