X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Fcec-config-gui%2FDeviceInformation.cs;h=2900ab31e164187611e9db19fb4495fb7fb0f5a8;hb=5de1dde470c394fc45791fbb747fdf8ad6e73b2a;hp=d340e4774f1805fed5c87bf1c9595827521e33bd;hpb=ece1582ec85912aebc8f87c0dca015ae62b29331;p=deb_libcec.git diff --git a/src/cec-config-gui/DeviceInformation.cs b/src/cec-config-gui/DeviceInformation.cs index d340e47..2900ab3 100644 --- a/src/cec-config-gui/DeviceInformation.cs +++ b/src/cec-config-gui/DeviceInformation.cs @@ -9,7 +9,7 @@ using CecSharp; namespace CecConfigGui { - public partial class DeviceInformation : Form + public partial class DeviceInformation : AsyncForm { public DeviceInformation(CecConfigGUI gui, CecLogicalAddress address, ref LibCecSharp lib, bool devicePresent, CecVendorId vendor, bool isActiveSource, ushort physicalAddress, @@ -34,42 +34,6 @@ namespace CecConfigGui this.Text = "Device: " + osdName; } - delegate void SetControlVisibleCallback(Control control, bool val); - private void SetControlVisible(Control control, bool val) - { - if (control.InvokeRequired) - { - SetControlVisibleCallback d = new SetControlVisibleCallback(SetControlVisible); - try - { - this.Invoke(d, new object[] { control, val }); - } - catch (Exception) { } - } - else - { - control.Visible = val; - } - } - - delegate void SetControlTextCallback(Control control, string val); - private void SetControlText(Control control, string val) - { - if (control.InvokeRequired) - { - SetControlTextCallback d = new SetControlTextCallback(SetControlText); - try - { - this.Invoke(d, new object[] { control, val }); - } - catch (Exception) { } - } - else - { - control.Text = val; - } - } - private void lInactiveSource_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) { SetControlVisible(lInactiveSource, false); @@ -77,7 +41,6 @@ namespace CecConfigGui Gui.ActivateSource(Address); } - private void lStandby_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) { LinkLabel label = sender as LinkLabel;