private void CloseButton_Click(object sender, RoutedEventArgs e) { if (null != Connection) { Connection.Close(); } Close(); }
/// <summary> /// 关闭连接 /// </summary> public void Close() { if (connector == null) { Debug.Log("Connector为空!!!"); return; } connector.Close(); }