private void ClearRDP(RdpClient rdp) { try { rdp.Dispose(); this.rdp_panle.Controls.Remove(rdp); } catch (Exception e) { FileTool.log("RDP资源清理异常-" + e.Message); LogWarning("RDP资源清理异常-" + e.Message); } }
private void ClearRDP(RdpClient rdp) { try { this.rdp_panle.Controls.Remove(rdp); if (rdp.IsDisposed == false) { rdp.Dispose(); } } catch (Exception e) { FileTool.log("RDP资源清理异常-" + e.Message); } }
private void ClearRDP(Server server) { try { RdpClient rdp = server.client; if (rdp.Connected != 0) { rdp.RequestClose(); rdp.Disconnect(); } rdp.Dispose(); this.rdp_panle.Controls.Remove(rdp); } catch (Exception e) { FileTool.log("RDP资源清理异常-" + e.Message); LogWarning("RDP资源清理异常-" + e.Message); } }