Do you have a ResetDefault() function to handle messed up user settings?
Last updated by Brady Stroud [SSW] 10 months ago.See historyIn development life cycle, developers always have different settings to the user's settings. Because of this, debug settings won't always work on the remote machine.
In order to have settings.config, we also have a defaults.config. This is good because this gives a chance for the user to roll back bad settings without reinstalling the application. The application can also roll back the settings it automatically. Below is the code that what we do.
VB.NET
Public Sub RuneXtremeEmail(ByVal state As Object)
If Environment.MachineName <> Configuration.MachineName Then
resetSettings()
Else
End
We have a program called SSW Code Auditor to check for this rule.
We have a program called SSW .NET Toolkit that implements this rule.
Note: in Access we do like this
Private Sub Form_Load()
If Nz(DLookup("CurrentComputerName", "ControlLocal", "ID=1"), "") <> CurrentComputerName
Then
Me.ctlCurrentComputerName.Value = CurrentComputerName
Else ...