private void initTables() { _oc = new OrderCache(_app); _oc.OnOrder += _oc_OnOrder; _oc.Start(); state = OrderState.ConnectionPending; PST = new PositionTable(_app); PST.WantData(PST.TqlForPositions(), true, false); PST.OnPosition += PST_OnPosition; PST.Start(); XPAT = new XPermsAccountsTable(_app); XPAT.OnXPermsAccounts += XPAT_OnXPermsAccounts; XPAT.WantData(XPAT.TqlForXPermsAccounts(), true, false); XPAT.Start(); TBL = new LiveQuoteTable(_app); TBL.OnData += TBL_OnData; _bw.RunWorkerAsync(); _conn = true; }