11using CodectoryCore . UI . Wpf ;
22using System ;
33using System . Collections . Generic ;
4+ using System . Drawing ;
45using System . Linq ;
56using System . Text ;
67using System . Threading . Tasks ;
@@ -17,11 +18,6 @@ public class Monitor : BaseViewModel
1718 private string _name ;
1819 public string Name { get => _name ; set { _name = value ; OnPropertyChanged ( ) ; } }
1920
20- private string _caption ;
21- public string Caption { get => _caption ; set { _caption = value ; OnPropertyChanged ( ) ; } }
22-
23- private string _deviceID ;
24- public string DeviceID { get => _deviceID ; set { _deviceID = value ; OnPropertyChanged ( ) ; } }
2521
2622 private UInt32 _uid ;
2723 public UInt32 UID { get => _uid ; set { _uid = value ; OnPropertyChanged ( ) ; } }
@@ -30,21 +26,29 @@ public class Monitor : BaseViewModel
3026
3127 public bool HDRState { get => _hdrState ; set { _hdrState = value ; OnPropertyChanged ( ) ; } }
3228
33- public Monitor ( string name , string caption , string deviceID , UInt32 uid )
34- {
35- Name = name ?? throw new ArgumentNullException ( nameof ( name ) ) ;
36- Caption = caption ?? throw new ArgumentNullException ( nameof ( caption ) ) ;
37- DeviceID = deviceID ?? throw new ArgumentNullException ( nameof ( deviceID ) ) ;
38- UID = uid ;
39- UpdateHDRState ( ) ;
40- }
29+
30+ private Size _resolution ;
31+ public Size Resolution { get => _resolution ; set { _resolution = value ; OnPropertyChanged ( ) ; } }
32+
33+
34+ private int _refreshRate ;
35+
36+ public int RefreshRate { get => _refreshRate ; set { _refreshRate = value ; OnPropertyChanged ( ) ; } }
4137
4238 private Monitor ( )
4339 {
4440
4541
4642 }
4743
44+ public Monitor ( string name , uint uID , Size resolution , int refreshRate )
45+ {
46+ Name = name ?? throw new ArgumentNullException ( nameof ( name ) ) ;
47+ UID = uID ;
48+ Resolution = resolution ;
49+ RefreshRate = refreshRate ;
50+ }
51+
4852 public void UpdateHDRState ( )
4953 {
5054 HDRState = HDRController . GetHDRState ( UID ) ;
0 commit comments