public static HardwareStatus GetHardwareStatus() { HardwareStatus status = new HardwareStatus(); zGetHardwareStatus(ref status); return(status); }
private void PopulateInfo() { // Hardware Status Info { HardwareStatus status = new HardwareStatus(); var dict = StructToDictionary(status, typeof(HardwareStatus)); foreach (var info in dict) { ListViewItem item = listInfo.Items.Add(info.Key); item.SubItems.Add(info.Value.ToString()); } } // Tasks Task[] tasks = dll.GetSchedulerTasks(); foreach (Task task in tasks) { var dict = StructToDictionary(task, typeof(Task)); var group = listTasks.Groups.Add(task.name, task.name); foreach (var info in dict) { var item = listTasks.Items.Add(info.Key); item.Group = group; item.SubItems.Add(info.Value.ToString()); } } }
private static extern void zGetHardwareStatus(ref HardwareStatus status);
public static HardwareStatus GetHardwareStatus() { HardwareStatus status = new HardwareStatus(); zGetHardwareStatus(ref status); return status; }