public void DrawStatusIcon(int rowIndex, LicenseDataGridViewRow.Status status)
        {
            Program.Invoke(Program.MainWindow, delegate
            {
                SuspendLayout();
                try
                {
                    if (StatusImageColumn == null)
                    {
                        return;
                    }

                    if (rowIndex < 0 || rowIndex >= Rows.Count)
                    {
                        return;
                    }

                    var r = Rows[rowIndex];
                    if (StatusImageColumn.Index >= r.Cells.Count)
                    {
                        return;
                    }

                    DataGridViewCell cell = new DataGridViewImageCell
                    {
                        ValueIsIcon = true,
                        ValueType   = typeof(Bitmap),
                        Value       = new Bitmap(1, 1)
                    };

                    if (status == LicenseDataGridViewRow.Status.Information)
                    {
                        cell.Value = Resources._000_Alert2_h32bit_16;
                    }
                    if (status == LicenseDataGridViewRow.Status.Warning)
                    {
                        cell.Value = Resources._000_error_h32bit_16;
                    }
                    if (status == LicenseDataGridViewRow.Status.Ok)
                    {
                        cell.Value = Resources._000_Tick_h32bit_16;
                    }

                    if (r.Cells[StatusImageColumn.Index] is DataGridViewImageCell)
                    {
                        r.Cells[StatusImageColumn.Index] = cell;
                    }
                }
                finally
                {
                    ResumeLayout();
                }
            });
        }
 public void SetStatusIcon(int rowIndex, LicenseDataGridViewRow.Status status)
 {
     LicenseView.DrawStatusIcon(rowIndex, status);
 }
Ejemplo n.º 3
0
 public void SetStatusIcon(int rowIndex, LicenseDataGridViewRow.Status rowStatus)
 {
     View.DrawRowStatusIcon(rowIndex, rowStatus);
 }
 public void SetStatusIcon(int rowIndex, LicenseDataGridViewRow.Status status)
 {
     LicenseController.SetStatusIcon(rowIndex, status);
 }
Ejemplo n.º 5
0
 public void DrawRowStatusIcon(int rowIndex, LicenseDataGridViewRow.Status rowStatus)
 {
     checkableDataGridView.SetStatusIcon(rowIndex, rowStatus);
 }