Exemplo n.º 1
0
        public DesktopDisplayDifference Compare(DesktopDisplayMetrics other)
        {
            DesktopDisplayDifference difference = DesktopDisplayDifference.Same;

            if (this.monitorResolutions.Count != other.monitorResolutions.Count)
            {
                difference |= DesktopDisplayDifference.MonitorCount;
            }

            return(difference);
        }
Exemplo n.º 2
0
        public static DesktopDisplayMetrics AcquireMetrics()
        {
            DesktopDisplayMetrics metrics = new DesktopDisplayMetrics();

            var displays = Display.GetDisplays();

            foreach (var display in displays)
            {
                metrics.SetMonitor(display.DeviceName, display);
            }
            return(metrics);
        }
Exemplo n.º 3
0
 public int GetHashCode(DesktopDisplayMetrics obj)
 {
     return(obj.key.GetHashCode());
 }