src/Misc/EFTools/EntityDesignPackage/CustomCode/MicrosoftDataEntityDesignPackage.cs
/// <summary>
///     Event handler to decide whether the ShowMappingDetailsWindow menu item is visible and enabled.
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
Event handler to decide whether the ShowMappingDetailsWindow menu item is visible and enabled.
Event handler to decide whether the ShowMappingDetailsWindow menu item is visible and enabled .
private void ShowMappingDetailsWindow_BeforeQueryStatus(object sender, EventArgs e)
        {
            var menuCommand = sender as OleMenuCommand;
            if (menuCommand != null)
            {
                if (PackageManager.Package.ModelManager.Artifacts != null
                    && PackageManager.Package.ModelManager.Artifacts.Count > 0)
                {
                    menuCommand.Enabled = true;
                    menuCommand.Visible = true;
                }
                else
                {
                    menuCommand.Enabled = false;
                    menuCommand.Visible = false;
                }
            }
        }
private void ShowMappingDetailsWindow_BeforeQueryStatus ( object sender , EventArgs e ) { var menuCommand = sender as OleMenuCommand ; if ( menuCommand != null ) { if ( PackageManager . Package . ModelManager . Artifacts != null && PackageManager . Package . ModelManager . Artifacts . Count > 0 ) { menuCommand . Enabled = true ; menuCommand . Visible = true ; } else { menuCommand . Enabled = false ; menuCommand . Visible = false ; } } }
Event handler to decide whether the ShowMappingDetailsWindow menu item is visible and enabled.
Event handler to decide whether the ShowMappingDetailsWindow menu item is visible and enabled .
// if an EDMX file is currently open then this menu item should be visible and enabled
sender
object
None
e
EventArgs
None