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

@@ -378,7 +378,10 @@ namespace Volian.Controls.Library
{
_MyStepRTB = _MyEditItem.MyStepRTB;
if (_MyStepRTB != null)
{
_MyStepRTB.Disposed -= new EventHandler(_MyStepRTB_Disposed);
_MyStepRTB.Disposed += new EventHandler(_MyStepRTB_Disposed);
}
}
else
_MyStepRTB = null;
@@ -469,6 +472,7 @@ namespace Volian.Controls.Library
myBar.DockTabControl.CloseButtonPosition = DevComponents.DotNetBar.eTabCloseButtonPosition.Right;
myBar.DockTabControl.Width = ClientRectangle.Width;
}
myBar.DockTabClosing -= new DockTabClosingEventHandler(myBar_DockTabClosing);
myBar.DockTabClosing += new DockTabClosingEventHandler(myBar_DockTabClosing);
if (!myBar.Visible)
myBar.Visible = true;