public FormServer() { InitializeComponent(); listBoxStatus.HorizontalScrollbar = true; setListBoxCallback = new SetListBoxCallback(SetListBox); setRichTextBoxCallback = new SetRichTextBoxCallback(SetReceiveText); setComboBoxCallback = new SetComboBoxCallback(setComboBox); removeComboBoxItemsCallback = new RemoveComboBoxItemsCallback(RemoveComboBoxItems); }
public FormServer() { InitializeComponent(); listBox_Status.HorizontalScrollbar = true; setListBoxCallback = new SetListBoxCallback(SetListBox); setRichTextBoxCallback = new SetRichTextBoxCallback(SetReceiveText); setComboBoxCallback = new SetComboBoxCallback(SetComboBox); removeComboBoxItemsCallback = new RemoveComboBoxItemsCallback(RemoveComboBoxItems); button_Start_Listen.Enabled = true; button_Stop_Listen.Enabled = false; //获取本机所有IP地址 IPAddress[] ipAdress = Dns.GetHostAddresses(Dns.GetHostName()); foreach (IPAddress i in ipAdress) { comboBox_IpAdress.Items.Add(i.ToString()); } comboBox_IpAdress.SelectedIndex = 0; }