private void getInitFile() { IniFileClass p = new IniFileClass(".\\para.ini"); cbGPIOPin.SelectedIndex = int.Parse(p.IniReadValue("page1", "cbGPIOPin", "0")); cbGPIOMode.SelectedIndex = int.Parse(p.IniReadValue("page1", "cbGPIOMode", "0")); cbTimerID.SelectedIndex = int.Parse(p.IniReadValue("page1", "cbTimerID", "0")); comboBoxPWMPin.SelectedIndex = int.Parse(p.IniReadValue("page1", "comboBoxPWMPin", "0")); comboBoxADCPin.SelectedIndex = int.Parse(p.IniReadValue("page1", "comboBoxADCPin", "0")); textBoxPeriod.Text = p.IniReadValue("page1", "textBoxPeriod", "1000"); textBoxFreq.Text = p.IniReadValue("page1", "textBoxFreq", "10000"); textBoxDuty.Text = p.IniReadValue("page1", "textBoxDuty", "50"); textBoxSSID.Text = p.IniReadValue("page2", "textBoxSSID", "WiFiMCU_Wireless"); textBoxPSW.Text = p.IniReadValue("page2", "textBoxPSW", ""); textBoxIP.Text = p.IniReadValue("page2", "textBoxIP", "11.11.11.2"); textBoxPort.Text = p.IniReadValue("page2", "textBoxPort", "9000"); textBoxBindLoadPort.Text = p.IniReadValue("page2", "textBoxBindLoadPort", "8000"); textBoxSendData.Text = p.IniReadValue("page2", "textBoxSendData", "Test Data"); comboBoxSerialPort.Text = p.IniReadValue("page0", "comboBoxSerialPort", ""); comboBoxSerialBaudrate.Text = p.IniReadValue("page0", "comboBoxSerialBaudrate", "115200"); }