Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

add custom type in settings.settings

I would like to use configuration file .settings to save this struct:

struct sR22Protocole
{
    Int32 inputkey;
    Int32 outputkey;
    Int32 voltage;
    Int32 Ohm;
    Int32 Correction;
};

In the settings designer, I can add different type but it doesn't show my struct in the browse section. Is there any way that the designer has access to my struct? If no, Is there any way to add it programmaticaly?

like image 550
Mr.Alexz Avatar asked Sep 23 '13 19:09

Mr.Alexz


1 Answers

I believe the class (or struct?) must be able to be serialized to use in the settings file. I followed this blog post when I did this for a default object in an application:

http://www.blackwasp.co.uk/CustomAppSettings.aspx

like image 128
Matthew Avatar answered Sep 18 '22 06:09

Matthew