src/Misc/EFTools/EntityDesignEntityDesigner/CustomCode/Diagram/EntityDesignerDiagram.cs
/// <summary>
///     Event invoked when user clicks on a link in the diagram watermark
///     We show the appropriate tool window
/// </summary>
/// <param name="sender">LinkLabel</param>
/// <param name="e">LinkLabelLinkClickedEventArgs</param>
Event invoked when user clicks on a link in the diagram watermark
We show the appropriate tool window
Event invoked when user clicks on a link in the diagram watermark We show the appropriate tool window
private void diagramWatermark_OpenInXmlEditorLinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            var linkLabel = sender as LinkLabel;
            if (linkLabel != null)
            {
                var a = GetModel().EditingContext.GetEFArtifactService().Artifact;
                IServiceProvider sp = PackageManager.Package;
                if (sp != null)
                {
                    IVsWindowFrame frame;
                    IVsUIHierarchy hierarchy;
                    uint itemid;
                    VsShellUtilities.OpenDocumentWithSpecificEditor(
                        sp, a.Uri.LocalPath, CommonPackageConstants.xmlEditorGuid, VSConstants.LOGVIEWID_Primary, out hierarchy, out itemid,
                        out frame);
                    if (frame != null)
                    {
                        NativeMethods.ThrowOnFailure(frame.Show());
                    }
                }
            }
        }
private void diagramWatermark_OpenInXmlEditorLinkClicked ( object sender , LinkLabelLinkClickedEventArgs e ) { var linkLabel = sender as LinkLabel ; if ( linkLabel != null ) { var a = GetModel ( ) . EditingContext . GetEFArtifactService ( ) . Artifact ; IServiceProvider sp = PackageManager . Package ; if ( sp != null ) { IVsWindowFrame frame ; IVsUIHierarchy hierarchy ; uint itemid ; VsShellUtilities . OpenDocumentWithSpecificEditor ( sp , a . Uri . LocalPath , CommonPackageConstants . xmlEditorGuid , VSConstants . LOGVIEWID_Primary , out hierarchy , out itemid , out frame ) ; if ( frame != null ) { NativeMethods . ThrowOnFailure ( frame . Show ( ) ) ; } } } }
Event invoked when user clicks on a link in the diagram watermark
We show the appropriate tool window
Event invoked when user clicks on a link in the diagram watermark We show the appropriate tool window
// Open the referenced document using our editor.
sender
object
None
e
LinkLabelLinkClickedEventArgs
None