WP has a great idea of using the already made Property Storage components and it would work nicely. One could simply
read the current values to be restored later...
There is an issue with those components and that is, they only offer a FILE method and offer no STREAM
method to direct properties in/out of a memory stream or any other stream that is compatible.
It would be nice if a stream could be introduced where as stream POSITION could also be used in a relative manner, incase
there are several to be streamed in order.
Just an idea, maybe someone here to add that as an enhancement
Alternate method for this particular case would be to create at runtime a background version of this
class and when you want to restore the working class to its defaults you could use the Assign!
So at startup..
BackUp := TMyComonpent.Create(….);
BackUp.Assign(CurentlyExistingTMyComponent);
----
Later on in code for a reset.
CurrentlyExistingTMyComponent.Assign(BackUp);
That should work, maybe