好久沒上cnblogs了。昨天上來看下,發現還落下好些文章沒有寫完。雖然不太高興寫,但做事還是有頭有尾的比較好,就寫完吧:) 關於商務邏輯封裝,在項目中我們用了Command Pattern來做。關於理由 ,《Java Persistence with Hibernate》一書說得挺好的,我也不另外闡述了,就直接copy過來好了: a third tier application may move the presentation layer to a separate
1. setInteval:Evaluates an expression each time a specified number of milliseconds has elapsed.2. setTimeout:Evaluates an expression after a specified number of milliseconds has elapsed. setInteval:
今天在做一個Winform的項目時遇到了一個問題需要跨線程更新GUI,Winform預設是不允許跨線程更新GUI控制項的,如果你這樣做會報錯,所以需要做一下變通,在我的解決方案中借鑒了Updating Your Form from Another Thread without Creating Delegates for Every Type of Update的代碼,代碼如下: // 建立一個放擴充方法的類public static class ExtensionMethod{public
假如有字串類,CString。它提供處理字串的一些功能。public class CString { public CString() { } public int GetLength(string s) { //return...; } public int GetNumberCount(string
DataTemplates are an extremely powerful part of WPF, and by using them, you can abstract all sorts of display code. However, there are times when they fall short - and initially when I was learning WPF I was disappointed by that. For instance, you
It seems that most people and organizations can not learn from their success, instead most would like to learn from failures. That how the saying “failure is the mother of success.” comes.From my point of view, anything can fail very easily and
WPF is powerful. So powerful in fact, that sometimes it's hard to find styles and settings to make it do what you want. Aligning ListView items was one such example for me. This snippet tutorial will show you how to use a style to vertically and