internal int _fetched = 0; // 已经 Present 获取的条数 public void Dispose() { if (ZClient != null) { ZClient.Dispose(); } }
private void Form1_FormClosed(object sender, FormClosedEventArgs e) { SaveSettings(); if (_zclient != null) { _zclient.CloseConnection(); _zclient.Dispose(); } }
private void MultiChannelForm_FormClosed(object sender, FormClosedEventArgs e) { cancel.Cancel(); foreach (ListViewItem item in this.listView_channels.Items) { ZClient client = (ZClient)item.Tag; if (client != null) { client.Dispose(); } } }