A() public static method

public static A ( string url, string displayText, string target = "" ) : string
url string
displayText string
target string
return string
Ejemplo n.º 1
0
        private string GenerateHeader(Action <string> writeLine)
        {
            string documentDisplayName = documentRelativeFilePathWithoutHtmlExtension;
            string documentUrl         = "/#" + Document.Project.AssemblyName + "/" + documentRelativeFilePathWithoutHtmlExtension.Replace('\\', '/');
            string projectDisplayName  = projectGenerator.ProjectSourcePath;
            string projectUrl          = "/#" + Document.Project.AssemblyName;

            string documentLink = string.Format("File: <a id=\"filePath\" class=\"blueLink\" href=\"{0}\" target=\"_top\">{1}</a><br/>", documentUrl, documentDisplayName);
            string projectLink  = string.Format("Project: <a id=\"projectPath\" class=\"blueLink\" href=\"{0}\" target=\"_top\">{1}</a> ({2})", projectUrl, projectDisplayName, projectGenerator.AssemblyName);

            string fileShareLink = GetFileShareLink();

            if (fileShareLink != null)
            {
                fileShareLink = Markup.A(fileShareLink, "File", "_blank");
            }
            else
            {
                fileShareLink = "";
            }

            string webLink = GetWebLink();

            if (webLink != null)
            {
                webLink = Markup.A(webLink, "Web&nbsp;Access", "_blank");
            }
            else
            {
                webLink = "";
            }

            string firstRow  = string.Format("<tr><td>{0}</td><td>{1}</td></tr>", documentLink, webLink);
            string secondRow = string.Format("<tr><td>{0}</td><td>{1}</td></tr>", projectLink, fileShareLink);

            Markup.WriteLinkPanel(writeLine, firstRow, secondRow);

            return(documentUrl);
        }