Example #1
0
 private void EmitLogicalDeviceToGrid(HardwareChannel.HardwareConstants.ChannelTypes ct, int logicalID, LogicalChannel lc)
 {
     string[] row = { ct.ToString(),
                      logicalID.ToString(),
                      lc.Name,
                      lc.Description,
                      lc.HardwareChannel.ToString() };
     logicalDevicesDataGridView.Rows.Add(row);
 }
        private void EmitLogicalDeviceToGrid(HardwareChannel.HardwareConstants.ChannelTypes ct, int logicalID, LogicalChannel lc)
        {
            //ToDo: Edit to include channel's ordering group
            string[] row = { ct.ToString(),
                             logicalID.ToString(),
                             lc.Name,
                             lc.Description,
                             lc.HardwareChannel.ToString(),
                             lc.OrderingGroup };
            logicalDevicesDataGridView.Rows.Add(row);

            //Change row's color if the channel is one that is supposed to turn off if AI check fails
            int rowNum = logicalDevicesDataGridView.Rows.Count - 1;

            if (Storage.settingsData.ChannelsToTurnOff[ct].ContainsKey(logicalID))
            {
                logicalDevicesDataGridView.Rows[rowNum].DefaultCellStyle.BackColor = System.Drawing.Color.LightSlateGray;
            }
        }