public override void Dispose() { EventHandlers.DetachDCSBIOSDecoder(this); DCSBIOSStringManager.DetachListener(this); DCSBIOS.GetInstance()?.DetachDataReceivedListener(this); _shutdown = true; try { //_autoResetEvent.Set(); } catch (Exception e) { Debugger.Break(); } try { if (_imageUpdateTread != null && (_imageUpdateTread.ThreadState & (ThreadState.Aborted | ThreadState.AbortRequested)) == 0) { _imageUpdateTread.Abort(); } } catch (Exception) {} base.Dispose(); }
public sealed override void Startup() { try { // V/UHF COMM1 _comm1DcsbiosOutputFreq = DCSBIOSControlLocator.GetDCSBIOSOutput("COMM1_STRING_FREQ"); DCSBIOSStringManager.AddListeningAddress(_comm1DcsbiosOutputFreq); // V/UHF COMM2 _comm2DcsbiosOutputFreq = DCSBIOSControlLocator.GetDCSBIOSOutput("COMM2_STRING_FREQ"); DCSBIOSStringManager.AddListeningAddress(_comm2DcsbiosOutputFreq); StartListeningForHidPanelChanges(); // IsAttached = true; } catch (Exception ex) { SetLastException(ex); } }