This is my first post so be easy on me please.
Im using a INI parser to read and write to an ini file. When reading the ini file I have certain parameters set to 1 or 0, which need to be stored to a checkbox variable. Heres a peice of code for reading the ini file.
Its working fine but the problem occurs when Im writing back to the ini file. Heres the write back sample:
In the ini file its coming up with a "True" or "False" not a 1 or 0 like I need. Ive spent several hours trying different things. Any help pointing me in the right direction would be awesome. Thanks.
Im using a INI parser to read and write to an ini file. When reading the ini file I have certain parameters set to 1 or 0, which need to be stored to a checkbox variable. Heres a peice of code for reading the ini file.
Code:
string whispernotify = source.Configs["Settings"].Get("whisper_notify"); if (whispernotify == "1") { whisper_notify.Checked = true; } else { whisper_notify.Checked = false; }
Code:
source.Configs["Settings"].Set ("whisper_notify", whisper_notify.Checked);
Comment