I'm working on a project using a beaglebone/mono and I want to display inputs, outputs, alarms, etc all on a single datagridview. The problem is that the classes for these are quite different. I could just use separate classes and manually fill the DGV but I was thinking there should be a way to use an "info" class to contain all the other classes then use the "Info" class for filling controls.
About the only way i can think of to do this is to use a member of type "Object" to point to the actual classes so that the info class entries are all identical as far as the List<> and control are concerned. I'd then have to figure out which class "Object" is and extract the appropriate information when needed.
Is this a good approach or can someone suggest something more elegant. Don't need code necessarily, just a nudge in the right direction.
Thanks!
P.S. Using VS2013 or 2015
About the only way i can think of to do this is to use a member of type "Object" to point to the actual classes so that the info class entries are all identical as far as the List<> and control are concerned. I'd then have to figure out which class "Object" is and extract the appropriate information when needed.
Is this a good approach or can someone suggest something more elegant. Don't need code necessarily, just a nudge in the right direction.
Thanks!
P.S. Using VS2013 or 2015