Plugin configuration

I’m trying to wrap my head around how to save/load my plugin’s configuration from XProtect (instead of storing it in my own file). I’ve been studying the Property plugin sample and here’s where I get lost:

If you use the LoadProperties/SaveProperties methods, those are only accessible when inheiting an appropriate class (ie SidePanelPlugin, OptionsDialogPlugin, etc). Furthermore, anything you save there is only accessible from that class. For example, you can’t do SaveProperties from an OptionsDialogPlugin and then expect to be able to do LoadProperties from the SidePanelPlugin and get your data.

I guess that’s by design. There is also example code for calling Configuration.Instance.SaveOptionsConfiguration that do allow you to load/save things globally. But there are comments stating that those are for sample only and that normally you shouldn’t use them.

Am I even looking in the right place? I want to save various settings in either the smart client options screen or possibly in the mgmt client and use those settings from various places (side panel, workspace, etc) in the smart client. Is there an item level configuration for plugins I should use instead?

Also, is it possbily to store anything besides a string key/value pair?

I do not remember why the comments was put in the sample. If you want a property that you write in one kind of plugin and read in another you will have to use Configuration.Instance.SaveOptionsConfiguration

I think, you are looking in the right place and the sample was developed to show this, despite the comment.

The alternative to storing properties is to store MIP Items, this you can explore in the Sensor Monitor sample. I am not sure they will fit your need better.