private void GetMonitorName(int number)
 {
     if (OS.IsVistaOrLater)
     {
         using (var hlMonitor = new HighLevelMonitor(HMonitor))
         {
             if (hlMonitor.PhysicalMonitors.Count > 0)
             {
                 Name = hlMonitor.PhysicalMonitors.First().Description;
             }
             else
             {
                 Name = "Monitor " + number;
             }
         }
     }
     // fallback
     Name = "Monitor " + number;
 }
Example #2
0
 private void GetMonitorName(int number)
 {
     if (OS.IsVistaOrLater)
     {
         using (var hlMonitor = new HighLevelMonitor(HMonitor))
         {
             if (hlMonitor.PhysicalMonitors.Count > 0)
             {
                 Name = hlMonitor.PhysicalMonitors.First().Description;
             }
             else
             {
                 Name = "Monitor " + number;
             }
         }
     }
     // fallback
     Name = "Monitor " + number;
 }
Example #3
0
 public MonitorVM(Monitor monitor)
 {
     _monitor = monitor;
     _hlaMonitor = new HighLevelMonitor(_monitor.HMonitor);
 }
Example #4
0
 protected override void Dispose(bool disposing)
 {
     _hlaMonitor.Dispose();
     _hlaMonitor = null;
     base.Dispose(true);
 }