private void btnSave_Click(object sender, EventArgs e) { IniFiles fop = new IniFiles("Settings.ini"); QWriteAllForm.TestList.Clear(); // clear old data if (checkBoxTest.Checked) QWriteAllForm.TestList.Add("TestBoard"); if (checkBoxSN.Checked) QWriteAllForm.TestList.Add("SN"); if (checkBoxBTMAC.Checked) QWriteAllForm.TestList.Add("BTMAC"); if (checkBoxWIFIMAC.Checked) QWriteAllForm.TestList.Add("WIFIMAC"); if (checkBoxNv453.Checked) QWriteAllForm.TestList.Add("NV453"); /*save configuration to file*/ fop.WriteBool("TEST", "TestBoard", checkBoxTest.Checked); fop.WriteBool("TEST", "SN", checkBoxSN.Checked); fop.WriteBool("TEST", "BTMAC", checkBoxBTMAC.Checked); fop.WriteBool("TEST", "WIFIMAC", checkBoxWIFIMAC.Checked); fop.WriteBool("TEST", "NV453", checkBoxNv453.Checked); fop.WriteString("TEST", "WLANADDR", WlantextBox.Text); fop.WriteString("TEST", "BTADDR", BttextBox.Text); fop.WriteString("TEST", "SNHEADER", snHeaderBox.Text); // check test item count if (QWriteAllForm.TestList.Count < 1) { MessageBox.Show("Please Add test Item!"); return; } this.DialogResult = DialogResult.OK;//DialogResult this.Close(); }
private void button1_Click(object sender, EventArgs e) { IniFiles fop = new IniFiles("Settings.ini"); fop.WriteBool("FACTORY", "SAVETOSN", saveTonvCheckBox.Checked); fop.WriteBool("FACTORY", "FORBIDUSB", forbidUbscheckBox.Checked); fop.WriteBool("FACTORY", "RESTOREFACTORY", restorecheckBox.Checked); this.Close(); }
private void wholepowersaveBtn_Click(object sender, EventArgs e) { IniFiles fop = new IniFiles("Settings.ini"); fop.WriteString("DEVICEPOWER", "LEAKCURRENT", leakcurBox.Text); fop.WriteString("DEVICEPOWER", "SLEEPCURRENT", sleepcurBox.Text); fop.WriteString("DEVICEPOWER", "STABLECURRENT", stablecurBox.Text); fop.WriteBool("DEVICEPOWER", "MMI", entermmicheckBox.Checked); this.Close(); }