/// <summary> /// Соединение /// </summary> /// <param name="sender"></param> /// <param name="e"></param> void Connect(object sender, EventArgs e) { if (listNet.SelectedIndices.Count == 1) { int number = listNet.SelectedIndices[0]; AccessPoint selectedAP = accessPoints.ToList()[number]; SubForm subForm = new SubForm(selectedAP, ref showRichTextBox2); subForm.Show(); } }