private void refreshButton_Click(object sender, EventArgs e) { this.connectionsListFlowLayoutPanel.Controls.Clear(); connectionResultList.Clear(); //comment out while using test data foreach (String server in ServerList.GetServers()) { connectionResultList.AddRange(RDPInfo.ListUsers(server).Where(x => !x.Contains("n/a"))); } //use for testing purposes, otherwise comment out //connectionResultList.Add(text); //connectionResultList.Add(text); //connectionResultList.Add(text); foreach (String result in connectionResultList) { activeConnectionUserControl fActiveConnectionUserControl = new activeConnectionUserControl(result); this.connectionsListFlowLayoutPanel.Controls.Add(fActiveConnectionUserControl); Console.WriteLine(result); } }
private void serverListPictureBox_Click(object sender, EventArgs e) { list = "Servers queried: \r"; foreach (String server in ServerList.GetServers()) { list = list + '\r' + server; } ////Console.WriteLine(list); MessageBox.Show(list); }