﻿<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>博客园-蓝精灵的大草原</title><link>http://www.cnblogs.com/lersh/</link><description /><language>zh-cn</language><lastBuildDate>Thu, 24 Jul 2008 08:51:48 GMT</lastBuildDate><pubDate>Thu, 24 Jul 2008 08:51:48 GMT</pubDate><ttl>60</ttl><item><title>再次尝试WLW</title><link>http://www.cnblogs.com/lersh/archive/2008/07/22/1248798.html</link><dc:creator>蓝色的风之精灵</dc:creator><author>蓝色的风之精灵</author><pubDate>Tue, 22 Jul 2008 08:10:00 GMT</pubDate><guid>http://www.cnblogs.com/lersh/archive/2008/07/22/1248798.html</guid><wfw:comment>http://www.cnblogs.com/lersh/comments/1248798.html</wfw:comment><comments>http://www.cnblogs.com/lersh/archive/2008/07/22/1248798.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cnblogs.com/lersh/comments/commentRss/1248798.html</wfw:commentRss><trackback:ping>http://www.cnblogs.com/lersh/services/trackbacks/1248798.html</trackback:ping><description><![CDATA[<p>试试看Windows Live Writer的图片上传 <a href="http://www.cnblogs.com/images/cnblogs_com/lersh/WindowsLiveWriter/WLW_E358/A7036D821107A7D61708B91EC4C3EBD2_4.gif"><img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="120" alt="Miao" src="http://www.cnblogs.com/images/cnblogs_com/lersh/WindowsLiveWriter/WLW_E358/A7036D821107A7D61708B91EC4C3EBD2_thumb_1.gif" width="118" border="0" /></a> <a href="http://www.cnblogs.com/images/cnblogs_com/lersh/WindowsLiveWriter/WLW_E358/5_2.gif"><img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="100" alt="5" src="http://www.cnblogs.com/images/cnblogs_com/lersh/WindowsLiveWriter/WLW_E358/5_thumb.gif" width="100" border="0" /></a> </p>  <div class="wlWriterSmartContent" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:a508aa67-4ff7-4ce0-92d3-9a61040f73d1" style="padding-right: 0px; display: inline; padding-left: 0px; padding-bottom: 0px; margin: 0px; padding-top: 0px">Technorati 标签: <a href="http://technorati.com/tags/Windows%20Live%20Writer" rel="tag">Windows Live Writer</a>,<a href="http://technorati.com/tags/WLW" rel="tag">WLW</a></div><img src ="http://www.cnblogs.com/lersh/aggbug/1248798.html?type=1" width = "1" height = "1" /><br><br><a href="http://news.cnblogs.com/n/41276/" target="_blank">[新闻]浅析facebook的信息架构</a>]]></description></item><item><title>什么是ColorMatrix</title><link>http://www.cnblogs.com/lersh/archive/2008/07/22/1248713.html</link><dc:creator>蓝色的风之精灵</dc:creator><author>蓝色的风之精灵</author><pubDate>Tue, 22 Jul 2008 06:50:00 GMT</pubDate><guid>http://www.cnblogs.com/lersh/archive/2008/07/22/1248713.html</guid><wfw:comment>http://www.cnblogs.com/lersh/comments/1248713.html</wfw:comment><comments>http://www.cnblogs.com/lersh/archive/2008/07/22/1248713.html#Feedback</comments><slash:comments>1</slash:comments><wfw:commentRss>http://www.cnblogs.com/lersh/comments/commentRss/1248713.html</wfw:commentRss><trackback:ping>http://www.cnblogs.com/lersh/services/trackbacks/1248713.html</trackback:ping><description><![CDATA[<p><span style="font-size: 14px; color: #000080; font-family: 宋体"><font size="2">ColorMatrix（色彩矩阵），是GDI+里用来调整图片色彩的矩阵。        <br />什么是矩阵，说白了就是C#里的二维数组。         <br />那么这个矩阵调整色彩的原理是什么，他是怎么来调整色彩的呢？这个要从线性代数里的矩阵相乘说起。         <br />以下段落学过线性代数的读者可以跳过，这里我用自己的理解来描述下矩阵相乘的算法和结果。</font></span></p>  <p>   <br /><font face="宋体" color="#000080" size="2">在线性代数里，两个矩阵相乘，是这样计算的：      <br />A矩阵乘以B矩阵，那么新生成一个矩阵C，C的第N行M列的元素等于A的N行和B的M列逐个元素相乘的和。新生成的矩阵行数等于A的行数，列数等于B的列数。       <br />另外A和B需要满足，A的列数等于B的行数。这就是为了保证，A的每一行上每个元素都能B的每一列上每个元素都能相乘。       <br />即A[m,n] X B[n,p] = C[m,p]       <br />直观的描述下，有矩阵A[2,3]       <br />{       <br />1,2,3       <br />4,5,6       <br />}       <br />和矩阵B[3,2]       <br />{       <br />7 , 8       <br />9 , 10       <br />11, 12 </font></p>  <p>   <br /><font face="宋体" color="#000080" size="2">}      <br />那么相乘后生成新矩阵C[2,2]       <br />{       <br />1*7+2*9+3*11,1*8+2*10+3*12       <br />4*7+5*9+6*11,4*8+5*10+6*12       <br />}       <br />好了，矩阵的概念描述到此。以下就说说GDI+里的色彩矩阵。</font></p>  <p>   <br /><font face="宋体" color="#000080" size="2">在计算机里，一副图片可以看成是点的集合。虽然图片有宽和高的概念，看起来是二维的，其实在处理时我们完全可以把宽、高看成是图片的属性，和点无关，把图片的所有点看成是一维数组。      <br />而点本身是红绿蓝的集合，现在计算图形中再加入一个Alpha值（表示透明度），那么就是4个属性的集合，这样一副图片就成了二维的数组了，也就是标准的矩阵了。       <br />那么一副4个点的图片描述成矩阵就是P[4,4]       <br />{       <br />R1,G1,B1,A1       <br />R2,G2,B2,A2       <br />R3,G3,B3,A3       <br />R4,G4,B4,A4       <br />}       <br />当我们把这个矩阵和另一个4X4的矩阵M       <br />{       <br />rr,gr,br,ar       <br />rg,gg,bg,ag       <br />rb,gb,bb,ab       <br />ra,ga,ba,aa       <br />}       <br />相乘时，就会生成一个新的矩阵，新矩阵和原矩阵元素数量相同（不信可以用[5,4]、[6,4]矩阵和它相乘看看），并且新矩阵的每个元素，都发生了有趣的变化。我们来看看结果，新矩阵NP：       <br />{       <br />R1*rr+G1*rg+B1*rb+A1*ra,R1*gr+G1*gg+B1*gb+A1*ga,R1*br+G1*rg+B1*bb+A1*ba,R1*ar+G1*ag+B1*ab+A1*aa       <br />......       <br />......       <br />......       <br />}       <br />可以看到，新矩阵第一行（也就是新的图片的第一个点）的R,G,B,A都等于原图片的第一个点的所有RGBA新的混合值了。也就说，通过矩阵相乘，可以在图片原来的基础上改变新图片RGBA各个分量的值。       <br />同时也能看出来我为什么把M矩阵的各个元素这么命名：rr表示新生成的R分量中原R分量的比例，gr表示新生成G分量中原R分量的比例，br表示新生成的B分量中原R分量的比例。依此类推。</font></p>  <p>   <br /><font face="宋体" color="#000080" size="2">另外再说一点，那就是GDI+中ColorMatrix是个5X5的矩阵，而不是4X4的矩阵，为什么会多出1行和1列呢。      <br />我们来看NP，他的第一个元素是R1*rr+G1*rg+B1*rb+A1*ra，看出什么了吗？那就是只能做3个元素的加法，而不能做负值运算，即如果我想做R1的反色运算（用255减去原来的值）就做不到了，所以GDI+在原来的基础上扩展了一维，虚拟的一维W，这样一个点就变成了R,G,B,A,W。这个多出来的W在平时是不存在的，只有在色彩矩阵运算时才起辅助作用，默认就是255。       <br />我们看加了一维W后NP第一个元素的结果       <br />R1*rr+G1*rg+B1*rb+A1*ra+W1*rw       <br />这样，将rw设为1，rr设为-1，其他为0，那么结果就是255-R1，怎么样，反色运算能完成了。</font></p>  <div class="wlWriterSmartContent" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:98ecc04c-8a96-4d0e-bb33-c9cd274513c1" style="padding-right: 0px; display: inline; padding-left: 0px; float: none; padding-bottom: 0px; margin: 0px; padding-top: 0px">Technorati 标签: <a href="http://technorati.com/tags/ColorMatrix" rel="tag">ColorMatrix</a>,<a href="http://technorati.com/tags/GDI+" rel="tag">GDI+</a>,<a href="http://technorati.com/tags/%e7%9f%a9%e9%98%b5" rel="tag">矩阵</a>,<a href="http://technorati.com/tags/%e4%b9%98%e6%b3%95" rel="tag">乘法</a></div><img src ="http://www.cnblogs.com/lersh/aggbug/1248713.html?type=1" width = "1" height = "1" /><br><br><a href="http://news.cnblogs.com/n/41276/" target="_blank">[新闻]浅析facebook的信息架构</a>]]></description></item><item><title>比IE准确率更高的自动字符集检测类 UniversalCharDet</title><link>http://www.cnblogs.com/lersh/archive/2008/07/09/1238799.html</link><dc:creator>蓝色的风之精灵</dc:creator><author>蓝色的风之精灵</author><pubDate>Wed, 09 Jul 2008 04:25:00 GMT</pubDate><guid>http://www.cnblogs.com/lersh/archive/2008/07/09/1238799.html</guid><wfw:comment>http://www.cnblogs.com/lersh/comments/1238799.html</wfw:comment><comments>http://www.cnblogs.com/lersh/archive/2008/07/09/1238799.html#Feedback</comments><slash:comments>13</slash:comments><wfw:commentRss>http://www.cnblogs.com/lersh/comments/commentRss/1238799.html</wfw:commentRss><trackback:ping>http://www.cnblogs.com/lersh/services/trackbacks/1238799.html</trackback:ping><description><![CDATA[<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;这个世界上有很多种语言，为了在计算机上能表现这些语言，各个国家在UTF-8出现前都制订了各自不同的字符编码标准。各自并不兼容。直到UTF-8出现才算是有了个统一的编码标准（现在发现UTF-8也不能包括世界上所有文字），但是老标准还是在各自沿用。比如中国，GB2312的网页还是很多的^_^</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 那么怎么识别一个网页用的是什么编码呢？</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 一是网页或服务器直接报告浏览器，这个页面用的是什么编码。比如HTTP头的content-type属性，页面的charset属性。这个比较容易实现，只要检测这些属性就能知道用的是什么编码。</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 二是浏览器自动猜测。这个就类似人工智能了。比如有些网页没有写charset属性，那么我们看到页面显示乱码时，就会手动去选择页面编码，发现是乱码，就再换一个，直到显示正常为止。</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 今天这篇文章要说的就是第二个方法，用程序实现自动猜测页面或文件使用的字符集。</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 具体的原理就是基于统计学的字符特征分析，统计哪些字符是最常见的字符。这个工作Mozilla有专门的文章《A composite approach to language/encoding detection》说明。作者之一是Shanjian Li，中国北京人哦。</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 好了，具体的代码其实Mozilla已经用C++实现了，名字就叫UniversalCharDet，但是我翻遍了Internet也找不到.NET的实现类库，只有Google Code上有Java的翻译代码。没办法，自己翻译成C#的代码吧。</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; C#实现的源代码：<a title="http://code.google.com/p/nuniversalchardet/" href="http://code.google.com/p/nuniversalchardet/">http://code.google.com/p/nuniversalchardet/</a></p>
<p>&nbsp;</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; PS1.顺便说一下标题，为什么叫比IE更准确，那是因为IE浏览器也自带字符集猜测功能，也有人实现了通过调用IE的接口来猜测字符集的功能类库(<a title="http://www.codeproject.com/KB/recipes/DetectEncoding.aspx" href="http://www.codeproject.com/KB/recipes/DetectEncoding.aspx">http://www.codeproject.com/KB/recipes/DetectEncoding.aspx</a>)，不过我试过，这个接口的准确率也不高，成功猜测几率远低于UniversalCharDet。</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; PS2.网上流传比较多的是Nchardet，这个是基于mozilla的老版本字符集猜测类chardet的C#实现。准确率也比较低，大致和IE的接口成功率差不多。</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; PS3.参考资料</p>
<p>juniversalchardet:<a title="http://code.google.com/p/juniversalchardet/" href="http://code.google.com/p/juniversalchardet/">http://code.google.com/p/juniversalchardet/</a>&nbsp;（java版代码在BIG5Prober和GB18030Prober类中有BUG，C#版已经修正）</p>
<p>原理参考： <a title="http://www.mozilla.org/projects/intl/UniversalCharsetDetection.html" href="http://www.mozilla.org/projects/intl/UniversalCharsetDetection.html">http://www.mozilla.org/projects/intl/UniversalCharsetDetection.html</a></p>
<img src ="http://www.cnblogs.com/lersh/aggbug/1238799.html?type=1" width = "1" height = "1" /><br><br><a href="http://news.cnblogs.com/n/41275/" target="_blank">[新闻]Mozilla将于本周五发布Firefox 3.1第一个预览版</a>]]></description></item><item><title>被腾讯玩死了</title><link>http://www.cnblogs.com/lersh/archive/2008/05/07/1187387.html</link><dc:creator>蓝色的风之精灵</dc:creator><author>蓝色的风之精灵</author><pubDate>Wed, 07 May 2008 12:51:00 GMT</pubDate><guid>http://www.cnblogs.com/lersh/archive/2008/05/07/1187387.html</guid><wfw:comment>http://www.cnblogs.com/lersh/comments/1187387.html</wfw:comment><comments>http://www.cnblogs.com/lersh/archive/2008/05/07/1187387.html#Feedback</comments><slash:comments>2</slash:comments><wfw:commentRss>http://www.cnblogs.com/lersh/comments/commentRss/1187387.html</wfw:commentRss><trackback:ping>http://www.cnblogs.com/lersh/services/trackbacks/1187387.html</trackback:ping><description><![CDATA[<p>这该死的群贴图接收问题，早上好好的，中午就不行了。</p>  <p>修正了后，中午早上好了，下午又不行了&#8230;&#8230;</p>  <p>这叫什么事啊</p><img src ="http://www.cnblogs.com/lersh/aggbug/1187387.html?type=1" width = "1" height = "1" /><br><br><a href="http://news.cnblogs.com/n/41274/" target="_blank">[新闻]瑞星将向个人用户免费1年</a>]]></description></item><item><title>让LumaQQ.NET支持接收群自定义表情和贴图</title><link>http://www.cnblogs.com/lersh/archive/2008/05/06/1185473.html</link><dc:creator>蓝色的风之精灵</dc:creator><author>蓝色的风之精灵</author><pubDate>Tue, 06 May 2008 09:30:00 GMT</pubDate><guid>http://www.cnblogs.com/lersh/archive/2008/05/06/1185473.html</guid><wfw:comment>http://www.cnblogs.com/lersh/comments/1185473.html</wfw:comment><comments>http://www.cnblogs.com/lersh/archive/2008/05/06/1185473.html#Feedback</comments><slash:comments>5</slash:comments><wfw:commentRss>http://www.cnblogs.com/lersh/comments/commentRss/1185473.html</wfw:commentRss><trackback:ping>http://www.cnblogs.com/lersh/services/trackbacks/1185473.html</trackback:ping><description><![CDATA[<p>&#160;&#160;&#160;&#160;&#160;&#160; 不知道这个功能有多少人期待，反正我是很想要这个功能的，因为看着群里人说话贴表情，自己看不见是很郁闷的事情。狠狠心找来LumaQQ的Java代码，自己一点点翻译成C#的加了进去。呵呵，在这里感谢Luma前辈和<a href="http://space.cnblogs.com/hjf1223/">阿不</a>同学的辛勤劳动，没有他们这个功能也出不来。</p>  <p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; 好了，不多说了，因为说也说不清&#8230;&#8230;改动太多，代码也比较乱。提交给<a href="http://space.cnblogs.com/hjf1223/">阿不</a>同学了，只能辛苦他去整理了。</p>  <p>&#160;</p>  <p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; 这里就放一个编译好的<a href="http://www.cnblogs.com/Files/lersh/LumaQQ.NET.rar">DLL</a>吧，感兴趣的同学自己反编译看看实现的代码好了，真正的源代码等阿不再次更新吧~</p>  <p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; 嗯，说下怎么去下载自定义表情和图片：</p>  <p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; 在接收到群消息时，调用CustomFaceManage的AddClusterIM方法</p>  <div style="border-right: gray 1px solid; padding-right: 4px; border-top: gray 1px solid; padding-left: 4px; font-size: 8pt; padding-bottom: 4px; margin: 20px 0px 10px; overflow: auto; border-left: gray 1px solid; width: 97.5%; cursor: text; max-height: 200px; line-height: 12pt; padding-top: 4px; border-bottom: gray 1px solid; font-family: consolas, &#39;Courier New&#39;, courier, monospace; background-color: #f4f4f4">   <div style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">     <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">   1:</span> client.CustomFaceManager.AddClusterIM(e.InPacket);</pre>
  </div>
</div>

<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; 好了，就这么简单。那么有人问，图片保存到哪里去了呢？</p>

<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; 这个是在App.config(编译后自动会更名成 程序名.exe.config)里可以配置的：</p>

<div style="border-right: gray 1px solid; padding-right: 4px; border-top: gray 1px solid; padding-left: 4px; font-size: 8pt; padding-bottom: 4px; margin: 20px 0px 10px; overflow: auto; border-left: gray 1px solid; width: 97.5%; cursor: text; max-height: 200px; line-height: 12pt; padding-top: 4px; border-bottom: gray 1px solid; font-family: consolas, &#39;Courier New&#39;, courier, monospace; background-color: #f4f4f4">
  <div style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
    <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">   1:</span> <span style="color: #0000ff">&lt;?</span><span style="color: #800000">xml</span> <span style="color: #ff0000">version</span><span style="color: #0000ff">=&quot;1.0&quot;</span> <span style="color: #ff0000">encoding</span><span style="color: #0000ff">=&quot;utf-8&quot;</span> ?<span style="color: #0000ff">&gt;</span></pre>

    <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">   2:</span> <span style="color: #0000ff">&lt;</span><span style="color: #800000">configuration</span><span style="color: #0000ff">&gt;</span></pre>

    <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">   3:</span>   <span style="color: #0000ff">&lt;</span><span style="color: #800000">appSettings</span><span style="color: #0000ff">&gt;</span></pre>

    <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">   4:</span>     <span style="color: #0000ff">&lt;</span><span style="color: #800000">add</span> <span style="color: #ff0000">key</span><span style="color: #0000ff">=&quot;CustomFaceDir&quot;</span> <span style="color: #ff0000">value</span><span style="color: #0000ff">=&quot;D:\LumaQQ.NET\Faces\CustomFaceRecv&quot;</span> <span style="color: #0000ff">/&gt;</span></pre>

    <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">   5:</span>     <span style="color: #0000ff">&lt;</span><span style="color: #800000">add</span> <span style="color: #ff0000">key</span><span style="color: #0000ff">=&quot;ImageDir&quot;</span> <span style="color: #ff0000">value</span><span style="color: #0000ff">=&quot;D:\LumaQQ.NET\Faces\Image&quot;</span> <span style="color: #0000ff">/&gt;</span></pre>

    <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">   6:</span>   <span style="color: #0000ff">&lt;/</span><span style="color: #800000">appSettings</span><span style="color: #0000ff">&gt;</span></pre>

    <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">   7:</span> <span style="color: #0000ff">&lt;/</span><span style="color: #800000">configuration</span><span style="color: #0000ff">&gt;</span></pre>
  </div>
</div>

<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; 如果不配置，默认放在程序所在目录的CustomFaceDir和imageDir里面。</p>

<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; 好了，使用就这么简单~</p>

<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; <a href="http://www.cnblogs.com/Files/lersh/LumaQQ.NET.rar">点击下载LumaQQ.NET.rar</a></p><img src ="http://www.cnblogs.com/lersh/aggbug/1185473.html?type=1" width = "1" height = "1" /><br><br><a href="http://news.cnblogs.com/n/41273/" target="_blank">[新闻]中国互联网历史上最伟大的产品TOP10（二）</a>]]></description></item><item><title>QQ的群消息关键字屏蔽</title><link>http://www.cnblogs.com/lersh/archive/2008/05/03/1180120.html</link><dc:creator>蓝色的风之精灵</dc:creator><author>蓝色的风之精灵</author><pubDate>Sat, 03 May 2008 02:34:00 GMT</pubDate><guid>http://www.cnblogs.com/lersh/archive/2008/05/03/1180120.html</guid><wfw:comment>http://www.cnblogs.com/lersh/comments/1180120.html</wfw:comment><comments>http://www.cnblogs.com/lersh/archive/2008/05/03/1180120.html#Feedback</comments><slash:comments>1</slash:comments><wfw:commentRss>http://www.cnblogs.com/lersh/comments/commentRss/1180120.html</wfw:commentRss><trackback:ping>http://www.cnblogs.com/lersh/services/trackbacks/1180120.html</trackback:ping><description><![CDATA[<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; 之前我写了一篇关于<a href="http://www.cnblogs.com/lersh/archive/2008/04/29/1176284.html">怎么在LumaQQ.NET里发送超长群消息</a>的文章，经过自己的试验，是成功的。</p>  <p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; 但是之后我在实际应用中，发现有一段消息怎么也发送不出去，我觉得很奇怪，难道是我的程序有问题？</p>  <p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; 而且同样的消息，我用私聊也能发出去，这更让我以为是发送长消息的代码有问题&#8230;&#8230;</p>  <p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; 于是我尝试了过滤回车，换行，查找非法字符等等方法，仍然一无所获&#8230;&#8230;</p>  <p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; 然后我尝试截获收到的消息包，发现竟然只能收到第一段消息，而第二段根本收不到！这就难怪了，因为消息包不完整，自然不会显示出来。</p>  <p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; 这是怎么回事？为什么第二段消息收不到？我明明发送出去了，也没有收到超时的提示？在绝望中我想到了一点，会不会是腾讯因为消息中有什么敏感词汇将消息过滤了？</p>  <p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; 于是我将消息一点点的拆开发送，终于发现，这段消息里有两个汉字的组合是发不出去的，而且很神奇的是，不仅连在一起发不出去，在他们之间加上空格，换行，数字，字母依然是发不出去的，只有加上汉字才能发送成功。</p>  <p>&#160;</p>  <p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; 好吧，这篇文章主要要表示的不是谴责腾讯干涉言论自由，这个错不再腾讯，责任在谁大家心知肚明；而是提醒下大家，使用LumaQQ.NET发消息失败时，不要将目光局限于是不是代码的问题，而是有可能问题出在其他外界因素上。</p><img src ="http://www.cnblogs.com/lersh/aggbug/1180120.html?type=1" width = "1" height = "1" /><br><br><a href="http://news.cnblogs.com/n/41271/" target="_blank">[新闻]盖茨官方否认天价租楼看奥运 纯属地产商炒作</a>]]></description></item><item><title>再来说说LumaQQ.NET怎么发群消息</title><link>http://www.cnblogs.com/lersh/archive/2008/04/29/1176404.html</link><dc:creator>蓝色的风之精灵</dc:creator><author>蓝色的风之精灵</author><pubDate>Tue, 29 Apr 2008 08:21:00 GMT</pubDate><guid>http://www.cnblogs.com/lersh/archive/2008/04/29/1176404.html</guid><wfw:comment>http://www.cnblogs.com/lersh/comments/1176404.html</wfw:comment><comments>http://www.cnblogs.com/lersh/archive/2008/04/29/1176404.html#Feedback</comments><slash:comments>4</slash:comments><wfw:commentRss>http://www.cnblogs.com/lersh/comments/commentRss/1176404.html</wfw:commentRss><trackback:ping>http://www.cnblogs.com/lersh/services/trackbacks/1176404.html</trackback:ping><description><![CDATA[<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; QQ群有两个ID，内部ID和外部ID。外部ID就是我们平时常见的ID，搜索啊，查看啊，都是这个ID。</p>  <p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; 而内部ID就不常见了，应该说用QQ的人是从来不知道还有这个ID的。但是，这个ID是这篇文章的重点。因为发群信息必须用到这个ID。</p>  <p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; 用过LumaQQ.NET的人，尝试过用QQ上可见的群号码发群消息，相信都是超时失败的。为什么呢？因为发群消息应该用群内部ID    <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; 那么怎么得到群内部ID呢？它和群外部ID有什么联系？</p>  <p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; 很遗憾，两者没有任何联系&#8230;&#8230;</p>  <p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; 不过我们有办法将两者联系起来，那就是在登录时手动去保存对应关系表：</p>  <p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; 先要定义一个字典：</p>  <div style="border-right: gray 1px solid; padding-right: 4px; border-top: gray 1px solid; padding-left: 4px; font-size: 8pt; padding-bottom: 4px; margin: 20px 0px 10px; overflow: auto; border-left: gray 1px solid; width: 97.5%; cursor: text; max-height: 200px; line-height: 12pt; padding-top: 4px; border-bottom: gray 1px solid; font-family: consolas, &#39;Courier New&#39;, courier, monospace; background-color: #f4f4f4">   <div style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">     <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">   1:</span> <span style="color: #0000ff">public</span> <span style="color: #0000ff">static</span> Dictionary&lt;<span style="color: #0000ff">int</span>, <span style="color: #0000ff">int</span>&gt; ClusterDict { get; <span style="color: #0000ff">private</span> set; }</pre>
  </div>
</div>

<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; 然后在登录成功事件里添加获取分组信息的代码：</p>

<div style="border-right: gray 1px solid; padding-right: 4px; border-top: gray 1px solid; padding-left: 4px; font-size: 8pt; padding-bottom: 4px; margin: 20px 0px 10px; overflow: auto; border-left: gray 1px solid; width: 97.5%; cursor: text; max-height: 200px; line-height: 12pt; padding-top: 4px; border-bottom: gray 1px solid; font-family: consolas, &#39;Courier New&#39;, courier, monospace; background-color: #f4f4f4">
  <div style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
    <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">   1:</span> <span style="color: #0000ff">void</span> LoginManager_LoginSuccessed(<span style="color: #0000ff">object</span> sender, LumaQQ.NET.Events.QQEventArgs&lt;LumaQQ.NET.Packets.In.LoginReplyPacket, LoginPacket&gt; e)</pre>

    <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">   2:</span> {</pre>

    <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">   3:</span>     WriteError(<span style="color: #006080">&quot;登录成功&quot;</span>);</pre>

    <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">   4:</span>     WriteError(<span style="color: #006080">&quot;开始读取好友信息&quot;</span>);</pre>

    <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">   5:</span>     e.QQClient.FriendManager.GetFriendList();</pre>

    <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">   6:</span>     e.QQClient.FriendManager.GetUserInfo(e.QQClient.QQUser.QQ);</pre>

    <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">   7:</span>     e.QQClient.FriendManager.DownloadGroupFriends(0);<span style="color: #008000">//下载分组信息，这里是为了得到群的内部号码。</span></pre>

    <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">   8:</span>&#160; </pre>

    <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">   9:</span>     <span style="color: #008000">//改变状态为离开状态</span></pre>

    <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">  10:</span>     e.QQClient.FriendManager.ChangeStatus(QQStatus.AWAY, <span style="color: #0000ff">false</span>);</pre>

    <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">  11:</span>     <span style="color: #008000">//读取天气预报</span></pre>

    <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">  12:</span>     e.QQClient.PrivateManager.GetWeather();</pre>

    <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">  13:</span> }</pre>
  </div>
</div>

<p>&#160;</p>

<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; 当下载分组信息成功后，判断是不是群，是群的话，就去获取群信息。（其实这里的friend.QQ就是群内部ID了，只不过我们不知道它的外部ID是什么）</p>

<div style="border-right: gray 1px solid; padding-right: 4px; border-top: gray 1px solid; padding-left: 4px; font-size: 8pt; padding-bottom: 4px; margin: 20px 0px 10px; overflow: auto; border-left: gray 1px solid; width: 97.5%; cursor: text; max-height: 200px; line-height: 12pt; padding-top: 4px; border-bottom: gray 1px solid; font-family: consolas, &#39;Courier New&#39;, courier, monospace; background-color: #f4f4f4">
  <div style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
    <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">   1:</span> <span style="color: #0000ff">void</span> FriendManager_DownloadGroupFriendSuccessed(<span style="color: #0000ff">object</span> sender, QQEventArgs&lt;DownloadGroupFriendReplyPacket, DownloadGroupFriendPacket&gt; e)</pre>

    <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">   2:</span> {</pre>

    <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">   3:</span>     <span style="color: #0000ff">foreach</span> (DownloadFriendEntry friend <span style="color: #0000ff">in</span> e.InPacket.Friends)</pre>

    <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">   4:</span>     {</pre>

    <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">   5:</span>         <span style="color: #0000ff">if</span> (friend.Type == FriendType.IS_CLUSTER)</pre>

    <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">   6:</span>         {</pre>

    <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">   7:</span>             e.QQClient.ClusterManager.GetClusterInfo((<span style="color: #0000ff">int</span>)friend.QQ);</pre>

    <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">   8:</span>         }</pre>

    <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">   9:</span>     }</pre>

    <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">  10:</span> }</pre>
  </div>
</div>

<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; 最后，在获取群信息成功的事件里，就能得到外部ID了，我们保存下来</p>

<div style="border-right: gray 1px solid; padding-right: 4px; border-top: gray 1px solid; padding-left: 4px; font-size: 8pt; padding-bottom: 4px; margin: 20px 0px 10px; overflow: auto; border-left: gray 1px solid; width: 97.5%; cursor: text; max-height: 200px; line-height: 12pt; padding-top: 4px; border-bottom: gray 1px solid; font-family: consolas, &#39;Courier New&#39;, courier, monospace; background-color: #f4f4f4">
  <div style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
    <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">   1:</span> <span style="color: #0000ff">void</span> ClusterManager_GetClusterInfoSuccessed(<span style="color: #0000ff">object</span> sender, QQEventArgs&lt;ClusterCommandReplyPacket, ClusterGetInfoPacket&gt; e)</pre>

    <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">   2:</span> {</pre>

    <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">   3:</span>     <span style="color: #0000ff">if</span> (!ClusterDict.ContainsKey((<span style="color: #0000ff">int</span>)e.InPacket.Info.ExternalId))</pre>

    <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">   4:</span>         ClusterDict.Add((<span style="color: #0000ff">int</span>)e.InPacket.Info.ExternalId, (<span style="color: #0000ff">int</span>)e.InPacket.Info.ClusterId);</pre>

    <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">   5:</span>     <span style="color: #0000ff">else</span></pre>

    <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">   6:</span>         ClusterDict[(<span style="color: #0000ff">int</span>)e.InPacket.Info.ExternalId] = (<span style="color: #0000ff">int</span>)e.InPacket.Info.ClusterId;</pre>

    <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">   7:</span>     WriteError(<span style="color: #006080">&quot;得到群{0}的外部ID：{1}，内部ID：{2}&quot;</span>, e.InPacket.Info.Name,e.InPacket.Info.ExternalId,e.InPacket.Info.ClusterId);</pre>

    <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">   8:</span> }</pre>
  </div>
</div>

<p>&#160;</p>

<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; 这样，以后我们发群消息时，根据群外部ID从字典里取到对应的内部ID就能发送信息了。</p><img src ="http://www.cnblogs.com/lersh/aggbug/1176404.html?type=1" width = "1" height = "1" /><br><br><a href="http://news.cnblogs.com/n/41270/" target="_blank">[新闻]2008年7月24日IT博客精选</a>]]></description></item><item><title>让LumaQQ.NET支持发送超长群消息</title><link>http://www.cnblogs.com/lersh/archive/2008/04/29/1176284.html</link><dc:creator>蓝色的风之精灵</dc:creator><author>蓝色的风之精灵</author><pubDate>Tue, 29 Apr 2008 07:21:00 GMT</pubDate><guid>http://www.cnblogs.com/lersh/archive/2008/04/29/1176284.html</guid><wfw:comment>http://www.cnblogs.com/lersh/comments/1176284.html</wfw:comment><comments>http://www.cnblogs.com/lersh/archive/2008/04/29/1176284.html#Feedback</comments><slash:comments>7</slash:comments><wfw:commentRss>http://www.cnblogs.com/lersh/comments/commentRss/1176284.html</wfw:commentRss><trackback:ping>http://www.cnblogs.com/lersh/services/trackbacks/1176284.html</trackback:ping><description><![CDATA[摘要: &#160;&#160;&#160;&#160;&#160;&#160;&#160; 之前我们修改了LumaQQ.NET，让他能发送超长消息了。现在我们再来看看，怎么让其支持发送群超长消息。  &#160;&#160;&#160;&#160;&#160;&#160;&#160; 可能有人说，这个简单，我照着发送普通消息的方法写一个发送群的不是一样吗？  &#160;&#160;&#160;&#16&nbsp;&nbsp;<a href='http://www.cnblogs.com/lersh/archive/2008/04/29/1176284.html'>阅读全文</a><img src ="http://www.cnblogs.com/lersh/aggbug/1176284.html?type=1" width = "1" height = "1" /><br><br><a href="http://news.cnblogs.com/n/41270/" target="_blank">[新闻]2008年7月24日IT博客精选</a>]]></description></item><item><title>啦啦啦，可爱的波利保证</title><link>http://www.cnblogs.com/lersh/archive/2008/04/26/1172221.html</link><dc:creator>蓝色的风之精灵</dc:creator><author>蓝色的风之精灵</author><pubDate>Sat, 26 Apr 2008 07:49:00 GMT</pubDate><guid>http://www.cnblogs.com/lersh/archive/2008/04/26/1172221.html</guid><wfw:comment>http://www.cnblogs.com/lersh/comments/1172221.html</wfw:comment><comments>http://www.cnblogs.com/lersh/archive/2008/04/26/1172221.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cnblogs.com/lersh/comments/commentRss/1172221.html</wfw:commentRss><trackback:ping>http://www.cnblogs.com/lersh/services/trackbacks/1172221.html</trackback:ping><description><![CDATA[哈哈，前两天从公司包了两个波利抱枕回家，好可爱啊~~<br />
<img height="480" alt="" src="http://www.cnblogs.com/images/cnblogs_com/lersh/133437/r_DSCF0001.JPG" width="640" border="0" /><br />
<img alt="" src="http://www.cnblogs.com/images/cnblogs_com/lersh/133437/r_DSCF0004.JPG" border="0" />
<img src ="http://www.cnblogs.com/lersh/aggbug/1172221.html?type=1" width = "1" height = "1" /><br><br><a href="http://news.cnblogs.com/n/41269/" target="_blank">[新闻]TOM在线与Joost正式组建合资公司</a>]]></description></item><item><title>使LumaQQ.NET支持接收长消息</title><link>http://www.cnblogs.com/lersh/archive/2008/04/22/1165919.html</link><dc:creator>蓝色的风之精灵</dc:creator><author>蓝色的风之精灵</author><pubDate>Tue, 22 Apr 2008 09:21:00 GMT</pubDate><guid>http://www.cnblogs.com/lersh/archive/2008/04/22/1165919.html</guid><wfw:comment>http://www.cnblogs.com/lersh/comments/1165919.html</wfw:comment><comments>http://www.cnblogs.com/lersh/archive/2008/04/22/1165919.html#Feedback</comments><slash:comments>8</slash:comments><wfw:commentRss>http://www.cnblogs.com/lersh/comments/commentRss/1165919.html</wfw:commentRss><trackback:ping>http://www.cnblogs.com/lersh/services/trackbacks/1165919.html</trackback:ping><description><![CDATA[<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 之前的文章里说明了怎么让LumaQQ.NET发送长消息，这里我们看看怎么让LumaQQ.NET支持接收长消息。</p> <p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 其实QQ的服务器在发送长消息时，是将其拆分成几个短的消息来发送的，这点在上一篇发送长消息时，大家已经能看出来了。那么怎么将几个短消息合并成一个长消息呢。</p> <p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 这里主要是用到了NormalIM的TotalFragments和FragmentSequence两个属性，FragmentSequence表示这个是第几个分片，基于0的index，TotalFragments表示一共有几个分片。</p> <p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 由于收到消息时，不一定是按照顺序接收到的（网络延迟等原因），因此我们定一个Dictionary来管理分片。</p> <div> <div style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #0000ff">private</span> <span style="color: #0000ff">static</span> Dictionary&lt;<span style="color: #0000ff">int</span>, Dictionary&lt;<span style="color: #0000ff">int</span>, <span style="color: #0000ff">byte</span>[]&gt;&gt; NormalLongTextDict = <span style="color: #0000ff">new</span> Dictionary&lt;<span style="color: #0000ff">int</span>, Dictionary&lt;<span style="color: #0000ff">int</span>, <span style="color: #0000ff">byte</span>[]&gt;&gt;();</pre></div></div>
<div>&nbsp;</div>
<div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 然后在接收到消息的事件里，进行判断和组装</div>
<div>
<div style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #0000ff">void</span> MessageManager_ReceiveNormalIM(<span style="color: #0000ff">object</span> sender, LumaQQ.NET.Events.QQEventArgs&lt;LumaQQ.NET.Packets.In.ReceiveIMPacket, OutPacket&gt; e)</pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">{</pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">    <span style="color: #0000ff">if</span> (e.InPacket.NormalIM.TotalFragments &gt; 1)<span style="color: #008000">//如果是长消息的分片</span></pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">    {</pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">        Dictionary&lt;<span style="color: #0000ff">int</span>, <span style="color: #0000ff">byte</span>[]&gt; TextFragment;</pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">        <span style="color: #0000ff">if</span> (!NormalLongTextDict.ContainsKey(e.InPacket.NormalIM.MessageId))<span style="color: #008000">//如果字典里没有缓存这个消息id</span></pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">        {</pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">            TextFragment = <span style="color: #0000ff">new</span> Dictionary&lt;<span style="color: #0000ff">int</span>, <span style="color: #0000ff">byte</span>[]&gt;();</pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">            TextFragment.Add(e.InPacket.NormalIM.FragmentSequence, e.InPacket.NormalIM.MessageBytes);<span style="color: #008000">//将分片加入以分片id为标示的分片缓存</span></pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">            NormalLongTextDict.Add(e.InPacket.NormalIM.MessageId, TextFragment);<span style="color: #008000">//将分片缓存加入以消息id为标示的消息缓存</span></pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">        }</pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">        <span style="color: #0000ff">else</span></pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">        {</pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">            TextFragment = NormalLongTextDict[e.InPacket.NormalIM.MessageId];<span style="color: #008000">//取出分片缓存</span></pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">            TextFragment.Add(e.InPacket.NormalIM.FragmentSequence, e.InPacket.NormalIM.MessageBytes);加入新的分片</pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">            NormalLongTextDict[e.InPacket.NormalIM.MessageId] = TextFragment;放回消息缓存</pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">        }</pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">&nbsp;</pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">        <span style="color: #0000ff">if</span> (TextFragment.Count == e.InPacket.NormalIM.TotalFragments)<span style="color: #008000">//如果所有分片都已经接收完毕</span></pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">        {</pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">            List&lt;<span style="color: #0000ff">byte</span>&gt; LongTextBytes = <span style="color: #0000ff">new</span> List&lt;<span style="color: #0000ff">byte</span>&gt;();</pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">            <span style="color: #0000ff">string</span> LongText = <span style="color: #006080">""</span>;</pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">            <span style="color: #0000ff">for</span> (<span style="color: #0000ff">int</span> i = 0; i &lt; TextFragment.Count; i++)</pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">            {</pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">                LongTextBytes.AddRange(TextFragment[i]);合并byte数组</pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">            }</pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">            LongText = Encoding.GetEncoding(QQGlobal.QQ_CHARSET_DEFAULT).GetString(LongTextBytes.ToArray());转为文字字符串</pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">              NormalLongTextDict.Remove(e.InPacket.NormalIM.MessageId);<span style="color: #008000">//删除缓存</span></pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">              e.QQClient.MessageManager.SendIM(e.InPacket.NormalHeader.Sender, <span style="color: #0000ff">string</span>.Format(<span style="color: #006080">"我收到你的消息：{0}"</span>, LongText);</pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">        }</pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">    }</pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">    <span style="color: #0000ff">else</span></pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">    {</pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">        WriteError(<span style="color: #006080">"收到好友：{0}/{1} 发来的信息：{2}"</span>, e.InPacket.NormalHeader.Sender, Nick, AnalyCustomFace(e.InPacket.NormalIM.MessageBytes));</pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">        e.QQClient.MessageManager.SendIM(e.InPacket.NormalHeader.Sender, <span style="color: #0000ff">string</span>.Format(<span style="color: #006080">"我收到你的消息：{0}"</span>, e.InPacket.NormalIM.Message));</pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">&nbsp;</pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">    }</pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">&nbsp;</pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">&nbsp;</pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">}</pre></div></div><img src ="http://www.cnblogs.com/lersh/aggbug/1165919.html?type=1" width = "1" height = "1" /><br><br><a href="http://news.cnblogs.com/n/41268/" target="_blank">[新闻]财富:谷歌副总裁称其新闻搜索值1亿美元</a>]]></description></item></channel></rss>