public static void Send(MessageInfo info) { ClientConfig config = ClientConfig.GetConfig(); if (config == null) { MessageBoxHelper.Show("请先设置服务器连接!"); return; } if (clientHelper == null) { if (logHandle == null) { MessageBoxHelper.Show("请先设置日志处理的委托!"); return; } clientHelper = new TcpClientHelper(null, logHandle); //clientHelper.Start(); } if (!clientHelper.IsStarted) { clientHelper.Start(); } clientHelper.Send(info); }
public static void Start() { ClientConfig config = ClientConfig.GetConfig(); if (config == null) { return; } if (clientHelper == null) { clientHelper = new TcpClientHelper(null); clientHelper.Start(); } }