使用方法:在Visual Studio的Tools菜单下选择导入导出设置即可。
使用效果如下:
C#:
code
public static string Undent(string s)
{
int num;
string[] strArray = s.Split(new char[] { '\n' });
int startIndex = 0x7fffffff;
foreach (string str in strArray)
{
num = 0;
while ((num < str.Length) && (num < startIndex))
{
if (!char.IsWhiteSpace(str[num]))
{
startIndex = num;
break;
}
num++;
}
}
new StringBuilder();
for (num = 0; num < strArray.Length; num++)
{
if (strArray[num].Length > startIndex)
{
strArray[num] = strArray[num].Substring(startIndex);
}
}
return string.Join("\n", strArray);
}
Html:
code
<div id="header">
<div id="blogTitle">
<a id="lnkBlogLogo" href="http://www.cnblogs.com/xushuo/">
<img id="blogLogo" src="/Skins/custom/images/logo.gif"
alt="返回主页" /></a>
<!--done-->
<h1>
<a id="Header1_HeaderTitle" class="headermaintitle"
href="http://www.cnblogs.com/xushuo/">
@Yes! Scott!#</a></h1>
<h2>
/*CodeMusic*/</h2>
</div>
<!--end: blogTitle 博客的标题和副标题 -->
<div id="navigator">
<!--done-->
<ul id="navList">
<li><a id="MyLinks1_HomeLink" class="menu"
href="http://www.cnblogs.com/">博客园</a></li>
<li><a id="MyLinks1_SpaceLink" class="menu"
href="http://space.cnblogs.com/">社区</a></li>
</ul>
<div class="blogStats">
<!--done-->
随笔- 14 文章- 0 评论- 1
</div>
<!--end: blogStats -->
</div>
<!--end: navigator 博客导航栏 -->
</div>
<!--end: header 头部 -->
XML:
code
<?xml version="1.0" encoding="utf-8"?>
<div id="navigator">
<!--done-->
<ul id="navList">
<li>
<a id="MyLinks1_HomeLink" class="menu"
href="http://www.cnblogs.com/">博客园</a>
</li>
<li>
<a id="MyLinks1_SpaceLink" class="menu"
href="http://space.cnblogs.com/">社区</a>
</li>
</ul>
<!--end: blogStats -->
</div>
JavaScript:
code
$(function () {
$(".catListComment").append($("<ul>"));
$(".divRecentCommentAticle").each(function () {
var tmp = $(this).next().html();
$(this).next().remove();
$(this).appendTo(".catListComment ul").replaceWith("<li>" + $(this).html() + "<br />" + tmp + "</li>");
});
$("#mainContent, #main,.forFlow").css("min-height", $("#sideBar").height() + 300);
$(".code div").click(function () {
$(this).next().slideToggle('normal');
});
$(".commentform").contents().not("[nodeType=1]").remove();
$("#comment_form>p:contains('Ctrl+Enter')").nextAll().not($(".relative_search")).remove();
$("#ctl05_divCommentPannel").siblings().not($(".relative_search")).remove();
$("#ctl05_divLoginPannel").nextAll().not($(".relative_search")).remove();
$("#navList li").hover(function () {
$(this).animate({ top: -20 }, 500);
}, function () {
$(this).animate({ top: 0 }, 500);
});
});
CSS:
感兴趣的的朋友可以从这里下载: