private void updateLbox() { Dictionary <String, Dictionary <String, String> > result = new Dictionary <String, Dictionary <String, String> >(); result = WMIGetter.select("SELECT * FROM Meta_Class"); foreach (String key in result.Keys) { lbClasses.Items.Add(key.Substring(key.IndexOf(":") + 1)); } }
private void updateLViewInstances(String query) { Cursor = Cursors.WaitCursor; result = WMIGetter.select(query); if (result.Count == 0) { Cursor = Cursors.Default; return; } foreach (String column in result[result.ElementAt(0).Key].Keys) { lvInstances.Columns.Add(column); } foreach (Dictionary <String, String> entry in result.Values) { ListViewItem lvi = new ListViewItem(entry.Values.ToArray()); lvInstances.Items.Add(lvi); } Cursor = Cursors.Default; }