public void Stop() { try { _runbg = false; stiQuote.DeRegisterAllQuotes(); stiBook = null; stiOrder = null; stiPos = null; stiEvents = null; stiQuote = null; if ((_bw.ThreadState != ThreadState.Aborted) || (_bw.ThreadState != ThreadState.Stopped)) { try { _bw.Abort(); } catch { } } } catch (Exception ex) { debug(ex.Message + ex.StackTrace); } if (tl != null) { tl.Stop(); } }
void SterMain_FormClosing(object sender, FormClosingEventArgs e) { try { stiQuote.DeRegisterAllQuotes(); } catch (Exception) { // incase stering was already closed } }
public void UnsubscribeAllQuotes() { _stiQuote.DeRegisterAllQuotes(); }