最近協助朋友寫了個小軟體,涉及到不同使用者的不同許可權設計問題.因為看到很多朋友問如何在WinForm下做使用權限設定,所以將代碼貼出來,供大家參考完善.這些代碼的特點是設定與運用許可權不必事先將功能表項目手工存入資料庫,系統會跟據主視窗菜單的變自化動儲存功能表項目到資料庫中. (1)取主表單功能表項目,依據不同使用者以樹形顯示,並存入資料庫,代碼如下: public partial class UserRightSet : Form {
首先要有.net2.0或3.5都可以.然後下載NUnit(msi),版本無所謂.NUnit官方網站上有最新版本2.5.1. 安裝完後,在vs2005或2008中建立一個項目HelloNUnitTest(項目類型無所謂,僅作測試用). 然後編寫一個函數Add,實現最普通的加法運算.CodeCode highlighting produced by Actipro CodeHighlighter
codeprojectDownload source files - 65.3 Kb Download demo project - 88.8 Kb IntroductionThis article presents a library that enables a programmer to store and retrieve security credentials from a back-end database. The classes in the library also
In this article I will show you how you can unit test your events. I will show you a simple technique that will enable you to test if your events fire exactly as often as you want them to and I will provide you with two implementations. One
前不久看了黎波的一篇關於手機拍照識別二維碼的文章,的確受益匪淺,然後從CodeProject上面下載了該例子的原始碼,你可能會遇到如下調試時的問題,今天我在這裡跟大家分享一下我的解決思路和辦法把。 問題一:調試Winform平台的例子時出現如下提示:Error 'ThoughtWorks.QRCode.Properties.Resources' does not contain a definition for
Download source - 2.35 MB IntroductionIn this article, I will briefly describe the functionalities of the QRCode library. BackgroundQRCode library is a .NET component that can be used to encode and decode QRCode. QRCode is a 2 dimensional bar code