X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Fcec-config-gui%2Factions%2FShowDeviceInfo.cs;h=628d4a9829a44d24faa3b4dcff8804b83976650e;hb=b113b95ac84c2dd99d82ecc7c8dfbc296209bf23;hp=61dd35f6461cde35b51914342ec65411c1b7ccb2;hpb=96fa7764c1af5034afaba2646831df0a74419249;p=deb_libcec.git diff --git a/src/cec-config-gui/actions/ShowDeviceInfo.cs b/src/cec-config-gui/actions/ShowDeviceInfo.cs index 61dd35f..628d4a9 100644 --- a/src/cec-config-gui/actions/ShowDeviceInfo.cs +++ b/src/cec-config-gui/actions/ShowDeviceInfo.cs @@ -7,12 +7,21 @@ namespace CecConfigGui.actions { class ShowDeviceInfo : UpdateProcess { - public ShowDeviceInfo(ref LibCecSharp lib, CecLogicalAddress address) + public ShowDeviceInfo(CecConfigGUI gui, ref LibCecSharp lib, CecLogicalAddress address) { + Gui = gui; Lib = lib; 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; @@ -60,14 +69,15 @@ namespace CecConfigGui.actions SendEvent(UpdateEventType.StatusText, "Showing device information"); SendEvent(UpdateEventType.ProgressBar, 90); + SendEvent(UpdateEventType.ProcessCompleted, true); - DeviceInformation di = new DeviceInformation(Address, ref Lib, devicePresent, vendor, isActiveSource, physicalAddress, version, power, osdName, menuLanguage); - di.ShowDialog(); + ShowDialog(Gui, Address, ref Lib, devicePresent, vendor, isActiveSource, physicalAddress, version, power, osdName, menuLanguage); SendEvent(UpdateEventType.StatusText, "Ready."); SendEvent(UpdateEventType.ProgressBar, 100); } + private CecConfigGUI Gui; private LibCecSharp Lib; private CecLogicalAddress Address; }