Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
10/09/11 01:47:51 (13 years ago)
Author:
ascheibe
Message:

#1233 server can now control the slave heartbeat interval

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Administrator/3.3/Views/SlaveView.cs

    r6688 r6893  
    6161        txtFreeMemory.Clear();
    6262        txtId.Clear();
     63        txtHbIntervall.Clear();
    6364      } else {
    6465        if (Content.GetType() == typeof(Slave)) {
     
    6667          Slave ct = (Slave)Content;
    6768          txtName.Text = ct.Name;
     69          txtHbIntervall.Text = ct.HbInterval.ToString();
    6870          txtCPU.Text = string.Format("{0} Cores @ {1} Mhz, Arch.: {2}", ct.Cores.ToString(), ct.CpuSpeed.ToString(), ct.CpuArchitecture.ToString());
    6971          txtDetailsDescription.Text = ct.Description;
     
    7779          SlaveGroup ct = (SlaveGroup)Content;
    7880          txtName.Text = ct.Name;
     81          txtHbIntervall.Text = ct.HbInterval.ToString();
    7982          ShowSlaveUI(false);
    8083        } else {
     
    113116      }
    114117    }
     118
     119    private void txtHbIntervall_TextChanged(object sender, EventArgs e) {
     120      if (Content != null) {
     121        if (txtHbIntervall.Text.Length > 0) {
     122          try {
     123            int interval = int.Parse(txtHbIntervall.Text);
     124            Content.HbInterval = interval;
     125          }
     126          catch (Exception ex) {
     127            MessageBox.Show("Please enter a numeric value for the Heartbeat Interval.", "HeuristicLab Hive Administrator", MessageBoxButtons.OK, MessageBoxIcon.Error);
     128            txtHbIntervall.Text = "0";
     129          }
     130        }
     131      }
     132    }
    115133  }
    116134}
Note: See TracChangeset for help on using the changeset viewer.