src/Misc/EFTools/EntityDesignPackage/CustomCode/MicrosoftDataEntityDesignCommandSet.cs
/// <summary>
///     Status handler for: "Add Association"
///     Visible only when user right-clicks on empty area of designer or EntityTypeShape
///     Enabled when there is at least one EntityTypeShape on a diagram
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
Status handler for: "Add Association"
Visible only when user right-clicks on empty area of designer or EntityTypeShape
Enabled when there is at least one EntityTypeShape on a diagram
Status handler for : " Add Association " Visible only when user right - clicks on empty area of designer or EntityTypeShape Enabled when there is at least one EntityTypeShape on a diagram
internal void OnStatusAddAssociation(object sender, EventArgs e)
        {
            var cmd = sender as MenuCommand;
            if (cmd != null)
            {
                cmd.Visible = IsSingleSelection() && (IsOurDiagramSelected() || SelectedEntityTypeShape != null);
                cmd.Enabled = !EntityDesignerDiagram.IsEmptyDiagram(GetDiagram());
            }
        }
internal void OnStatusAddAssociation ( object sender , EventArgs e ) { var cmd = sender as MenuCommand ; if ( cmd != null ) { cmd . Visible = IsSingleSelection ( ) && ( IsOurDiagramSelected ( ) || SelectedEntityTypeShape != null ) ; cmd . Enabled = ! EntityDesignerDiagram . IsEmptyDiagram ( GetDiagram ( ) ) ; } }
Status handler for: "Add Association"
Visible only when user right-clicks on empty area of designer or EntityTypeShape
Enabled when there is at least one EntityTypeShape on a diagram
Status handler for : " Add Association " Visible only when user right - clicks on empty area of designer or EntityTypeShape Enabled when there is at least one EntityTypeShape on a diagram
sender
object
None
e
EventArgs
None