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