SetControlText(tbPhysicalAddress, string.Format("{0,4:X}", updateEvent.IntValue));
break;
case UpdateEventType.ProgressBar:
+ SetControlVisible(pProgress, true);
SetProgressValue(pProgress, updateEvent.IntValue);
break;
case UpdateEventType.TVVendorId:
UpdatingInfoPanel.SetControlEnabled(UpdatingInfoPanel.bUpdate, true);
UpdatingInfoPanel = null;
}
+ SetControlVisible(pProgress, false);
break;
}
}
private void SetControlsEnabled(bool val)
{
- SetControlEnabled(cbPortNumber, val);
- SetControlEnabled(cbConnectedDevice, cbConnectedDevice.Items.Count > 1 ? val : false);
- SetControlEnabled(tbPhysicalAddress, val);
+ SetControlEnabled(cbPortNumber, val && !Config.AutodetectAddress);
+ SetControlEnabled(cbConnectedDevice, cbConnectedDevice.Items.Count > 1 && !Config.AutodetectAddress ? val : false);
+ SetControlEnabled(tbPhysicalAddress, val && !Config.AutodetectAddress);
SetControlEnabled(cbDeviceType, val);
SetControlEnabled(cbUseTVMenuLanguage, val);
SetControlEnabled(cbActivateSource, val);
}
}
+ protected override void Dispose(bool disposing)
+ {
+ if (disposing)
+ {
+ Lib.DisableCallbacks();
+ Lib.StandbyDevices(CecLogicalAddress.Broadcast);
+ Lib.Close();
+ }
+ if (disposing && (components != null))
+ {
+ components.Dispose();
+ }
+ base.Dispose(disposing);
+ }
+
#region Actions
public void ReloadXMLConfiguration()
{
if (!SuppressUpdates && ActiveProcess == null)
{
SetControlsEnabled(false);
- ActiveProcess = new RescanDevices();
+ ActiveProcess = new RescanDevices(ref Lib);
ActiveProcess.EventHandler += new EventHandler<UpdateEvent>(ProcessEventHandler);
(new Thread(new ThreadStart(ActiveProcess.Run))).Start();
}
SetCheckboxItemChecked(cbWakeDevices, iPtr, Config.WakeDevices.IsSet((CecLogicalAddress)iPtr));
for (int iPtr = 0; iPtr < 15; iPtr++)
SetCheckboxItemChecked(cbPowerOffDevices, iPtr, Config.PowerOffDevices.IsSet((CecLogicalAddress)iPtr));
+
+ SetControlText(this, "Pulse-Eight USB-CEC Adapter - libCEC " + Lib.ToString(Config.ServerVersion));
return 1;
}