/***************************************************************************** * FUNCTION: ManageDataConnections * Description: * Parameters: None *****************************************************************************/ private void ManageDataConnections() { String pUrl = TemplateRequestStr; MSHTML.HTMLDocument htmlresponse = new MSHTML.HTMLDocument(); MSHTML.IHTMLDocument2 webresponse = (MSHTML.IHTMLDocument2)htmlresponse; if (LockedForUpdate == false) { LockedForUpdate = true; //Disable timer ticks LiveSessionTimer.Stop(); SendMessage(this.ParentFormPtr, WM_UPDATING_DATA, IntPtr.Zero, IntPtr.Zero); /**** Download Data ****/ pUrl += "?noconstruct=1" + "&smlID=" + ActiveMarket.smlId + "&sid=" + ActiveMarket.sid + "&tabletype=price" + "&index_id=" + ActiveMarket.id; webresponse = Helpers.HTMLRequestResponse(pUrl); //Parse the downloaded HTML file if (HistoricalData == null) { HistoricalData = new ExchangeMarket(); } HistoricalData.parseHtmlLiveData(webresponse, pUrl, ActiveMarket.name); SendMessage(this.ParentFormPtr, WM_LIVEUPDATE, IntPtr.Zero, IntPtr.Zero); LockedForUpdate = false; LiveSessionTimer.Start(); } }