private void viewToolStripMenuItem1_Click(object sender, EventArgs e) { if (pluginView == null) { pluginView = new PluginView(); pluginView.Show(); pluginView.FormClosed += (S, E) => { pluginView.Dispose(); pluginView = null; }; if (SelectionCount == -1) { for (int i = 0; i < Clients.Count; i++) { pluginView.AddClient(Clients[i]); } } else if (SelectionCount > 0) { for (int i = 0; i < Clients.Count; i++) { if (Clients[i].Lvi.Selected) { pluginView.AddClient(Clients[i]); } } } } else { pluginView.BringToFront(); } }
private void viewToolStripMenuItem1_Click(object sender, EventArgs e) { if (pluginView == null) { pluginView = new PluginView(); pluginView.Show(); pluginView.FormClosed += (S, E) => { pluginView.Dispose(); pluginView = null; }; if (SelectionCount == -1) { for (int i = 0; i < Clients.Count; i++) { pluginView.AddClient(Clients[i]); } } else if (SelectionCount > 0) { for (int i = 0; i < Clients.Count; i++) { if (Clients[i].Lvi.Selected) { pluginView.AddClient(Clients[i]); } } } } else pluginView.BringToFront(); }