LibCecSharp: more cosmetics
[deb_libcec.git] / src / cec-config-gui / actions / ShowDeviceInfo.cs
index df8b4d144799e533b198e95c65ebc470af54d1f0..8e6a48de71cbb42b8e07648ce80c7d1181746e5b 100644 (file)
@@ -1,7 +1,4 @@
-using System;
-using System.Collections.Generic;
-using System.Text;
-using CecSharp;
+using CecSharp;
 
 namespace CecConfigGui.actions
 {
@@ -14,6 +11,14 @@ namespace CecConfigGui.actions
       Address = address;
     }
 
+    public virtual void ShowDialog(CecConfigGUI gui, CecLogicalAddress address, ref LibCecSharp lib,
+      bool devicePresent, CecVendorId vendor, bool isActiveSource, ushort physicalAddress,
+      CecVersion version, CecPowerStatus power, string osdName, string menuLanguage)
+    {
+      DeviceInformation di = new DeviceInformation(Gui, Address, ref Lib, devicePresent, vendor, isActiveSource, physicalAddress, version, power, osdName, menuLanguage);
+      Gui.DisplayDialog(di, false);
+    }
+
     public override void Process()
     {
       CecVendorId vendor = CecVendorId.Unknown;
@@ -63,8 +68,7 @@ namespace CecConfigGui.actions
       SendEvent(UpdateEventType.ProgressBar, 90);
       SendEvent(UpdateEventType.ProcessCompleted, true);
 
-      DeviceInformation di = new DeviceInformation(Gui, Address, ref Lib, devicePresent, vendor, isActiveSource, physicalAddress, version, power, osdName, menuLanguage);
-      Gui.DisplayDialog(di, false);
+      ShowDialog(Gui, Address, ref Lib, devicePresent, vendor, isActiveSource, physicalAddress, version, power, osdName, menuLanguage);
 
       SendEvent(UpdateEventType.StatusText, "Ready.");
       SendEvent(UpdateEventType.ProgressBar, 100);