Archive for 三月, 2005

Hello from Google

    今天在Google上又看到了一个新鲜玩意——Hello。

Google Tools里对它的介绍是”Instant message your pictures to friends ”。

下载了一个安装了一下,界面和Picasa 2 灰常相似,安装好以后,在Picasa 2 里看图片的时候也会多一个Hello的Button, 看来Google也深知集成di 重要

如何共享图片因为暂时没有找到人试验,还没有什么概念,不知道Hello是如何做的。如果有人有兴趣,可以装一个和我试验一把,Hello里我的UserName是cnzee。

    Hello的另外一个功能是可以直接上传图片到Blog,安装好以后可以在Friends列表里看到一个BloggerBot的User,应该就是做这个的。不过大概只能上传到http://www.blogger.com 的Blog吧。

 

DataGrid里的排序 / “Never return a class from the System.Data or child namespace from the DAL”

   有兄弟绑定了一个ArrayList到 System.Windows.Forms.DataGrid, 然后设置AllowSorting 为 True,但是发现显示出的DataGrid还是不能排序的说。

   在MSDN上相关的帮助那里没有看到甚么有用的东东,它只是说如果绑定 DataView/DataViewManager ,你可以如何如何。对ArrayList或者对象数组没有就没话说了。上Google查也没有找到什么有意义的东西,最后实在没有办法只有拿ILDASM 来偷窥了…

   在里面找到一个名为AllowSortingChanged的私有方法,里面调用到了一个IBindingList的RemoveSort 方法:

………

  IL_002a:  castclass  [System]System.ComponentModel.IBindingList

IL_002f: callvirt instance void [System]System.ComponentModel.IBindingList::RemoveSort() IL_0034: ret } // end of method DataGrid::AllowSortingChanged

然后的事情就很简单了,看了看IBindingList的接口,SortProperty/SortDirection属性和ApplySort/RemoveSort 方法明显就是给DataGrid准备的,基本上就可以确定了:

只有实现了IbindingList的DataSource才可以在DataGrid里排序.

—————–偶一般不喜欢只写一件事情,No2 Coming ————————

   MSDN 看到了一篇文章:On the Way to Mastering ASP.NET: Introducing Custom Entity Classes

   偶喜欢它对System.Data 缺陷的评论,它把使用DataSet的缺点展示的非常清楚,但是文章后半段对Entity Class的介绍(实现)就让人觉得有点简单–换句话说,它很好的提出了问题,但是没有很好的解决…..

   不过文章还是不错di,而且里面还给了你一堆Link引导你去近一步深入某个问题。

“Never return a class from the System.Data or child namespace from the DAL” 是这篇文章里提出的一个Rule,我以为,用它来做文章的标题更合适的说 

 

February CTP now available

刚才在这里看到的。

 

可惜目前只有Express,VSTS 大概还需要等等。