to use or not to use... (a separate class)
I am wondering into the vast realms of learning to program... or at least trying to anyway. Actually I did a little way back when I was a student but most of the stuff I learnt each day... was drunk away each night at the SU bar.
Anyway back to the questions. I have two forms. One is the main form and the other is a login dialogue box. Now I have a bit of a quandry. On the click of a button in the login form, I either need to somehow pass the username and password back to the main form for validation or else I need to create a third class to pass the username and password into in order to retrieve the login information. Firstly I am not so sure if thats a great way to go about it since it seems a bit convoluted but I suppose I could create a login class and do a bunch of other stuff in there anyway. Anyway if I were to do it this way, it brings up another question. I realise that I would need to put a call from the original main form class to a login_details method or two somewhere in the new login class in order to get a return value from the login class. How would I trigger this event to happen from the main form after the login_dialogue form has completed and passed over the details to the login class without needing some kind of user prompted event (button click etc) in the main form to trigger it. The reason I need info returned to the main form is that after the validation and stuff, the main form changes depending on what permissions are given to the logged in user.
Hopefully that all makes sense. but you know how it is... hehe