Free cookie consent management tool by TermsFeed Policy Generator

source: trunk/sources/HeuristicLab.CEDMA.Server/3.3/ExecuterView.cs @ 2273

Last change on this file since 2273 was 2094, checked in by gkronber, 16 years ago

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

File size: 1.0 KB
RevLine 
[2088]1using System;
2using System.Collections.Generic;
3using System.ComponentModel;
4using System.Drawing;
5using System.Data;
6using System.Linq;
7using System.Text;
8using System.Windows.Forms;
9using HeuristicLab.Core;
10
11namespace HeuristicLab.CEDMA.Server {
12  public partial class ExecuterView : ViewBase {
13    private ExecuterBase executer;
[2094]14    public ExecuterView(ExecuterBase executer)
15      : base() {
[2088]16      this.executer = executer;
17      InitializeComponent();
[2094]18      maxActiveJobs.Value = executer.MaxActiveJobs;
19      executer.Changed += (sender, args) => UpdateControls();
[2088]20    }
21
[2094]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      }
[2088]30    }
31
[2094]32    private void maxActiveJobs_ValueChanged(object sender, EventArgs e) {
[2088]33      executer.MaxActiveJobs = Convert.ToInt32(maxActiveJobs.Value);
34    }
35  }
36}
Note: See TracBrowser for help on using the repository browser.