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

@@ -468,7 +468,9 @@ namespace Volian.Controls.Library
lastLastFormatID = fv.FormatID;
}
}
cbxTranVersion.SelectedIndexChanged -= new EventHandler(cbxTranVersion_SelectedIndexChanged);
cbxTranVersion.SelectedIndexChanged += new EventHandler(cbxTranVersion_SelectedIndexChanged);
cbxTranFormat.SelectedIndexChanged -= new EventHandler(cbxTranFormat_SelectedIndexChanged);
cbxTranFormat.SelectedIndexChanged += new EventHandler(cbxTranFormat_SelectedIndexChanged);
}
this.Cursor = Cursors.Default;
@@ -892,6 +894,7 @@ namespace Volian.Controls.Library
topnode.DataKey = fi.FolderID;
}
advTreeProcSets.BeforeExpand -= new DevComponents.AdvTree.AdvTreeNodeCancelEventHandler(advTreeProcSets_BeforeExpand);
advTreeProcSets.BeforeExpand += new DevComponents.AdvTree.AdvTreeNodeCancelEventHandler(advTreeProcSets_BeforeExpand);
// position to the procedure set in the tree if we have a procedure open
@@ -986,6 +989,7 @@ namespace Volian.Controls.Library
annoTypes.Add(new AnnotationTypeSearch(ati.Name, ati.TypeID.ToString()));
cbxAnnoTypes.DisplayMember = "Name";
cbxAnnoTypes.DataSource = annoTypes;
lbSrchResults.MouseMove -= new MouseEventHandler(lbSrchResults_MouseMove);
lbSrchResults.MouseMove += new MouseEventHandler(lbSrchResults_MouseMove);
_TabControl = tc;
}