summaryrefslogtreecommitdiffstats
path: root/win/CS/HandBrakeWPF/Services
diff options
context:
space:
mode:
authorsr55 <[email protected]>2019-06-06 15:35:02 +0100
committersr55 <[email protected]>2019-06-06 15:35:02 +0100
commit20aa33df6fa9e9ea488fb495424a088f584032a8 (patch)
tree78310f5b331a7f4cd3bbe4706f2693d136da82f4 /win/CS/HandBrakeWPF/Services
parent9532ed2edfa915fd023e481d87b546562a7c80a1 (diff)
WinGui: Don't show encoder options when Fallback = None and a passthru encoder is selected on the Audio Defaults screen. Also add the ? as the MacGui has. #2135
Diffstat (limited to 'win/CS/HandBrakeWPF/Services')
-rw-r--r--win/CS/HandBrakeWPF/Services/PowerService.cs36
1 files changed, 36 insertions, 0 deletions
diff --git a/win/CS/HandBrakeWPF/Services/PowerService.cs b/win/CS/HandBrakeWPF/Services/PowerService.cs
new file mode 100644
index 000000000..9239a2cd2
--- /dev/null
+++ b/win/CS/HandBrakeWPF/Services/PowerService.cs
@@ -0,0 +1,36 @@
+// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="PowerService.cs" company="HandBrake Project (http://handbrake.fr)">
+// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.
+// </copyright>
+// <summary>
+// The Error Service
+// </summary>
+// --------------------------------------------------------------------------------------------------------------------
+
+
+namespace HandBrakeWPF.Services
+{
+ using System;
+ using System.Management;
+
+ public class PowerService
+ {
+ private void GetPowerState()
+ {
+
+ System.Management.ObjectQuery query = new ObjectQuery("Select * FROM Win32_Battery");
+ ManagementObjectSearcher searcher = new ManagementObjectSearcher(query);
+
+ ManagementObjectCollection collection = searcher.Get();
+
+ foreach (ManagementObject mo in collection)
+ {
+ foreach (PropertyData property in mo.Properties)
+ {
+ Console.WriteLine("Property {0}: Value is {1}", property.Name, property.Value);
+ }
+ }
+
+ }
+ }
+}