내 체크 박스 상태가 저장되지 않는 이유가 혼동 스럽습니다. 이전에 다른 프로젝트에서이 작업을 수행했지만 코드가 누락 되었습니까?모든 개체가 저장을 거부합니다. C#
private void Form1_Load(object sender, EventArgs e)
{
materialCheckBox1.Checked = Properties.Settings.Default.CheckBox1;
materialCheckBox2.Checked = Properties.Settings.Default.CheckBox2;
materialCheckBox4.Checked = Properties.Settings.Default.CheckBox3;
}
private void Form1_FormClosing(object sender, FormClosingEventArgs e)
{
Properties.Settings.Default.CheckBox1 = materialCheckBox1.Checked;
Properties.Settings.Default.CheckBox2 = materialCheckBox2.Checked;
Properties.Settings.Default.CheckBox3 = materialCheckBox4.Checked;
Properties.Settings.Default.Save();
}
당신은 디버그/출력 창에 일부 오류/메시지를 찾을 수 있습니까? 또한 다른 설정 (예 : 문자열)을 넣어 저장 여부를 확인하십시오. – TheVillageIdiot
디버거에 오류 메시지가 없습니다. 그리고 런타임 오류도 없습니다. 그것은 단순히 구원을 거부합니다. 하지만 지금은 문자열을 시도 할 것입니다. –
문자열이 저장되지 않았습니다 ... –