Index: Ringtoets/Integration/src/Ringtoets.Integration.Plugin/RingtoetsPlugin.cs =================================================================== diff -u -r6b6f344a9cf3e6c44b63320dfa3f5c828c4221d8 -r1a49563c568eaef8b84743fec1f04ee119bf5c9c --- Ringtoets/Integration/src/Ringtoets.Integration.Plugin/RingtoetsPlugin.cs (.../RingtoetsPlugin.cs) (revision 6b6f344a9cf3e6c44b63320dfa3f5c828c4221d8) +++ Ringtoets/Integration/src/Ringtoets.Integration.Plugin/RingtoetsPlugin.cs (.../RingtoetsPlugin.cs) (revision 1a49563c568eaef8b84743fec1f04ee119bf5c9c) @@ -700,15 +700,15 @@ }; } - private void RemoveOnOpenProjectListener(IProjectOwner projectOwner) + private static void RemoveOnOpenProjectListener(IProjectOwner projectOwner) { if (projectOwner != null) { projectOwner.ProjectOpened -= VerifyHydraulicBoundaryDatabasePath; } } - private void AddOnOpenProjectListener(IProjectOwner projectOwner) + private static void AddOnOpenProjectListener(IProjectOwner projectOwner) { if (projectOwner != null) { @@ -779,7 +779,7 @@ #region DesignWaterLevelLocationsView ViewInfo - private bool CloseDesignWaterLevelLocationsViewForData(DesignWaterLevelLocationsView view, object dataToCloseFor) + private static bool CloseDesignWaterLevelLocationsViewForData(DesignWaterLevelLocationsView view, object dataToCloseFor) { var viewData = view.AssessmentSection; var assessmentSection = dataToCloseFor as IAssessmentSection; @@ -791,7 +791,7 @@ #region WaveHeightLocationsView ViewInfo - private bool CloseWaveHeightLocationsViewForData(WaveHeightLocationsView view, object dataToCloseFor) + private static bool CloseWaveHeightLocationsViewForData(WaveHeightLocationsView view, object dataToCloseFor) { var viewData = view.AssessmentSection; var assessmentSection = dataToCloseFor as IAssessmentSection; @@ -801,6 +801,39 @@ #endregion + #region FailureMechanismSectionsContext TreeNodeInfo + + private ContextMenuStrip FailureMechanismSectionsContextMenuStrip(FailureMechanismSectionsContext nodeData, object parentData, TreeViewControl treeViewControl) + { + return Gui.Get(nodeData, treeViewControl) + .AddImportItem() + .Build(); + } + + #endregion + + private class FailureMechanismContextAssociation + { + private readonly Func createFailureMechanismContext; + private readonly Type failureMechanismType; + + public FailureMechanismContextAssociation(Type failureMechanismType, Func createFailureMechanismContext) + { + this.createFailureMechanismContext = createFailureMechanismContext; + this.failureMechanismType = failureMechanismType; + } + + public bool Match(IFailureMechanism failureMechanism) + { + return failureMechanism.GetType() == failureMechanismType; + } + + public object Create(IFailureMechanism failureMechanism, IAssessmentSection assessmentSection) + { + return createFailureMechanismContext(failureMechanism, assessmentSection); + } + } + #region Comment ViewInfo private static bool CloseCommentViewForData(CommentView commentView, object o) @@ -867,31 +900,9 @@ #endregion - private class FailureMechanismContextAssociation - { - private readonly Func createFailureMechanismContext; - private readonly Type failureMechanismType; - - public FailureMechanismContextAssociation(Type failureMechanismType, Func createFailureMechanismContext) - { - this.createFailureMechanismContext = createFailureMechanismContext; - this.failureMechanismType = failureMechanismType; - } - - public bool Match(IFailureMechanism failureMechanism) - { - return failureMechanism.GetType() == failureMechanismType; - } - - public object Create(IFailureMechanism failureMechanism, IAssessmentSection assessmentSection) - { - return createFailureMechanismContext(failureMechanism, assessmentSection); - } - } - #region AssessmentSection TreeNodeInfo - private object[] AssessmentSectionChildNodeObjects(AssessmentSection nodeData) + private static object[] AssessmentSectionChildNodeObjects(AssessmentSection nodeData) { var childNodes = new List { @@ -917,13 +928,13 @@ ); } - private void AssessmentSectionOnNodeRenamed(IAssessmentSection nodeData, string newName) + private static void AssessmentSectionOnNodeRenamed(IAssessmentSection nodeData, string newName) { nodeData.Name = newName; nodeData.NotifyObservers(); } - private void AssessmentSectionOnNodeRemoved(IAssessmentSection nodeData, object parentNodeData) + private static void AssessmentSectionOnNodeRemoved(IAssessmentSection nodeData, object parentNodeData) { var parentProject = (RingtoetsProject) parentNodeData; var assessmentSection = (AssessmentSection) nodeData; @@ -948,20 +959,9 @@ #endregion - #region FailureMechanismSectionsContext TreeNodeInfo - - private ContextMenuStrip FailureMechanismSectionsContextMenuStrip(FailureMechanismSectionsContext nodeData, object parentData, TreeViewControl treeViewControl) - { - return Gui.Get(nodeData, treeViewControl) - .AddImportItem() - .Build(); - } - - #endregion - #region StandAloneFailureMechanismContext TreeNodeInfo - private object[] StandAloneFailureMechanismEnabledChildNodeObjects(FailureMechanismContext nodeData) + private static object[] StandAloneFailureMechanismEnabledChildNodeObjects(FailureMechanismContext nodeData) { return new object[] { @@ -974,15 +974,15 @@ }; } - private object[] StandAloneFailureMechanismDisabledChildNodeObjects(FailureMechanismContext nodeData) + private static object[] StandAloneFailureMechanismDisabledChildNodeObjects(FailureMechanismContext nodeData) { return new object[] { new CommentContext(nodeData.WrappedData) }; } - private IList GetInputs(IFailureMechanism nodeData, IAssessmentSection assessmentSection) + private static IList GetInputs(IFailureMechanism nodeData, IAssessmentSection assessmentSection) { return new ArrayList { @@ -991,7 +991,7 @@ }; } - private IList GetOutputs(IFailureMechanism nodeData) + private static IList GetOutputs(IFailureMechanism nodeData) { var duneErosion = nodeData as IHasSectionResults; var grassCoverSlipOffInwards = nodeData as IHasSectionResults; @@ -1115,7 +1115,7 @@ #region CategoryTreeFolder TreeNodeInfo - private Image GetFolderIcon(TreeFolderCategory category) + private static Image GetFolderIcon(TreeFolderCategory category) { switch (category) {