Пример #1
0
        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();
        }