in C# there is an UPGRADE() option for the application settings which 'updates the settings to reflect a more recent installation of the application'. In other words, if I update the application it will attempt to restore the previous saved settings. And it does work fairly well.
I want to do the same thing with the Ultra WinToolBar settings. After searching around a bit I see there is an UPGRADE() method in the UltraWinToolbars.UltraToolbarsManager.UltraToolbarsManagerApplicationSettings which appears to be able to do the same thing (at least the description says it does). So how does one use this method? I've played around with it a bit, but I can never get it to 'upgrade' from the previous settings.
Anyone (or any infragistics folks) know how I can get this to work? Thanks in advance.
/Chimp (Tom)
It seems like this forum has formatting problem with code as the post has much more white space than there was when writing it.
Here is some code, I have done in my case based on ideas I get from the questions. That code is executed in the same block I upgrade regular configuration settings (those from Settings.settings file). As suggested at many places on the web, I uses a flag that tell me if the code is executed for the first time (after an upgrade) and execute the code in that case and then update the flag to indicate first time processing of settings has been done.
// FirstTime has a default of true
if (Properties.Settings.Default.FirstTime)
{
using
(System.ComponentModel.Component owner =
new System.ComponentModel.Component())
var tbms = new Infragistics.Win.UltraWinToolbars.
UltraToolbarsManager.UltraToolbarsManagerApplicationSettings(
owner,
"FormMain.mainToolbarManager");
tbms.Upgrade();
}
Properties.Settings.Default.FirstTime = false;
Tom,
What are you seeing as opposed to what are you expecting to see? Could you possibly post a small sample where you are using the Upgrade method for me to take a look at?
~Kim~