// ###### ## ## ####### ## ######## ###### // ####### ## ## ######## ## ######## ######## // ## ## ## ## ## ## ## ## ## ## // ## ## ## ## ## ## ## ## ## // ## ## ## ## ######## ## ## ## // ####### ## ## ####### ## ## ## // ###### ## ## ## ## ## ## ## // ## ## ## ## ## ## ## ## ## // ## ### ### ######## ######## ######## ######## // ## ###### ####### ######## ######## ###### public ModemInfoStruct GetModemInfo() { MIS = new ModemInfoStruct(); MIS.ModemNum = -1; MIS.SoftNum = -1; Connect(); return(MIS); }
// Определить модем private void btnGetInfo_Click(object sender, EventArgs e) { this.Enabled = false; ModemInfo MI = new ModemInfo(); ModemInfoStruct MIS = MI.GetModemInfo(); this.Enabled = true; cmbModem.SelectedIndex = MIS.ModemNum; //cmbModem_SelectedIndexChanged(cmbModem, new EventArgs()); cmbSoft.SelectedIndex = MIS.SoftNum; }