I'm building an InfoPath form that is going to query the users system using WMI so that we can start to do an inventory of a users systems and submit that information to SharePoint.
I'm using the WMI code creator tool from Microsoft to get my code samples in C#. I've got the code to work for me so far, but it's starting to look really ugly. i know there's got to be a way to clean up the code. Unfortunately I'm not a code person, I just pick code samples and beat them up until i get them to work, but have no finesse, if someone could help me clean up the code a bit i would really appreciate it.
here's the code (I'm going to be querying a bunch more hardware so i wanted to get this cleaned up early on, once i see how it's done I could work on it from there.)
using
//using System.Windows.Forms;
namespace
{
EventManager.FormEvents.Loading +=
}
xnMyForm.SelectSingleNode(
Any help is appreciated!!!!!