protected override void PrepareCellStyle(string colName, Connection job, C1Style cellStyle)
 {
     if (colName == nameof(Connection.Status) && job.Status == ConnectionStatus.Connected)
     {
         cellStyle.Color = C1Color.Green;
     }
 }
Beispiel #2
0
        protected override void PrepareCellStyle(string colName, Job job, C1Style cellStyle)
        {
            switch (colName)
            {
            case nameof(Job.Errors):
                cellStyle.BackgroundColor = job.Errors > 0 ? C1Color.Red : C1Color.Green;
                break;

            case nameof(Job.Status):
                cellStyle.BackgroundColor = job.Status switch
                {
                    ExecutionStatus.Failed => C1Color.Red,
                    ExecutionStatus.Running => C1Color.LightGreen,
                    ExecutionStatus.Waiting => C1Color.LightBlue,
                    ExecutionStatus.Executed => C1Color.Green,
                    _ => cellStyle.BackgroundColor
                };
                break;
            }
        }
    }
Beispiel #3
0
 protected override void PrepareCellStyle(string colName, Script job, C1Style cellStyle)
 {
 }
Beispiel #4
0
        public override void PrepareCellStyle(GridCellType cellType, GridCellRange range, C1Style style)
        {
            base.PrepareCellStyle(cellType, range, style);
            if (cellType != GridCellType.Cell)
            {
                return;
            }

            var    item    = (T)Grid.Rows[range.Row].DataItem;
            string colName = Grid.Columns[range.Column].Binding;

            if (colName == nameof(ICheckable.Checked))
            {
                if (item.Checked)
                {
                    style.BackgroundColor = C1Color.Gray;
                }

                return;
            }

            PrepareCellStyle(colName, item, style);
        }
Beispiel #5
0
 protected abstract void PrepareCellStyle(string colName, T job, C1Style cellStyle);
Beispiel #6
0
 protected override void PrepareCellStyle(string colName, Connection job, C1Style cellStyle)
 {
 }
Beispiel #7
0
 protected override void PrepareCellStyle(string colName, DataCapture job, C1Style cellStyle)
 {
 }
Beispiel #8
0
 protected override void PrepareCellStyle(string colName, NatsMessage job, C1Style cellStyle)
 {
 }