Index: src/Plugins/Wti/Wti.Controller/PipingDataNodeController.cs =================================================================== diff -u -r4eeb65b4d7a03f5151011baaa5bf461ee08baf63 -r25ea8e7a3358ccf418ac651c2ac1dd7fc4ee8bed --- src/Plugins/Wti/Wti.Controller/PipingDataNodeController.cs (.../PipingDataNodeController.cs) (revision 4eeb65b4d7a03f5151011baaa5bf461ee08baf63) +++ src/Plugins/Wti/Wti.Controller/PipingDataNodeController.cs (.../PipingDataNodeController.cs) (revision 25ea8e7a3358ccf418ac651c2ac1dd7fc4ee8bed) @@ -67,12 +67,15 @@ ); var pipingCalculation = new PipingCalculation(input); var pipingResult = pipingCalculation.Calculate(); - logger.Info(String.Format("Veiligheidsfactor heave: {0}",pipingResult.HeaveFactorOfSafety)); - logger.Info(String.Format("Z heave: {0}",pipingResult.HeaveZValue)); - logger.Info(String.Format("Veiligheidsfactor uplift: {0}",pipingResult.UpliftFactorOfSafety)); - logger.Info(String.Format("Z uplift: {0}", pipingResult.UpliftZValue)); - logger.Info(String.Format("Veiligheidsfactor sellmeijer: {0}",pipingResult.SellmeijerFactorOfSafety)); - logger.Info(String.Format("Z sellmeijer: {0}", pipingResult.SellmeijerZValue)); + + pipingData.Output = new PipingOuput( + pipingResult.HeaveFactorOfSafety, + pipingResult.HeaveZValue, + pipingResult.UpliftFactorOfSafety, + pipingResult.UpliftZValue, + pipingResult.SellmeijerFactorOfSafety, + pipingResult.SellmeijerZValue + ); } catch (PipingCalculationException e) { Index: src/Plugins/Wti/Wti.Data/PipingData.cs =================================================================== diff -u -re61dfe357a722430029affaa9a28e6bd2cbbc281 -r25ea8e7a3358ccf418ac651c2ac1dd7fc4ee8bed --- src/Plugins/Wti/Wti.Data/PipingData.cs (.../PipingData.cs) (revision e61dfe357a722430029affaa9a28e6bd2cbbc281) +++ src/Plugins/Wti/Wti.Data/PipingData.cs (.../PipingData.cs) (revision 25ea8e7a3358ccf418ac651c2ac1dd7fc4ee8bed) @@ -6,7 +6,21 @@ public class PipingData : IObservable { private IList observers = new List(); + private PipingOuput output; + public PipingOuput Output + { + get + { + return output; + } + set + { + output = value; + NotifyObservers(); + } + } + public void Attach(IObserver observer) { observers.Add(observer); Index: src/Plugins/Wti/Wti.Data/PipingOuput.cs =================================================================== diff -u --- src/Plugins/Wti/Wti.Data/PipingOuput.cs (revision 0) +++ src/Plugins/Wti/Wti.Data/PipingOuput.cs (revision 25ea8e7a3358ccf418ac651c2ac1dd7fc4ee8bed) @@ -0,0 +1,24 @@ +using System; + +namespace Wti.Data +{ + public class PipingOuput + { + public double HeaveFactorOfSafety { get; private set; } + public double HeaveZValue { get; private set; } + public double UpliftFactorOfSafety { get; private set; } + public double UpliftZValue { get; private set; } + public double SellmeijerFactorOfSafety { get; private set; } + public double SellmeijerZValue { get; private set; } + + public PipingOuput(double heaveFactorOfSafety, double heaveZValue, double upliftFactorOfSafety, double upliftZValue, double sellmeijerFactorOfSafety, double sellmeijerZValue) + { + HeaveFactorOfSafety = heaveFactorOfSafety; + HeaveZValue = heaveZValue; + UpliftFactorOfSafety = upliftFactorOfSafety; + UpliftZValue = upliftZValue; + SellmeijerFactorOfSafety = sellmeijerFactorOfSafety; + SellmeijerZValue = sellmeijerZValue; + } + } +} \ No newline at end of file Index: src/Plugins/Wti/Wti.Data/Wti.Data.csproj =================================================================== diff -u -r91692bb0416bdff85f51b10a3c151d67721d9319 -r25ea8e7a3358ccf418ac651c2ac1dd7fc4ee8bed --- src/Plugins/Wti/Wti.Data/Wti.Data.csproj (.../Wti.Data.csproj) (revision 91692bb0416bdff85f51b10a3c151d67721d9319) +++ src/Plugins/Wti/Wti.Data/Wti.Data.csproj (.../Wti.Data.csproj) (revision 25ea8e7a3358ccf418ac651c2ac1dd7fc4ee8bed) @@ -71,6 +71,7 @@ + Index: src/Plugins/Wti/Wti.Forms/NodePresenters/PipingDataNodePresenter.cs =================================================================== diff -u -r91692bb0416bdff85f51b10a3c151d67721d9319 -r25ea8e7a3358ccf418ac651c2ac1dd7fc4ee8bed --- src/Plugins/Wti/Wti.Forms/NodePresenters/PipingDataNodePresenter.cs (.../PipingDataNodePresenter.cs) (revision 91692bb0416bdff85f51b10a3c151d67721d9319) +++ src/Plugins/Wti/Wti.Forms/NodePresenters/PipingDataNodePresenter.cs (.../PipingDataNodePresenter.cs) (revision 25ea8e7a3358ccf418ac651c2ac1dd7fc4ee8bed) @@ -24,13 +24,13 @@ public void UpdateNode(ITreeNode parentNode, ITreeNode node, object nodeData) { - node.Text = "Piping"; + node.Text = Resources.PipingDataDisplayName; node.Image = Resources.PipingIcon; } public IEnumerable GetChildNodeObjects(object parentNodeData, ITreeNode node) { - yield break; + yield return ((PipingData)parentNodeData).Output; } public bool CanRenameNode(ITreeNode node) Index: src/Plugins/Wti/Wti.Forms/NodePresenters/PipingOutputNodePresenter.cs =================================================================== diff -u --- src/Plugins/Wti/Wti.Forms/NodePresenters/PipingOutputNodePresenter.cs (revision 0) +++ src/Plugins/Wti/Wti.Forms/NodePresenters/PipingOutputNodePresenter.cs (revision 25ea8e7a3358ccf418ac651c2ac1dd7fc4ee8bed) @@ -0,0 +1,98 @@ +using System; +using System.Collections; +using System.ComponentModel; +using DelftTools.Controls; +using DelftTools.Utils.Collections; +using Wti.Data; +using Wti.Forms.Properties; + +namespace Wti.Forms.NodePresenters +{ + public class PipingOutputNodePresenter : ITreeNodePresenter + { + public ITreeView TreeView { get; set; } + + public Type NodeTagType + { + get + { + return typeof(PipingOuput); + } + } + + public void UpdateNode(ITreeNode parentNode, ITreeNode node, object nodeData) + { + node.Text = Resources.PipingOutputDisplayName; + node.Image = Resources.PipingIcon; + } + + public IEnumerable GetChildNodeObjects(object parentNodeData, ITreeNode node) + { + yield break; + } + + public bool CanRenameNode(ITreeNode node) + { + return false; + } + + public bool CanRenameNodeTo(ITreeNode node, string newName) + { + return false; + } + + public void OnNodeRenamed(object nodeData, string newName) + { + } + + public void OnNodeChecked(ITreeNode node) + { + } + + public DragOperations CanDrag(object nodeData) + { + return DragOperations.None; + } + + public DragOperations CanDrop(object item, ITreeNode sourceNode, ITreeNode targetNode, DragOperations validOperations) + { + return DragOperations.None; + } + + public bool CanInsert(object item, ITreeNode sourceNode, ITreeNode targetNode) + { + return false; + } + + public void OnDragDrop(object item, object sourceParentNodeData, object targetParentNodeData, DragOperations operation, int position) + { + } + + public void OnNodeSelected(object nodeData) + { + } + + public IMenuItem GetContextMenu(ITreeNode sender, object nodeData) + { + return null; + } + + public void OnPropertyChanged(object sender, ITreeNode node, PropertyChangedEventArgs e) + { + } + + public void OnCollectionChanged(object sender, NotifyCollectionChangingEventArgs e) + { + } + + public bool CanRemove(object parentNodeData, object nodeData) + { + return true; + } + + public bool RemoveNodeData(object parentNodeData, object nodeData) + { + return false; + } + } +} \ No newline at end of file Index: src/Plugins/Wti/Wti.Forms/Properties/Resources.Designer.cs =================================================================== diff -u -re61dfe357a722430029affaa9a28e6bd2cbbc281 -r25ea8e7a3358ccf418ac651c2ac1dd7fc4ee8bed --- src/Plugins/Wti/Wti.Forms/Properties/Resources.Designer.cs (.../Resources.Designer.cs) (revision e61dfe357a722430029affaa9a28e6bd2cbbc281) +++ src/Plugins/Wti/Wti.Forms/Properties/Resources.Designer.cs (.../Resources.Designer.cs) (revision 25ea8e7a3358ccf418ac651c2ac1dd7fc4ee8bed) @@ -196,6 +196,15 @@ } /// + /// Looks up a localized string similar to Piping. + /// + public static string PipingDataDisplayName { + get { + return ResourceManager.GetString("PipingDataDisplayName", resourceCulture); + } + } + + /// /// Looks up a localized string similar to De x-coordinaat van het uittredepunt.. /// public static string PipingDataExitPointXCoordinateDescription { @@ -503,6 +512,15 @@ } /// + /// Looks up a localized string similar to Piping resultaat. + /// + public static string PipingOutputDisplayName { + get { + return ResourceManager.GetString("PipingOutputDisplayName", resourceCulture); + } + } + + /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// public static System.Drawing.Bitmap WtiProjectFolderIcon { Index: src/Plugins/Wti/Wti.Forms/Properties/Resources.resx =================================================================== diff -u -re61dfe357a722430029affaa9a28e6bd2cbbc281 -r25ea8e7a3358ccf418ac651c2ac1dd7fc4ee8bed --- src/Plugins/Wti/Wti.Forms/Properties/Resources.resx (.../Resources.resx) (revision e61dfe357a722430029affaa9a28e6bd2cbbc281) +++ src/Plugins/Wti/Wti.Forms/Properties/Resources.resx (.../Resources.resx) (revision 25ea8e7a3358ccf418ac651c2ac1dd7fc4ee8bed) @@ -162,6 +162,9 @@ 70%-fraktiel van de korreldiameter in de bovenste zandlaag + + Piping + De x-coordinaat van het uittredepunt. @@ -265,6 +268,9 @@ ..\Resources\control_equalizer_blue.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + Piping resultaat + ..\Resources\folder-stand.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a Index: src/Plugins/Wti/Wti.Forms/PropertyClasses/PipingOutputProperties.cs =================================================================== diff -u --- src/Plugins/Wti/Wti.Forms/PropertyClasses/PipingOutputProperties.cs (revision 0) +++ src/Plugins/Wti/Wti.Forms/PropertyClasses/PipingOutputProperties.cs (revision 25ea8e7a3358ccf418ac651c2ac1dd7fc4ee8bed) @@ -0,0 +1,77 @@ +using DelftTools.Shell.Gui; +using DelftTools.Utils; +using Wti.Data; +using Wti.Forms.Properties; + +namespace Wti.Forms.PropertyClasses +{ + [ResourcesDisplayName(typeof(Resources), "PipingOutputPropertiesDisplayName")] + public class PipingOutputProperties : ObjectProperties + { + [ResourcesCategory(typeof(Resources), "Categories_General")] + [ResourcesDisplayName(typeof(Resources), "PipingOutputHeaveFactorOfSafetyDisplayName")] + [ResourcesDescription(typeof(Resources), "PipingOutputHeaveFactorOfSafetyDescription")] + public double HeaveFactorOfSafety + { + get + { + return data.HeaveFactorOfSafety; + } + } + + [ResourcesCategory(typeof(Resources), "Categories_General")] + [ResourcesDisplayName(typeof(Resources), "PipingOutputHeaveZValueDisplayName")] + [ResourcesDescription(typeof(Resources), "PipingOutputHeaveZValueDescription")] + public double HeaveZValue + { + get + { + return data.HeaveZValue; + } + } + + [ResourcesCategory(typeof(Resources), "Categories_General")] + [ResourcesDisplayName(typeof(Resources), "PipingOutputUpliftFactorOfSafetyDisplayName")] + [ResourcesDescription(typeof(Resources), "PipingOutputUpliftFactorOfSafetyDescription")] + public double UpliftFactorOfSafety + { + get + { + return data.UpliftFactorOfSafety; + } + } + + [ResourcesCategory(typeof(Resources), "Categories_General")] + [ResourcesDisplayName(typeof(Resources), "PipingOutputUpliftZValueDisplayName")] + [ResourcesDescription(typeof(Resources), "PipingOutputUpliftZValueDescription")] + public double UpliftZValue + { + get + { + return data.UpliftZValue; + } + } + + [ResourcesCategory(typeof(Resources), "Categories_General")] + [ResourcesDisplayName(typeof(Resources), "PipingOutputSellmeijerFactorOfSafetyDisplayName")] + [ResourcesDescription(typeof(Resources), "PipingOutputSellmeijerFactorOfSafetyDescription")] + public double SellmeijerFactorOfSafety + { + get + { + return data.SellmeijerFactorOfSafety; + } + } + + [ResourcesCategory(typeof(Resources), "Categories_General")] + [ResourcesDisplayName(typeof(Resources), "PipingOutputSellmeijerZValueDisplayName")] + [ResourcesDescription(typeof(Resources), "PipingOutputSellmeijerZValueDescription")] + public double SellmeijerZValue + { + get + { + return data.SellmeijerZValue; + } + } + } +} \ No newline at end of file Index: src/Plugins/Wti/Wti.Forms/Wti.Forms.csproj =================================================================== diff -u -r4eeb65b4d7a03f5151011baaa5bf461ee08baf63 -r25ea8e7a3358ccf418ac651c2ac1dd7fc4ee8bed --- src/Plugins/Wti/Wti.Forms/Wti.Forms.csproj (.../Wti.Forms.csproj) (revision 4eeb65b4d7a03f5151011baaa5bf461ee08baf63) +++ src/Plugins/Wti/Wti.Forms/Wti.Forms.csproj (.../Wti.Forms.csproj) (revision 25ea8e7a3358ccf418ac651c2ac1dd7fc4ee8bed) @@ -72,6 +72,7 @@ + @@ -81,6 +82,7 @@ Resources.resx + Index: src/Plugins/Wti/Wti.Plugin/WtiGuiPlugin.cs =================================================================== diff -u -r91692bb0416bdff85f51b10a3c151d67721d9319 -r25ea8e7a3358ccf418ac651c2ac1dd7fc4ee8bed --- src/Plugins/Wti/Wti.Plugin/WtiGuiPlugin.cs (.../WtiGuiPlugin.cs) (revision 91692bb0416bdff85f51b10a3c151d67721d9319) +++ src/Plugins/Wti/Wti.Plugin/WtiGuiPlugin.cs (.../WtiGuiPlugin.cs) (revision 25ea8e7a3358ccf418ac651c2ac1dd7fc4ee8bed) @@ -52,12 +52,14 @@ { yield return new PropertyInfo{ ObjectType = typeof(WtiProject), PropertyType = typeof(WtiProjectProperties)}; yield return new PropertyInfo{ ObjectType = typeof(PipingData), PropertyType = typeof(PipingDataProperties)}; + yield return new PropertyInfo{ ObjectType = typeof(PipingOuput), PropertyType = typeof(PipingOutputProperties)}; } public override IEnumerable GetProjectTreeViewNodePresenters() { yield return new WtiProjectNodePresenter(); yield return new PipingDataNodeController().NodePresenter; + yield return new PipingOutputNodePresenter(); } public override IRibbonCommandHandler RibbonCommandHandler