src/Misc/EFTools/EntityDesignPackage/CustomCode/MicrosoftDataEntityDesignCommandSet.cs
/// <summary>
///     The menu item to delete shapes (diagram items) and corresponding model items.
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
The menu item to delete shapes (diagram items) and corresponding model items.
The menu item to delete shapes ( diagram items ) and corresponding model items .
internal void OnStatusRemoveFromDiagram(object sender, EventArgs e)
        {
            var cmd = sender as MenuCommand;
            if (null != cmd)
            {
                cmd.Enabled = cmd.Visible = false;
                var diagram = GetDiagram();
                if (diagram != null
                    && OnlyDeletableObjectsSelected())
                {
                    if (AreAllSelectedItemsTypeof<EntityTypeShape>())
                    {
                        cmd.Enabled = cmd.Visible = true;
                        ProcessOnStatusDeleteCommand(cmd);
                    }
                }
            }
        }
internal void OnStatusRemoveFromDiagram ( object sender , EventArgs e ) { var cmd = sender as MenuCommand ; if ( null != cmd ) { cmd . Enabled = cmd . Visible = false ; var diagram = GetDiagram ( ) ; if ( diagram != null && OnlyDeletableObjectsSelected ( ) ) { if ( AreAllSelectedItemsTypeof < EntityTypeShape > ( ) ) { cmd . Enabled = cmd . Visible = true ; ProcessOnStatusDeleteCommand ( cmd ) ; } } } }
The menu item to delete shapes (diagram items) and corresponding model items.
The menu item to delete shapes ( diagram items ) and corresponding model items .
// We only show the menu item if entity diagram is active. (GetDiagram() will return non null value).
sender
object
None
e
EventArgs
None