Last change
on this file since 4423 was
4423,
checked in by cneumuel, 14 years ago
|
- Refactored HL.Hive.Experiment. JobItems are not called HiveJobs and OptimizerJobs do not contain a hierarchy anymore.
- Dynamic generation of jobs on a slave are not reflected on the client user interface.
- Optimizer-Trees are now strictly synchronized with the HiveJob-Trees (also the ComputeInParallel property is taken into account when the Child HiveJobs are created)
- Improved the way a class can report progress and lock the UI (IProgressReporter, IProgress, Progress, ProgressView)
- Changes were made to the config-files, so that server and clients work with blade12.hpc.fh-hagenberg.at
- Lots of small changes and bugfixes
|
File size:
1.5 KB
|
Line | |
---|
1 | using System;
|
---|
2 | using System.Collections.Generic;
|
---|
3 | using System.Linq;
|
---|
4 | using System.Text;
|
---|
5 |
|
---|
6 | namespace HeuristicLab.Hive.Experiment {
|
---|
7 | public class Progress : IProgress {
|
---|
8 | private string status;
|
---|
9 | public string Status {
|
---|
10 | get {
|
---|
11 | return this.status;
|
---|
12 | }
|
---|
13 | set {
|
---|
14 | if (this.status != value) {
|
---|
15 | this.status = value;
|
---|
16 | OnStatusChanged();
|
---|
17 | }
|
---|
18 | }
|
---|
19 | }
|
---|
20 |
|
---|
21 | private double progressValue;
|
---|
22 | public double ProgressValue {
|
---|
23 | get {
|
---|
24 | return this.progressValue;
|
---|
25 | }
|
---|
26 | set {
|
---|
27 | if (this.progressValue != value) {
|
---|
28 | this.progressValue = value;
|
---|
29 | OnProgressChanged();
|
---|
30 | }
|
---|
31 | }
|
---|
32 | }
|
---|
33 |
|
---|
34 | public Progress() { }
|
---|
35 |
|
---|
36 | public Progress(string status) {
|
---|
37 | this.Status = status;
|
---|
38 | }
|
---|
39 |
|
---|
40 | public void Finish() {
|
---|
41 | OnFinished();
|
---|
42 | }
|
---|
43 |
|
---|
44 | #region Event Handler
|
---|
45 | public event EventHandler Finished;
|
---|
46 | private void OnFinished() {
|
---|
47 | var handler = Finished;
|
---|
48 | if (handler != null) handler(this, EventArgs.Empty);
|
---|
49 | }
|
---|
50 |
|
---|
51 | public event EventHandler StatusChanged;
|
---|
52 | private void OnStatusChanged() {
|
---|
53 | var handler = StatusChanged;
|
---|
54 | if (handler != null) handler(this, EventArgs.Empty);
|
---|
55 | }
|
---|
56 |
|
---|
57 | public event EventHandler ProgressValueChanged;
|
---|
58 | private void OnProgressChanged() {
|
---|
59 | var handler = ProgressValueChanged;
|
---|
60 | if (handler != null) handler(this, EventArgs.Empty);
|
---|
61 | }
|
---|
62 | #endregion
|
---|
63 | }
|
---|
64 | }
|
---|
Note: See
TracBrowser
for help on using the repository browser.