/ src / modules / Workspaces / WorkspacesEditor / Models / MonitorSetup.cs
MonitorSetup.cs
 1  // Copyright (c) Microsoft Corporation
 2  // The Microsoft Corporation licenses this file to you under the MIT license.
 3  // See the LICENSE file in the project root for more information.
 4  
 5  using System.ComponentModel;
 6  using System.Windows;
 7  
 8  namespace WorkspacesEditor.Models
 9  {
10      public class MonitorSetup : Monitor, INotifyPropertyChanged
11      {
12          public event PropertyChangedEventHandler PropertyChanged;
13  
14          public void OnPropertyChanged(PropertyChangedEventArgs e)
15          {
16              PropertyChanged?.Invoke(this, e);
17          }
18  
19          public string MonitorInfo => MonitorName;
20  
21          public string MonitorInfoWithResolution => $"{MonitorName}    {MonitorDpiAwareBounds.Width}x{MonitorDpiAwareBounds.Height}";
22  
23          public MonitorSetup(string monitorName, string monitorInstanceId, int number, int dpi, Rect dpiAwareBounds, Rect dpiUnawareBounds)
24              : base(monitorName, monitorInstanceId, number, dpi, dpiAwareBounds, dpiUnawareBounds)
25          {
26          }
27  
28          public MonitorSetup(MonitorSetup other)
29              : base(other.MonitorName, other.MonitorInstanceId, other.MonitorNumber, other.Dpi, other.MonitorDpiAwareBounds, other.MonitorDpiUnawareBounds)
30          {
31          }
32      }
33  }