Пример #1
0
        public static HardwareStatus GetHardwareStatus()
        {
            HardwareStatus status = new HardwareStatus();

            zGetHardwareStatus(ref status);
            return(status);
        }
Пример #2
0
        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());
                }
            }
        }
Пример #3
0
 private static extern void zGetHardwareStatus(ref HardwareStatus status);
Пример #4
0
 public static HardwareStatus GetHardwareStatus()
 {
     HardwareStatus status = new HardwareStatus();
     zGetHardwareStatus(ref status);
     return status;
 }
Пример #5
0
 private static extern void zGetHardwareStatus(ref HardwareStatus status);