Usage: Select Import and Export settings under the Tools menu of Visual Studio. The effect is as follows:
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 = "Back to homepage" /> </ A > <! -- Done --> < H1 > < A ID = "Header1_headertitle" Class = "Headermaintitle" Href = Http://www.cnblogs.com/xushuo" > @ Yes! Scott! # </ A > </ H1 > < H2 > /* Codemusic */ </ H2 > </ Div > <! -- End: the title and subtitle of the blogtitle blog --> < Div ID = "Navigator" > <! -- Done --> < Ul ID = "Navlist" > < Li > < A ID = "Mylinks1_homelink" Class = "Menu" Href = "Http://www.cnblogs.com /" > Blog </ A > </ Li > < Li > < A ID = "Mylinks1_spacelink" Class = "Menu" Href = "Http://space.cnblogs.com /" > Community </ A > </ Li > </ Ul > < Div Class = "Blogstats" > <! -- Done --> Essay-14 & Nbsp; Article-0 & Nbsp; Comment-1 & Nbsp; </ Div > <! -- End: blogstats --> </ Div > <! -- End: navigator blog navigation bar --> </ 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 /" > Blog </ A > </ Li > < Li > < A ID = "Mylinks1_spacelink" Class = "Menu" Href = "Http://space.cnblogs.com /" > Community </ A > </ Li > </ Ul > <! -- End: blogstats --> </ Div >
Javascript:
Code
$ ( Function () {$ ( ". Catlistcomment" ). Append ($ ( "<Ul>" ); $ ( ". Divrecentcommentaticle" ). Each ( Function (){ VaR TMP = $ ( This Pai.next().html (); $ ( This ). Next (). Remove (); $ ( This ). Appendto ( ". Catlistcomment ul" ). Replacewith ( "<Li>" + $ ( This Pai.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:
If you are interested, you can download: