Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
05/08/09 14:44:23 (15 years ago)
Author:
aleitner
Message:

Job details in Listview, Refresh-Button on Client refreshing and overlaying form on refresh (#600)

File:
1 edited

Legend:

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

    r1753 r1774  
    410410    private void JobClicked() {
    411411      plJobDetails.Visible = true;
     412      lvJobDetails.Items.Clear();
    412413      int i = 0;
    413414      while (jobs.List[i].Id.ToString() != nameCurrentJob) {
     
    424425      }
    425426
     427
     428
    426429      lblJobName.Text = currentJob.Id.ToString();
    427430      progressJob.Value = (int)(currentJob.Percentage * 100);
    428431      lblProgress.Text = (int)(currentJob.Percentage * 100) + "% calculated";
    429432      lblUserCreatedJob.Text = currentJob.UserId.ToString() + /* currentJob.User.Name + */ " created Job";
    430       lblJobCreated.Text = "Created at " + currentJob.DateCreated;
     433      //lblJobCreated.Text = "Created at " + currentJob.DateCreated;
     434      ListViewItem lvi = new ListViewItem();
     435      lvi.Text = "User:";
     436      lvi.SubItems.Add(currentJob.UserId.ToString());
     437      lvJobDetails.Items.Add(lvi);
     438
     439        lvi = null;
     440        lvi = new ListViewItem();
     441        lvi.Text = "created at:";
     442        lvi.SubItems.Add(currentJob.DateCreated.ToString());
     443        lvJobDetails.Items.Add(lvi);
     444
    431445      if (currentJob.ParentJob != null) {
    432         lblParentJob.Text = currentJob.ParentJob.Id + " is parent job";
    433       } else {
    434         lblParentJob.Text = "";
    435       }
    436       lblPriorityJob.Text = "Priority of job is " + currentJob.Priority;
     446        lvi = null;
     447        lvi = new ListViewItem();
     448        lvi.Text = "Parent job:";
     449        lvi.SubItems.Add(currentJob.ParentJob.ToString());
     450        lvJobDetails.Items.Add(lvi);
     451     // lblParentJob.Text = currentJob.ParentJob.Id + " is parent job";
     452      }// else {
     453      //  lblParentJob.Text = "";
     454      //}
     455
     456      lvi = null;
     457      lvi = new ListViewItem();
     458      lvi.Text = "Priority:";
     459      lvi.SubItems.Add(currentJob.Priority.ToString());
     460      lvJobDetails.Items.Add(lvi);
     461
     462     // lblPriorityJob.Text = "Priority of job is " + currentJob.Priority;
    437463      if (currentJob.Client != null) {
    438         lblClientCalculating.Text = currentJob.Client.Name + " calculated Job";
    439         lblJobCalculationBegin.Text = "Startet calculation at " + currentJob.DateCalculated;
     464        lvi = null;
     465        lvi = new ListViewItem();
     466        lvi.Text = "Calculation begin:";
     467        lvi.SubItems.Add(currentJob.DateCalculated.ToString());
     468        lvJobDetails.Items.Add(lvi);
     469
     470
     471        lvi = null;
     472        lvi = new ListViewItem();
     473        lvi.Text = "Client calculated:";
     474        lvi.SubItems.Add(currentJob.Client.Name.ToString());
     475        lvJobDetails.Items.Add(lvi);
     476
     477        //lblClientCalculating.Text = currentJob.Client.Name + " calculated Job";
     478        //lblJobCalculationBegin.Text = "Startet calculation at " + currentJob.DateCalculated;
    440479
    441480        if (currentJob.State == State.finished) {
     
    443482            ServiceLocator.GetJobManager();
    444483          ResponseObject<JobResult> jobRes = jobManager.GetLastJobResultOf(currentJob.Id, false);
    445           lblJobCalculationEnd.Text = "Calculation ended at " + jobRes.Obj.DateFinished;
     484         
     485          lvi = null;
     486          lvi = new ListViewItem();
     487          lvi.Text = "Calculation ended:";
     488          lvi.SubItems.Add(jobRes.Obj.DateFinished.ToString());
     489          lvJobDetails.Items.Add(lvi);
     490         // lblJobCalculationEnd.Text = "Calculation ended at " + jobRes.Obj.DateFinished;
    446491        }
    447492      } else {
    448         lblClientCalculating.Text = "";
    449         lblJobCalculationBegin.Text = "";
    450         lblJobCalculationEnd.Text = "";
     493       // lblClientCalculating.Text = "";
     494       // lblJobCalculationBegin.Text = "";
     495       // lblJobCalculationEnd.Text = "";
    451496      }
    452497      if (currentJob.State != State.offline) {
     
    912957    }
    913958
    914     private void refreshToolStripMenuItem_Click(object sender, EventArgs e) {
     959    private void Refresh_Click(object sender, EventArgs e) {
     960      Form overlayingForm = new Form();
     961      //Label loadingLabel = new Label();
     962      //loadingLabel.Text = "Loading";
     963      //loadingLabel.Font = new System.Drawing.Font("Microsoft Sans Serif", 20F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     964      //loadingLabel.Location = new Point(this.Width / 2, this.Height / 2);
     965      //overlayingForm.Controls.Add(loadingLabel);
     966
     967
     968      overlayingForm.Show();
     969      overlayingForm.FormBorderStyle = FormBorderStyle.None;
     970      overlayingForm.BackColor = Color.Gray;
     971      overlayingForm.Opacity = 0.4;
     972      overlayingForm.Size = this.Size;
     973      //overlayingForm.PointToClient(new Point(this.Left, this.Top));
     974      overlayingForm.Location = this.Location;
     975      Console.WriteLine(this.Left + ", " + this.Top);
     976      //overlayingForm.Left = this.Left;
     977      //overlayingForm.Top = this.Top;
     978
     979     
     980     
     981
     982
    915983      AddClients();
     984
     985      overlayingForm.Close();
    916986    }
    917987  }
Note: See TracChangeset for help on using the changeset viewer.