一直都是直接在博客园提供的在线编辑器中发布自己的Blog,养成习惯啦。突然发现有Windows Live Writer一个这么好的桌面写博客的工具,很是兴奋。兴奋之余,想测试一下这个工具。于是写了这篇Blog。

    写点什么好呢?得,不费那个脑子了,就写写Windows Live Writer的配置吧,费了半天劲才配置成功,总的写出来吧,不然太对不起自己了。用Windows Live Writer 首发Blog

    配置步骤如下

  1. 在菜单中选择“Weblog”,然后选择“Another Weblog Service”。
  2. 在Weblog Homepage URL中输入你的Blog主页地址。
  3. 输入用户名与密码。
  4. 在“Type of  weblog that you are using”中选择“Custom(Metaweblog API)”。
  5. “Remote posting URL for your weblog”中输入“http://www.cnblogs.com/用户名/services/metaweblog.aspx”。

    经过这样的配置后,就可以使用了,当然还可以安装插件,比如:插入代码,插入酷表情。用Windows Live Writer 首发Blog 这个表情是不是相当酷啊。哈哈,不过插件反应有点慢是真的。

 

   好,其实这些插件我最关心的还是插入代码,测试下,插入段代码,

   1:            /// <summary>
   2:           /// 连接数组各个元素构成字符串
   3:           /// </summary>
   4:          /// <param name="array">要连接的数组</param>
   5:          /// <param name="separater">分隔符</param>
   6:          /// <returns>连接后组成的字符串</returns>
   7:          public static string ToString(this Array array, string separater)
   8:          {
   9:              if (array == null)
  10:                  return null;
  11:   
  12:              StringBuilder builder = new StringBuilder();
  13:              for (int i = 0; i < array.Length; i++)
  14:              {
  15:                  builder.Append(array.GetValue(i).ToString());
  16:                  builder.Append(separater);
  17:              }
  18:   
  19:              if (builder.Length > 0 || !String.IsNullOrEmpty(separater))
  20:                  builder.Remove(builder.Length - 1, 1);
  21:   
  22:              return builder.ToString();
  23:          } 
   这段代码实现的功能就是连接数组的各个字符构成字符串,呵呵,效果不错。

      以后写blog,就是它了。

     你还等什么呢?

相关文章: