Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
06/25/09 12:46:44 (15 years ago)
Author:
gkronber
Message:

Fixed updating of executer and dispatcher views and renamed ServerForm to ServerView. #676 (Cockpit for the CEDMA Server to control algorithm settings)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.CEDMA.Server/3.3/ExecuterView.cs

    r2088 r2094  
    1212  public partial class ExecuterView : ViewBase {
    1313    private ExecuterBase executer;
    14     public ExecuterView(ExecuterBase executer) {
     14    public ExecuterView(ExecuterBase executer)
     15      : base() {
    1516      this.executer = executer;
    1617      InitializeComponent();
    17       refreshTimer.Enabled = true;
     18      maxActiveJobs.Value = executer.MaxActiveJobs;
     19      executer.Changed += (sender, args) => UpdateControls();
    1820    }
    1921
    20     private void refreshTimer_Tick(object sender, EventArgs e) {
    21       jobsList.DataSource = executer.GetJobs();
     22    protected override void UpdateControls() {
     23      if (InvokeRequired) Invoke((Action)UpdateControls);
     24      else {
     25        base.UpdateControls();
     26        maxActiveJobs.Value = executer.MaxActiveJobs;
     27        jobsList.DataSource = executer.GetJobs();
     28        jobsList.Refresh();
     29      }
    2230    }
    2331
    24     private void maxActiveJobsUpDown_ValueChanged(object sender, EventArgs e) {
     32    private void maxActiveJobs_ValueChanged(object sender, EventArgs e) {
    2533      executer.MaxActiveJobs = Convert.ToInt32(maxActiveJobs.Value);
    2634    }
Note: See TracChangeset for help on using the changeset viewer.