C2025-038 Code cleanup to prevent multiple events from being assigned to the same method.

This commit is contained in:
2025-07-10 10:47:06 -04:00
parent 9ef9dcd7b9
commit 2953e977ef
18 changed files with 71 additions and 1 deletions

View File

@@ -3601,9 +3601,13 @@ namespace VEPROMS
if (tn == null)
return;
_ExpandingTree = true;
tn.LoadingChildrenDone -= new VETreeNodeEvent(tn_LoadingChildrenDone);
tn.LoadingChildrenDone += new VETreeNodeEvent(tn_LoadingChildrenDone);
tn.LoadingChildrenMax -= new VETreeNodeEvent(tn_LoadingChildrenMax);
tn.LoadingChildrenMax += new VETreeNodeEvent(tn_LoadingChildrenMax);
tn.LoadingChildrenValue -= new VETreeNodeEvent(tn_LoadingChildrenValue);
tn.LoadingChildrenValue += new VETreeNodeEvent(tn_LoadingChildrenValue);
tn.LoadingChildrenSQL -= new VETreeNodeEvent(tn_LoadingChildrenSQL);
tn.LoadingChildrenSQL += new VETreeNodeEvent(tn_LoadingChildrenSQL);
tn.LoadChildren(true);
}
@@ -4324,7 +4328,11 @@ namespace VEPROMS
_LastStepRTB.EditModeChanged -= new StepRTBEvent(_LastStepRTB_EditModeChanged);
_LastStepRTB = args != null && args.MyEditItem != null ? args.MyEditItem.MyStepRTB : null;
if (_LastStepRTB != null) _LastStepRTB.EditModeChanged += new StepRTBEvent(_LastStepRTB_EditModeChanged);
if (_LastStepRTB != null)
{
_LastStepRTB.EditModeChanged -= new StepRTBEvent(_LastStepRTB_EditModeChanged);
_LastStepRTB.EditModeChanged += new StepRTBEvent(_LastStepRTB_EditModeChanged);
}
lblEditView.Text = " ";
if (args == null)
@@ -4459,6 +4467,7 @@ namespace VEPROMS
displayHistory.MyEditItem = args.MyEditItem;
lblEditView.Text = args.MyEditItem.MyStepPanel.VwMode == E_ViewMode.Edit ? "Edit" : "View";
_CurrentItem.Deleted -= new ItemInfoEvent(_CurrentItem_Deleted);
_CurrentItem.Deleted += new ItemInfoEvent(_CurrentItem_Deleted);
dlgFindReplace.MyEditItem = args.MyEditItem;
SpellChecker.MyEditItem = args.MyEditItem;