source: trunk/CrypPlugins/P2PEditor/Distributed/DistributedJobStatus.cs @ 2081

Last change on this file since 2081 was 1727, checked in by Paul Lelgemann, 11 years ago

+ P2PEditor can display the status of jobs, if available; Participating displays overlay while loading workspace data
+ KeySearcher can upload status for P2PEditor display

File size: 1.2 KB
Line 
1using System;
2using System.ComponentModel;
3
4namespace Cryptool.P2PEditor.Distributed
5{
6    public class DistributedJobStatus : INotifyPropertyChanged
7    {
8        public enum Status : byte
9        {
10            New = 0,
11            Active = 1,
12            Finished = 2
13        };
14
15        public Status CurrentStatus { get; set; }
16
17        private long participants;
18        public long Participants
19        {
20            get { return participants; }
21            set
22            {
23                if (value == participants) return;
24                participants = value;
25                OnPropertyChanged("Participants");
26            }
27        }
28
29        public double Progress { get; set; }
30
31        public DateTime StartDate { get; set; }
32
33        public DistributedJobStatus()
34        {
35            Participants = 0;
36        }
37
38        #region INotifyPropertyChanged Members
39
40        public event PropertyChangedEventHandler PropertyChanged;
41
42        private void OnPropertyChanged(string propertyName)
43        {
44            if (PropertyChanged != null)
45                PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
46        }
47
48        #endregion
49    }
50}
Note: See TracBrowser for help on using the repository browser.