/// <summary> /// </summary> /// <returns> /// </returns> private static bool ISComInitialization() { int port; IPAddress chatEngineIp; try { ISComClient = new ISComV2Client(); string chatip = ConfigReadWrite.Instance.CurrentConfig.ChatIP; chatEngineIp = IPAddress.Parse(chatip); port = ConfigReadWrite.Instance.CurrentConfig.CommPort; } catch (Exception e) { LogUtil.ErrorException(e); return(false); } try { ISComClient.OnReceiveData += ISComClientOnReceiveData; ISComClient.Connect(chatEngineIp, port); } catch (Exception e) { LogUtil.ErrorException(e); return(true); } return(true); }