Beispiel #1
0
 public JobRow(ConVpxJobInfo job)
 {
     if ("Incomplete".Equals(job.Status))
     {
         job.StateDisplay = "未完成";
     }
     this.JOB = job;
     for (int i = 0; i < 6; i++)
     {
         if (i == 3)
         {
             TextAndImageCell tiCell = new TextAndImageCell();
             this.UpdateJobStatusColumn(tiCell, job, i);
         }
         else
         {
             base.Cells.Add(new DataGridViewTextBoxCell());
             base.Cells[i].Value = this.GetCellText(i);
         }
     }
 }
Beispiel #2
0
 private void UpdateJobStatusColumn(TextAndImageCell tiCell, ConVpxJobInfo job, int index)
 {
     if (job.State == 2)
     {
         long p = 0L;
         try
         {
             p = job.PercentComplete / 10L;
         }
         catch
         {
             p = 0L;
         }
         tiCell.Value = " " + job.PercentComplete.ToString() + "%";
         tiCell.Image = Images.GetProgressImage(p);
     }
     else
     {
         tiCell.Value = this.GetCellText(index);
         tiCell.Image = Images.GetImage16For(job);
     }
     base.Cells.Add(tiCell);
 }