public void Finalize() { try { SendLogMessage("Finalize called"); Stop(); // close the RTD support form m_RTDForm.Close(); m_RTDForm = null; } catch (Exception myE) { } }
/// <summary> /// Start the RTDSupport by connecting to the server /// </summary> public void Start() { try { ////m_Log.Info("Start Called"); SetConnectionState(RTDConnectionState.connecting); if (m_RTDForm == null) { m_RTDForm = new frmKRTD(); m_RTDForm.IP = System.Environment.MachineName; m_RTDForm.Port = m_DefaultPort.ToString(); m_RTDForm.Show(); } try { //m_Log = log4net.LogManager.GetLogger("KAITRADE"); //m_Log.Info("KRTDSupport - started"); } catch (Exception myE) { } openGW(m_DefaultFeedName, m_RTDForm.IP, int.Parse(m_RTDForm.Port)); SetConnectionState(RTDConnectionState.connected); } catch (Exception myE) { //m_Log.Error("Start:", myE); } }
protected K2SVRRTDSvrClient() { try { m_RTDForm = new frmKRTD(); m_Subscriptions = new List<DataConnectionRequest>(); m_PendingDataConnect = new List<DataConnectionRequest>(); m_TopicUpdates = new Dictionary<int, object>(); //m_ConfigPath = @"C:\Program Files\KaiTrade\K2Accelerator\config\krtdconfig.xml"; m_ConfigPath = getK2RTDPath(); LoadConfig(this.ConfigFilePath); /* Log support //log4net.Config.BasicConfigurator.Configure(); //m_Log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); ////m_Log = LogManager.GetLogger(typeof(KRTDSupport)); //m_Log.Info("RTDSupport Started:"); */ m_Topics = new System.Collections.Hashtable(); //m_IDHeaderMap = new System.Collections.Hashtable(); m_ClientGWs = new System.Collections.Hashtable(); //m_FeedMap = new Dictionary<string, Feed>(); //m_FeedGWNameMap = new Dictionary<string, List<Feed>>(); m_MsgQueue = new System.Collections.Queue(); //initRTDStatusSubject(); m_RTDForm.Config = m_Config; m_RTDForm.Client = this; m_RTDForm.ConfigPath = m_ConfigPath; StartTimer(); } catch (Exception myE) { } }