Reputation: 7419
I am planing to develop desktop application that will have multiple logins and according to that login type options/From view will be displayed.
I have done database login part now its turn of view
How can i establish that what i have in my mind that
Upvotes: 1
Views: 103
Reputation: 8199
You need to make one form and make control visible/invisible or enable/disable control.
Create separate forms and display one by one as required
it will be very difficult for you to manage and extend in future.
Upvotes: 1
Reputation: 2727
For me it depends on numbers.
If u have many diffrent user roles and they share only a few controls then it would be easier to make diffrent form / panel for each user type. This approach is quite dangerous since when you want to change common control u would be forced to do it in all forms / panels.
Thats why i would recommend to group application logic into custom controls and then build GUI from them. For example: if you have two user types ( let's say boss and employee ) then you can build form with shared controls / logic and two user controls (bossControl, employeeControl) with functions for boss and employee. Then after login check you add matching user control to GUI.
Upvotes: 1
Reputation: 2214
You sound like you are new to C# forms programming. I suggest looking at some tutorials or a book like this Windows Forms Programming
Upvotes: 3