Index: src/Common/DelftTools.Shell.Gui.Swf/NodePresenterHelper.cs =================================================================== diff -u -r8f6ae890fed8e8eae3a32f9c0498a10f82e0ddf9 -r5fc71a385897af92ccb092f2f969b5709afab85a --- src/Common/DelftTools.Shell.Gui.Swf/NodePresenterHelper.cs (.../NodePresenterHelper.cs) (revision 8f6ae890fed8e8eae3a32f9c0498a10f82e0ddf9) +++ src/Common/DelftTools.Shell.Gui.Swf/NodePresenterHelper.cs (.../NodePresenterHelper.cs) (revision 5fc71a385897af92ccb092f2f969b5709afab85a) @@ -34,37 +34,35 @@ return menuItem; } - - public static void TrimSeparatorsGetContextMenu(IMenuItem menuItem) { - if(menuItem is MenuItemContextMenuStripAdapter) + if (menuItem is MenuItemContextMenuStripAdapter) { TrimSeparatorsGetContextMenu( ((MenuItemContextMenuStripAdapter) menuItem).ContextMenuStrip - ); + ); } } public static void TrimSeparatorsGetContextMenu(ContextMenuStrip contextMenu) { //top - for(int i = 0; i < contextMenu.Items.Count; i++) + for (int i = 0; i < contextMenu.Items.Count; i++) { - if(contextMenu.Items[i] is ToolStripSeparator) + if (contextMenu.Items[i] is ToolStripSeparator) { contextMenu.Items[i].Available = false; } else { - if(contextMenu.Items[i].Available) + if (contextMenu.Items[i].Available) { break; } } } //bottom - for (int i = contextMenu.Items.Count - 1 ; i >= 0 ; i--) + for (int i = contextMenu.Items.Count - 1; i >= 0; i--) { if (contextMenu.Items[i] is ToolStripSeparator) { @@ -80,14 +78,13 @@ } } - public static void RemoveDoubleSeparatorsGetContextMenu(IMenuItem menuItem) { if (menuItem is MenuItemContextMenuStripAdapter) { RemoveDoubleSeparatorsGetContextMenu( - ((MenuItemContextMenuStripAdapter)menuItem).ContextMenuStrip - ); + ((MenuItemContextMenuStripAdapter) menuItem).ContextMenuStrip + ); } } @@ -97,16 +94,15 @@ { if (contextMenu.Items[i] is ToolStripSeparator) { - for (int j = i-1; j >= 0; j--) + for (int j = i - 1; j >= 0; j--) { - if (contextMenu.Items[j] is ToolStripSeparator) { contextMenu.Items[j].Available = false; break; } - if(contextMenu.Items[j].Available) + if (contextMenu.Items[j].Available) { break; }