Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
04/30/09 13:23:40 (15 years ago)
Author:
aleitner
Message:

JobDetails and Images for job fixed (#600)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Hive.Server.Console/3.2/HiveServerManagementConsole.cs

    r1657 r1717  
    395395      lvSnapshots.Enabled = true;
    396396      currentJob = jobs.List[i];
    397       pbJobControl.Image = ilLargeImgJob.Images[0];
     397      if (currentJob.State == State.offline) {
     398        pbJobControl.Image = ilLargeImgJob.Images[2];
     399      } else if (currentJob.State == State.calculating) {
     400        pbJobControl.Image = ilLargeImgJob.Images[1];
     401      } else if (currentJob.State == State.finished) {
     402        pbJobControl.Image = ilLargeImgJob.Images[0];
     403      }
    398404      lblJobName.Text = currentJob.Id.ToString();
    399405      progressJob.Value = (int)(currentJob.Percentage * 100);
     
    455461            if (state == State.finished) {
    456462              lvJobControl.Items[i].Group = jobGroup[1];
     463              lvJobControl.Items[i].ImageIndex = 0;
    457464              System.Diagnostics.Debug.WriteLine("finished");
    458465            } else if (state == State.calculating) {
    459466              lvJobControl.Items[i].Group = jobGroup[0];
     467              lvJobControl.Items[i].ImageIndex = 1;
    460468              System.Diagnostics.Debug.WriteLine("calculating");
    461469            } else if (state == State.offline) {
    462470              lvJobControl.Items[i].Group = jobGroup[2];
     471              lvJobControl.Items[i].ImageIndex = 2;
    463472              System.Diagnostics.Debug.WriteLine("offline");
    464473
     
    469478      } else if (change.ChangeType == Change.Create) {
    470479        ListViewItem lvi = new ListViewItem(
    471           change.ID.ToString(), 0, jobGroup[2]);
     480          change.ID.ToString(), 2, jobGroup[2]);
    472481        jobObjects.Add(change.ID, lvi);
    473482        lvJobControl.Items.Add(lvi);
     
    768777
    769778            found = true;
     779            bool change = false;
     780            if (job.State != jobold.State) {
     781              change = true;
     782            }
    770783            if (job.State != State.offline) {
    771784              if ((!IsEqual(job.Client, jobold.Client)) || (job.State != jobold.State)
    772785                   || (job.Percentage != jobold.Percentage)) {
    773                 changes.Add(new Changes { Types = Type.Job, ID = job.Id, ChangeType = Change.Update, Position = i });
     786                change = true;
    774787              }
    775788            } else if (job.DateCalculated != jobold.DateCalculated) {
     789              change = true;
     790            }
     791            if (change) {
    776792              changes.Add(new Changes { Types = Type.Job, ID = job.Id, ChangeType = Change.Update, Position = i });
    777793            }
Note: See TracChangeset for help on using the changeset viewer.