프로젝트

일반

사용자정보

통계
| 브랜치(Branch): | 개정판:

markus / Markus.ImageComparer / CompareStatus.cs @ master

이력 | 보기 | 이력해설 | 다운로드 (1.78 KB)

1
using System;
2
using System.Collections.Generic;
3
using System.ComponentModel;
4
using System.Linq;
5
using System.Runtime.CompilerServices;
6
using System.Text;
7
using System.Threading.Tasks;
8

    
9
namespace Markus.Image
10
{
11
    public class CompareProgress : INotifyPropertyChanged
12
    {
13
        private string message;
14
        private double percentage;
15
        private CompareStatus status;
16

    
17
        public string Message { get => message;
18
            set
19
            {
20
                if (value != this.message)
21
                {
22
                    this.message = value;
23
                    NotifyPropertyChanged();
24
                }
25
            }
26
        }
27

    
28
        public double Percentage { get => percentage;
29
            set
30
            {
31
                if (value != this.percentage)
32
                {
33
                    this.percentage = value;
34
                    NotifyPropertyChanged();
35
                }
36
            }
37
        }
38

    
39
        public CompareStatus Status { get => status;
40
            set
41
            {
42
                if (value != this.status)
43
                {
44
                    this.status = value;
45
                    NotifyPropertyChanged();
46
                }
47
            }
48
        }
49

    
50
        public event PropertyChangedEventHandler PropertyChanged;
51

    
52
        // This method is called by the Set accessor of each property.  
53
        // The CallerMemberName attribute that is applied to the optional propertyName  
54
        // parameter causes the property name of the caller to be substituted as an argument.  
55
        private void NotifyPropertyChanged([CallerMemberName] String propertyName = "")
56
        {
57
            PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
58
        }
59
    }
60

    
61
    public enum CompareStatus
62
    {
63
        Loading = 0, Comparison = 1, Detection = 2
64
    }
65
}
클립보드 이미지 추가 (최대 크기: 500 MB)