Index: src/Deltares.DSoilModel.Forms/Deltares.DSoilModel.Forms.csproj
===================================================================
diff -u -r253 -r294
--- src/Deltares.DSoilModel.Forms/Deltares.DSoilModel.Forms.csproj (.../Deltares.DSoilModel.Forms.csproj) (revision 253)
+++ src/Deltares.DSoilModel.Forms/Deltares.DSoilModel.Forms.csproj (.../Deltares.DSoilModel.Forms.csproj) (revision 294)
@@ -199,6 +199,12 @@
BoringLookup1DControl.cs
+
+ UserControl
+
+
+ SoilProfile1DLookup2DControl.cs
+
UserControl
@@ -313,6 +319,10 @@
BoringLookup1DControl.cs
+
+ SoilProfile1DLookup2DControl.cs
+ Designer
+
CPTLookup1DControl.cs
Designer
Index: src/Deltares.DSoilModel.Forms/Translations.xml
===================================================================
diff -u -r262 -r294
--- src/Deltares.DSoilModel.Forms/Translations.xml (.../Translations.xml) (revision 262)
+++ src/Deltares.DSoilModel.Forms/Translations.xml (.../Translations.xml) (revision 294)
@@ -90,4 +90,5 @@
+
Index: src/Deltares.DSoilModel.Forms/DSoilModelPlugin.cs
===================================================================
diff -u -r289 -r294
--- src/Deltares.DSoilModel.Forms/DSoilModelPlugin.cs (.../DSoilModelPlugin.cs) (revision 289)
+++ src/Deltares.DSoilModel.Forms/DSoilModelPlugin.cs (.../DSoilModelPlugin.cs) (revision 294)
@@ -892,7 +892,7 @@
// override SoilProfile1DControl which is registered in geotechnics plugin, replace with local SOSSoilProfile1DControl control
mainForm.DynamicPropertyControl.ClearRegistrationsForType(typeof(SoilProfile1D));
mainForm.DynamicPropertyControl.BuildDelayedPropertyControlForTypes(() => new SosSoilProfile1DControl(), typeof(SoilProfile1D), typeof(SosSoilLayer1D));
-
+ mainForm.DynamicPropertyControl.BuildDelayedPropertyControlForTypes(() => new SoilProfile1DLookup2DControl(), typeof(SoilProfile1DLookup2D));
mainForm.DynamicPropertyControl.BuildDelayedPropertyControlForTypes(() => new SoilProfile2DControl(), typeof(SoilProfile2D));
mainForm.DynamicPropertyControl.BuildDelayedPropertyControlForTypes(() => new SoilLayer2DControl(), typeof(SoilLayer2D));
Index: src/Deltares.DSoilModel.Forms/CPTLookup2DControl.cs
===================================================================
diff -u -r252 -r294
--- src/Deltares.DSoilModel.Forms/CPTLookup2DControl.cs (.../CPTLookup2DControl.cs) (revision 252)
+++ src/Deltares.DSoilModel.Forms/CPTLookup2DControl.cs (.../SoilProfile1DLookup2DControl.cs) (revision 294)
@@ -1,60 +1,61 @@
using System.Windows.Forms;
-using Deltares.Geotechnics.ConePenetrationTest;
+using Deltares.Geotechnics;
using Deltares.Standard.Forms;
using Deltares.Standard.Forms.DExpress;
using Deltares.Standard.Language;
namespace Deltares.DSoilModel.Forms
{
- public partial class CPTLookup2DControl : UserControl, IPropertyControl
+ public partial class SoilProfile1DLookup2DControl : UserControl, IPropertyControl
{
- private ConePenetrationTestLookup2D conePenetrationTestLookup;
+ private SoilProfile1DLookup2D lookup;
- public CPTLookup2DControl()
+ public SoilProfile1DLookup2DControl()
{
InitializeComponent();
- const string caption = "CPT Lookup";
+ const string caption = "SoilProfile1DLookup2DControl";
- ((IPropertyControl)this).Name = LocalizationManager.GetTranslatedText(this, caption);
-
- 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");
-
+ ((IPropertyControl) this).Name = LocalizationManager.GetTranslatedText(this, caption);
+ BindSupport.BindTextValueAndUnit(this, XLabel, XEdit, typeof(SoilProfile1DLookup2D), "Xlocal");
OffsetGroupControl.Text = caption;
- LocalizationSupport.RegisterAndTranslate(typeof(CPTControl), OffsetGroupControl);
+ LocalizationSupport.RegisterAndTranslate(GetType(), OffsetGroupControl);
FormsSupport.RepairRightAnchoredControls(this);
}
#region IPropertyControl Members
+ ///
+ /// Gets or sets the object to be displayed in the property window.
+ ///
public object SelectedObject
{
get
{
- return conePenetrationTestLookup;
+ return lookup;
}
set
{
- var lookup = value as ConePenetrationTestLookup2D;
+ lookup = value as SoilProfile1DLookup2D;
if (lookup != null)
{
- conePenetrationTestLookup = lookup;
+ sosSoilProfile1DControl1.SelectedObject = lookup.SoilProfile1D;
}
- BindSupport.Assign(this, conePenetrationTestLookup);
+
+ BindSupport.Assign(this, lookup);
}
}
+ ///
+ /// Whether or not the property control should be displayed.
+ ///
public bool IsVisible
{
get
{
return true;
}
}
-
#endregion
}
}
\ No newline at end of file
Index: src/Deltares.DSoilModel.Forms/CPTLookup2DControl.Designer.cs
===================================================================
diff -u -r252 -r294
--- src/Deltares.DSoilModel.Forms/CPTLookup2DControl.Designer.cs (.../CPTLookup2DControl.Designer.cs) (revision 252)
+++ src/Deltares.DSoilModel.Forms/CPTLookup2DControl.Designer.cs (.../SoilProfile1DLookup2DControl.Designer.cs) (revision 294)
@@ -1,6 +1,6 @@
namespace Deltares.DSoilModel.Forms
{
- partial class CPTLookup2DControl
+ partial class SoilProfile1DLookup2DControl
{
///
/// Required designer variable.
@@ -30,67 +30,32 @@
{
this.OffsetGroupControl = new DevExpress.XtraEditors.GroupControl();
this.XLabel = new DevExpress.XtraEditors.LabelControl();
- this.ZEdit = new DevExpress.XtraEditors.SpinEdit();
this.XEdit = new DevExpress.XtraEditors.SpinEdit();
- this.ZLabel = new DevExpress.XtraEditors.LabelControl();
- this.CPTNameLabelControl = new DevExpress.XtraEditors.LabelControl();
- this.ProfileNameLabelControl = new DevExpress.XtraEditors.LabelControl();
- this.CPTNameTextEdit = new DevExpress.XtraEditors.TextEdit();
- this.ProfileNameTextEdit = new DevExpress.XtraEditors.TextEdit();
+ this.sosSoilProfile1DControl1 = new Deltares.DSoilModel.Forms.SosSoilProfile1DControl();
((System.ComponentModel.ISupportInitialize)(this.OffsetGroupControl)).BeginInit();
this.OffsetGroupControl.SuspendLayout();
- ((System.ComponentModel.ISupportInitialize)(this.ZEdit.Properties)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.XEdit.Properties)).BeginInit();
- ((System.ComponentModel.ISupportInitialize)(this.CPTNameTextEdit.Properties)).BeginInit();
- ((System.ComponentModel.ISupportInitialize)(this.ProfileNameTextEdit.Properties)).BeginInit();
this.SuspendLayout();
//
// OffsetGroupControl
//
- this.OffsetGroupControl.Controls.Add(this.ProfileNameTextEdit);
- this.OffsetGroupControl.Controls.Add(this.CPTNameTextEdit);
- this.OffsetGroupControl.Controls.Add(this.ProfileNameLabelControl);
- this.OffsetGroupControl.Controls.Add(this.CPTNameLabelControl);
this.OffsetGroupControl.Controls.Add(this.XLabel);
- this.OffsetGroupControl.Controls.Add(this.ZEdit);
this.OffsetGroupControl.Controls.Add(this.XEdit);
- this.OffsetGroupControl.Controls.Add(this.ZLabel);
this.OffsetGroupControl.Dock = System.Windows.Forms.DockStyle.Top;
this.OffsetGroupControl.Location = new System.Drawing.Point(0, 0);
- this.OffsetGroupControl.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.OffsetGroupControl.Name = "OffsetGroupControl";
- this.OffsetGroupControl.Size = new System.Drawing.Size(347, 174);
+ this.OffsetGroupControl.Size = new System.Drawing.Size(260, 62);
this.OffsetGroupControl.TabIndex = 8;
- this.OffsetGroupControl.Text = "CPT Lookup";
+ this.OffsetGroupControl.Text = "SoilProfile1DLookup2DControl";
//
// XLabel
//
- this.XLabel.Location = new System.Drawing.Point(21, 41);
- this.XLabel.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+ this.XLabel.Location = new System.Drawing.Point(16, 33);
this.XLabel.Name = "XLabel";
- this.XLabel.Size = new System.Drawing.Size(50, 16);
+ this.XLabel.Size = new System.Drawing.Size(43, 13);
this.XLabel.TabIndex = 6;
this.XLabel.Text = "X Offset ";
//
- // ZEdit
- //
- this.ZEdit.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
- this.ZEdit.EditValue = new decimal(new int[] {
- 0,
- 0,
- 0,
- 0});
- this.ZEdit.EnterMoveNextControl = true;
- this.ZEdit.Location = new System.Drawing.Point(200, 69);
- this.ZEdit.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
- this.ZEdit.Name = "ZEdit";
- this.ZEdit.Properties.DisplayFormat.FormatType = DevExpress.Utils.FormatType.Numeric;
- this.ZEdit.Properties.EditFormat.FormatString = "F3";
- this.ZEdit.Properties.EditFormat.FormatType = DevExpress.Utils.FormatType.Numeric;
- this.ZEdit.Properties.HideSelection = false;
- this.ZEdit.Size = new System.Drawing.Size(133, 22);
- this.ZEdit.TabIndex = 9;
- //
// XEdit
//
this.XEdit.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
@@ -100,74 +65,37 @@
0,
0});
this.XEdit.EnterMoveNextControl = true;
- this.XEdit.Location = new System.Drawing.Point(200, 37);
- this.XEdit.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+ this.XEdit.Location = new System.Drawing.Point(150, 30);
this.XEdit.Name = "XEdit";
this.XEdit.Properties.DisplayFormat.FormatType = DevExpress.Utils.FormatType.Numeric;
this.XEdit.Properties.EditFormat.FormatString = "F3";
this.XEdit.Properties.EditFormat.FormatType = DevExpress.Utils.FormatType.Numeric;
this.XEdit.Properties.HideSelection = false;
- this.XEdit.Size = new System.Drawing.Size(133, 22);
+ this.XEdit.Size = new System.Drawing.Size(100, 20);
this.XEdit.TabIndex = 7;
//
- // ZLabel
+ // sosSoilProfile1DControl1
//
- this.ZLabel.Location = new System.Drawing.Point(21, 73);
- this.ZLabel.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
- this.ZLabel.Name = "ZLabel";
- this.ZLabel.Size = new System.Drawing.Size(43, 16);
- this.ZLabel.TabIndex = 8;
- this.ZLabel.Text = "Z offset";
+ this.sosSoilProfile1DControl1.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.sosSoilProfile1DControl1.Location = new System.Drawing.Point(-21, 10);
+ this.sosSoilProfile1DControl1.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+ this.sosSoilProfile1DControl1.Name = "sosSoilProfile1DControl1";
+ this.sosSoilProfile1DControl1.SelectedObject = null;
+ this.sosSoilProfile1DControl1.Size = new System.Drawing.Size(303, 578);
+ this.sosSoilProfile1DControl1.TabIndex = 9;
//
- // CPTNameLabelControl
+ // SoilProfile1DLookup2DControl
//
- this.CPTNameLabelControl.Location = new System.Drawing.Point(21, 110);
- this.CPTNameLabelControl.Margin = new System.Windows.Forms.Padding(4);
- this.CPTNameLabelControl.Name = "CPTNameLabelControl";
- this.CPTNameLabelControl.Size = new System.Drawing.Size(23, 16);
- this.CPTNameLabelControl.TabIndex = 10;
- this.CPTNameLabelControl.Text = "CPT";
- //
- // ProfileNameLabelControl
- //
- this.ProfileNameLabelControl.Location = new System.Drawing.Point(21, 143);
- this.ProfileNameLabelControl.Margin = new System.Windows.Forms.Padding(4);
- this.ProfileNameLabelControl.Name = "ProfileNameLabelControl";
- this.ProfileNameLabelControl.Size = new System.Drawing.Size(36, 16);
- this.ProfileNameLabelControl.TabIndex = 11;
- this.ProfileNameLabelControl.Text = "Profile";
- //
- // CPTNameTextEdit
- //
- this.CPTNameTextEdit.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
- this.CPTNameTextEdit.Location = new System.Drawing.Point(200, 107);
- this.CPTNameTextEdit.Name = "CPTNameTextEdit";
- this.CPTNameTextEdit.Size = new System.Drawing.Size(133, 22);
- this.CPTNameTextEdit.TabIndex = 12;
- //
- // ProfileNameTextEdit
- //
- this.ProfileNameTextEdit.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
- this.ProfileNameTextEdit.Location = new System.Drawing.Point(200, 140);
- this.ProfileNameTextEdit.Name = "ProfileNameTextEdit";
- this.ProfileNameTextEdit.Size = new System.Drawing.Size(133, 22);
- this.ProfileNameTextEdit.TabIndex = 13;
- //
- // CPTLookupControl
- //
- this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F);
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.Controls.Add(this.sosSoilProfile1DControl1);
this.Controls.Add(this.OffsetGroupControl);
- this.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
- this.Name = "CPTLookupControl";
- this.Size = new System.Drawing.Size(347, 737);
+ this.Name = "SoilProfile1DLookup2DControl";
+ this.Size = new System.Drawing.Size(260, 599);
((System.ComponentModel.ISupportInitialize)(this.OffsetGroupControl)).EndInit();
this.OffsetGroupControl.ResumeLayout(false);
this.OffsetGroupControl.PerformLayout();
- ((System.ComponentModel.ISupportInitialize)(this.ZEdit.Properties)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.XEdit.Properties)).EndInit();
- ((System.ComponentModel.ISupportInitialize)(this.CPTNameTextEdit.Properties)).EndInit();
- ((System.ComponentModel.ISupportInitialize)(this.ProfileNameTextEdit.Properties)).EndInit();
this.ResumeLayout(false);
}
@@ -176,13 +104,8 @@
private DevExpress.XtraEditors.GroupControl OffsetGroupControl;
private DevExpress.XtraEditors.LabelControl XLabel;
- private DevExpress.XtraEditors.SpinEdit ZEdit;
private DevExpress.XtraEditors.SpinEdit XEdit;
- private DevExpress.XtraEditors.LabelControl ZLabel;
- private DevExpress.XtraEditors.TextEdit ProfileNameTextEdit;
- private DevExpress.XtraEditors.TextEdit CPTNameTextEdit;
- private DevExpress.XtraEditors.LabelControl ProfileNameLabelControl;
- private DevExpress.XtraEditors.LabelControl CPTNameLabelControl;
+ private SosSoilProfile1DControl sosSoilProfile1DControl1;
}
}
Index: src/Deltares.DSoilModel.Forms/SosSoilProfile1DControl.cs
===================================================================
diff -u -r289 -r294
--- src/Deltares.DSoilModel.Forms/SosSoilProfile1DControl.cs (.../SosSoilProfile1DControl.cs) (revision 289)
+++ src/Deltares.DSoilModel.Forms/SosSoilProfile1DControl.cs (.../SosSoilProfile1DControl.cs) (revision 294)
@@ -72,10 +72,6 @@
ClearControl();
}
}
- else if (value is SoilProfile1DLookup2D)
- {
- soilProfile = (value as SoilProfile1DLookup2D).SoilProfile1D;
- }
BindSupport.Assign(this, soilProfile);
}