Click here to Skip to main content
15,919,028 members
Home / Discussions / C#
   

C#

 
GeneralRe: EDIT MENU + CUT, COPY, PASTE Pin
emran8343-Feb-06 17:20
emran8343-Feb-06 17:20 
QuestionGet a controll fully customized Pin
Sasuko2-Feb-06 10:22
Sasuko2-Feb-06 10:22 
AnswerRe: Get a controll fully customized Pin
Ingo3-Feb-06 2:14
Ingo3-Feb-06 2:14 
QuestionTo know which file was opened by an application. Pin
yjoo93172-Feb-06 10:13
yjoo93172-Feb-06 10:13 
AnswerRe: To know which file was opened by an application. Pin
malharone2-Feb-06 11:11
malharone2-Feb-06 11:11 
GeneralRe: To know which file was opened by an application. Pin
yjoo93172-Feb-06 11:26
yjoo93172-Feb-06 11:26 
GeneralRe: To know which file was opened by an application. Pin
Dave Kreskowiak2-Feb-06 15:40
mveDave Kreskowiak2-Feb-06 15:40 
QuestionValidation of WinForm Data Pin
Wayne Phipps2-Feb-06 9:51
Wayne Phipps2-Feb-06 9:51 
Hi There,

I want to be able to validate data entered by a user onto a form.

Different fields will have different validation requirements.

As an example, a text box may only allow numeric, alpha or alpha numeric entry and/or may have limitations on length or value.

I thought about inheriting a control from one of the standard forms controls and adding the validation code required but was thinking that this would make the application heavier than necessary because certain fields only require certain validation.

I wanted a way to add validation only where required so thought of creating a validator object which could have various validationRule objects added as required.

The validator could respond to events like textChanged on a text box and where it would then check the rules that had been applied.

I thought that the validationRule object would be either abstract or impliment specific interface.

I like the GOF 'Chain of Responsibility' pattern as a way of getting the rule objects to respond to a message from the validator however, I don't know how to ensure that all the rule objects have received/responded to the message.

Does this concept make sense? Is this the best way to go about validating user input? Is this pattern appropriate in this example?


Your thoughts/ideas/comments appreciated.


Regards

Wayne Phipps
____________

Time is the greatest teacher... unfortunately, it kills all of its students
View my Blog

QuestionPixel size of frame and control changed Pin
xjsun2-Feb-06 9:35
xjsun2-Feb-06 9:35 
AnswerRe: Pixel size of frame and control changed Pin
malharone2-Feb-06 11:15
malharone2-Feb-06 11:15 
GeneralRe: Pixel size of frame and control changed Pin
xjsun7-Feb-06 8:09
xjsun7-Feb-06 8:09 
GeneralRe: Pixel size of frame and control changed Pin
malharone7-Feb-06 8:11
malharone7-Feb-06 8:11 
Questionthread safe calls Pin
Manu_812-Feb-06 8:37
Manu_812-Feb-06 8:37 
AnswerRe: thread safe calls Pin
kasik2-Feb-06 9:35
kasik2-Feb-06 9:35 
GeneralRe: thread safe calls Pin
eligazit2-Feb-06 10:50
eligazit2-Feb-06 10:50 
GeneralRe: thread safe calls Pin
kasik2-Feb-06 11:01
kasik2-Feb-06 11:01 
GeneralRe: thread safe calls Pin
kasik2-Feb-06 11:19
kasik2-Feb-06 11:19 
GeneralRe: thread safe calls Pin
Dave Kreskowiak2-Feb-06 15:29
mveDave Kreskowiak2-Feb-06 15:29 
GeneralRe: thread safe calls Pin
kasik3-Feb-06 2:26
kasik3-Feb-06 2:26 
GeneralRe: thread safe calls Pin
Dave Kreskowiak3-Feb-06 3:07
mveDave Kreskowiak3-Feb-06 3:07 
GeneralRe: thread safe calls Pin
eligazit2-Feb-06 20:42
eligazit2-Feb-06 20:42 
GeneralRe: thread safe calls Pin
kasik3-Feb-06 2:32
kasik3-Feb-06 2:32 
Questiontransferring vb.net solution to c#.net Pin
kourvoisier2-Feb-06 8:34
kourvoisier2-Feb-06 8:34 
AnswerRe: transferring vb.net solution to c#.net Pin
malharone2-Feb-06 11:19
malharone2-Feb-06 11:19 
GeneralRe: transferring vb.net solution to c#.net Pin
kourvoisier2-Feb-06 11:20
kourvoisier2-Feb-06 11:20 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.