第一次被一首歌打动得泪流满面。
那段早已随风逝去,“不知道爱你从哪一年”的恋情,除了心口的绞痛,已不记得什么细节了。
我想许多人在所谓的[成熟]或麻木之前,多有过这么一段时光,没有什么人什么事让你必须做点什么并满怀梦想。
就像歌里唱的,“花开在眼前,我们一起牵手向明天,每次我总是临风轻哼,更好的季节在下个春天”。
posted @ 2010-08-06 22:19 江南白衣 阅读(166) 评论(1) 编辑
|
第一次被一首歌打动得泪流满面。 那段早已随风逝去,“不知道爱你从哪一年”的恋情,除了心口的绞痛,已不记得什么细节了。 我想许多人在所谓的[成熟]或麻木之前,多有过这么一段时光,没有什么人什么事让你必须做点什么并满怀梦想。 就像歌里唱的,“花开在眼前,我们一起牵手向明天,每次我总是临风轻哼,更好的季节在下个春天”。 posted @ 2010-08-06 22:19 江南白衣 阅读(166) 评论(1) 编辑 摘要: 那些程序员大清早骑自行车出来,穿越了大半个科技园,到了公司,早饭也不吃一口,便到财务室占卜他们的命运。“Manager 2个月,Engineer 1个月,到公司不满一年的统统没有。”财务大妈有气没力地回答他们。阅读全文 posted @ 2009-01-19 23:33 江南白衣 阅读(726) 评论(9) 编辑 摘要: The SQL Spatial Tools consists of two tools to make it easy to get experience with the new spatial capabilities of SQL Server 2008 (click for more info) :
Shape2SQL : Uploads ESRI Shapefiles to Microsoft SQL Server Spatial.
SqlSpatial Query Tool : Queries MSSQL Server 2008 and displays geometry output on a WPF-based interactive map.
阅读全文 posted @ 2008-08-25 20:34 江南白衣 阅读(757) 评论(1) 编辑 摘要: 刚刚出炉的,暂时放首页:)
Microsoft Visual Studio 2008 Service Pack 1 (iso)
http://www.microsoft.com/downloads/details.aspx?displaylang=zh-cn&FamilyID=27673c47-b3b5-4c67-bd99-84e525b5ce61
Visual Studio 2008 Team Foundation Server Service Pack 1(iso)
http://www.microsoft.com/downloads/details.aspx?displaylang=zh-cn&FamilyID=9e40a5b6-da41-43a2-a06d-3cee196bfe3d
Microsoft .NET Framework 3.5 Service Pack 1
http://www.microsoft.com/downloads/details.aspx?displaylang=zh-cn&FamilyID=ab99342f-5d1a-413d-8阅读全文 posted @ 2008-08-12 00:27 江南白衣 阅读(5531) 评论(76) 编辑 摘要: Alright, I've purposely hid the View to Presenter communication in my previous posts on Supervising Controller and Passive View because I thought that subject was worthy of its own post. As I see it, there are 2 1/2 basic ways to communicate screen events back to the Presenter.
Expose events off of the IView interface. Jeffrey Palermo has told me before that he will do something very similar, but attaches delegates through setter properties instead. I'm calling that technique the "1/2" bec阅读全文 posted @ 2008-08-02 19:40 江南白衣 阅读(333) 评论(0) 编辑 原文:http://www.ayende.com/Blog/archive/2006/07/25/7397.aspx
Let us assume that you have the following class hierarchy:
Now, what do you think the result of this code will be?
BindingList<Animal> animals = new BindingList<Animal>(); animals.Add(new Dog()); animals.Add(new Cat()); GridView gridView = new GridView(); gridView.DataSource = animals; gridView.DataBind();
Ten points goes to the lady on the right that said that it will produce the following error: Unhandled Exception: System.Reflection.TargetInvocationException: Property accessor 'Name' on object 'AnimalDesc.Cat' threw the following exception:'Object does not match target type.' ---> System.Reflection.TargetException: Object does not match target type.
The reason for this bug is that the TypeDescriptors in .Net are not aware of polymorphism. Even though both Cat and Dog inherit from Animal and has a Name property, and that the list that I passed to the DataSource is BindingList<T>, the TypeDescriptor only looks at the first item in the list, and uses it to describe all types in the list. This can cause problems when the collection that you pass to the GridView contains an inheritance hierarchy. After butting my head against this issue for too long, I finally came up with this solution:
public class AnimalTypeDescriptionProvider : TypeDescriptionProvider { public AnimalTypeDescriptionProvider() :base(TypeDescriptor.GetProvider(typeof(Animal))) { }
public override Type GetReflectionType(Type objectType, object instance) { return base.GetReflectionType(typeof(Animal), instance); }
public override ICustomTypeDescriptor GetTypeDescriptor(Type objectType, object instance) { return base.GetTypeDescriptor(typeof(Animal), instance); }
public static void Register() { TypeDescriptor.AddProvider(new AnimalTypeDescriptionProvider(), typeof(Animal)); } }
Then, I call the AnimalTypeDescriptionProvider.Register(); method in the start of the application. What this does is it lies to the data binding infrastructure, and tells them that any type that inherits from Animal is actually an Animal, and should be treated appropriately. This solution is good enough for now, but it will prevent me from databinding a list of Dogs, for instance. posted @ 2008-08-02 18:46 江南白衣 阅读(285) 评论(0) 编辑 摘要: In the development of the Composite Application Guidance one area that we have labored intensely was around documentation. Documentation was so high on our priority list, that we deliberately reduced the number of bells and whistles in order to allow us to properly document what we had. As part of this we put in a significant effort to provide overview level information. We heard a lot of feedback from customers on the need for us to provide much more of the "Why" rather than the "What". Our hop阅读全文 posted @ 2008-08-02 14:13 江南白衣 阅读(234) 评论(0) 编辑 摘要: Occasionally this question pops up on the CAB message boards: How do I prevent my application from closing if the user has unsaved changes?
Turns out that there’s a very simple pattern you can utilize to handle this situation. It’s called the Notification Pattern. Jeremy Miller, .Net guru, has a very good blog post on this pattern. He uses it to illustrate a standard way to handle validation on domain objects, but it’s a valuable pattern in other cases too, as I’ll show.
阅读全文 posted @ 2008-08-02 02:34 江南白衣 阅读(232) 评论(0) 编辑 摘要: This article is all about using the .NET 3.5 System.Addin namespace. This article owes much to the fabulous WPF book by Mathew McDonald (Who is an uber genius in my opinion). 阅读全文 posted @ 2008-07-15 21:07 江南白衣 阅读(499) 评论(0) 编辑 摘要: sourceforge被和谐了,下一个会是谁呢? sourceforge是什么?去sourceforge的人都是些什么人?那些傻逼和白痴们以为区区一道墙就能阻挡得了这些人了嘛? 更早的一些时候,我们伟大的祖先建立了那道伟大的墙,结果如何?伟大的汉族文明却被墙外的铁骑一而再再而三地翻墙而过继而狠狠地踏在脚底! 我们热爱民族,我们热爱祖国,我们是成年人,我们接受过足以明辨是非的教育,我们对自己的行为负...阅读全文 posted @ 2008-07-11 20:58 江南白衣 阅读(650) 评论(2) 编辑 摘要: 原文:http://weblogs.asp.net/vardi/archive/2008/05/31/net-debugger-visualizers-list.aspx1. WCF Visualizers - http://www.codeplex.com/WCFVisualizer2. CAB Visualization - http://www.codeplex.com/WorkItemVi...阅读全文 posted @ 2008-07-10 22:05 江南白衣 阅读(307) 评论(0) 编辑 摘要: The Composite Application Guidance for WPF can help you split the development of your WPF client application across multiple development teams, each responsible for the development of a piece of the application, and help you seamlessly compose those pieces together into a client application. The guidance includes a reference implementation, reusable library code (called the Composite Application Library), documentation, quick start tutorials and hands-on labs.阅读全文 posted @ 2008-07-08 01:00 江南白衣 阅读(364) 评论(0) 编辑 摘要: The Managed Extensibility Framework (MEF) provides developers with a tool to easily add extensibility to their applications and with minimal impact on existing code. The application developer can define extension points according to the functionality required of an extension, while the extension developer uses those points to interact with the application.
阅读全文 posted @ 2008-07-07 23:50 江南白衣 阅读(534) 评论(0) 编辑 摘要: Introduction
Welcome to the CodePlex site for the Managed Extensibility and Add-In Team. This site will be the home to both samples and tools designed to help you make the best use of the new System.AddIn features in the .Net FX v3.5. We'll continue to use our blog http://blogs.msdn.com/clraddins/ for information and discussion about our work, but from now on we'll be hosting our samples here for easier access. The initial focus will be on two things: Bringing over sample阅读全文 posted @ 2008-07-07 23:49 江南白衣 阅读(420) 评论(0) 编辑 |
||