attach context menu event handlers in a per-Context manner to prevent collisions between two similar (type-identical) editors

This commit is contained in:
Michael Becker 2019-11-09 23:06:14 -05:00
parent 0563376da4
commit 180553165d
No known key found for this signature in database
GPG Key ID: 389DFF5D73781A12

View File

@ -43,12 +43,12 @@ namespace UniversalEditor.Editors.FileSystem
this.tv.SelectionMode = SelectionMode.Multiple;
this.tv.Model = this.tmTreeView;
Application.AttachCommandEventHandler("FileSystemContextMenu_Add_ExistingFolder", FileAddExistingFolder_Click);
Application.AttachCommandEventHandler("FileSystemContextMenu_Add_FilesFromFolder", FileAddItemsFromFolder_Click);
Application.AttachCommandEventHandler("FileSystemContextMenu_New_Folder", FileNewFolder_Click);
Context.AttachCommandEventHandler("FileSystemContextMenu_Add_ExistingFolder", FileAddExistingFolder_Click);
Context.AttachCommandEventHandler("FileSystemContextMenu_Add_FilesFromFolder", FileAddItemsFromFolder_Click);
Context.AttachCommandEventHandler("FileSystemContextMenu_New_Folder", FileNewFolder_Click);
// Application.AttachCommandEventHandler("EditDelete", ContextMenuDelete_Click);
Application.AttachCommandEventHandler("FileSystemContextMenu_Rename", ContextMenuRename_Click);
Application.AttachCommandEventHandler("FileSystemContextMenu_CopyTo", ContextMenuCopyTo_Click);
Context.AttachCommandEventHandler("FileSystemContextMenu_Rename", ContextMenuRename_Click);
Context.AttachCommandEventHandler("FileSystemContextMenu_CopyTo", ContextMenuCopyTo_Click);
// Application.AttachCommandEventHandler("FileProperties", ContextMenuProperties_Click);
this.tv.BeforeContextMenu += tv_BeforeContextMenu;