I have create a HwndSource who will host a WPF TextBox control and set it on topmost, then popup it when user double clicks on the node. Please refer to the following code: Code highlighting produced by Actipro CodeHighlighter
It won‘t be easy You‘ll think it strange When I try to explain how I fell That I still need your love After all that I‘ve done You won‘t believe me All you will say it‘s a girl You once knew Although she‘s dressed up to the night At
首先,先介紹下如何屏蔽Winform的關閉按鈕,就是在點關閉時,並不是直接關閉程式,而是提示是否真的關閉或者最小化。前段時間要實現這個功能,所以就在網上搜羅了下。Winform的關閉操作其實是發一個關閉的訊息。所以,要想不關閉視窗,只要截獲這個訊息就可以了。那麼如何截獲呢?可以用WndProc來得到並處理Window系統登出或關閉的訊息:Code highlighting produced by Actipro CodeHighlighter
曾迷惑於什麼是設計,設計文檔應該要多詳細, 具體可見之前的隨筆:想探討兩個關於設計文檔問題 和大家討論過一番後還是不得要領。最近讀了下面2段內容,頗有感受,遂載錄之:In the pages that follow, we will often talk about "The Design." You should not take that to mean a set of UML diagrams separate from the code. A set of UML diagrams
以下代碼源自於真實項目,本人只是做了一點簡化,大家來找碴,看看哪些地方不妥:-)PathedObjectCode highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--> public class PathedObject { public PathedObject(object obj) { Object =