Let's say I have a form with some text boxes and combo boxes on it and some of these are required controls to be filled out before we let the OK button on the form to get enabled.
So one way is to have a centralized method like EnableOK() method that checks if those required combobxes and text boxes are filled out or not...and then I have to go on TextChanged or IndexChanged events of those required controls call this EnableOK() method.
So I was thinking if there is better way of doing this? maybe there is a pattern we can use? so that I won't have to call EnableOk() in every place,or maybe there is not a better way and that's the way every body else is doing it?
P.S: I am using C# Winforms.