المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : Restoring Initial UI State



C# Programming
05-03-2013, 03:30 AM
The applications I write typically involve a lot of data entry, for use in a warehouse/manufacturing environment. Sometimes there can be many different fields, sometimes not so much. But I've always found it a bit tedious and time consuming to restore the UI to its initial state when the user saves an entry, for example.

I mean, a form could have buttons that are disabled initially, a few entry fields that are disabled at first waiting for other input, several input fields that need to be cleared, etc. What is the best method to go about resetting a form once the user is done? I've always just used "thisField.Enabled = false;" and "thatField.Text = string.Empty;" and so on. But is there a more efficient method for achieving this?
djj55: Nice but may have a permission problem
Pete O'Hanlon: He has my permission to run it.