Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private void boxCheckar(object sender, EventArgs e)
- {
- CheckBox box = (CheckBox)sender;
- int boxID = Convert.ToInt16(box.AccessibleName);
- if (box.Checked)
- { // Yes I know I could have used radio buttons for this but I didn't want to
- if (box == AggressiveStance)
- {
- DefendOnlyCheck.Checked = false;
- whatToWrite[boxID] = whatToWrite[boxID].Replace("false", "true");
- }
- if (box == DefendOnlyCheck)
- {
- AggressiveStance.Checked = false;
- whatToWrite[boxID] = whatToWrite[boxID].Replace("false", "true");
- }
- whatToWrite[boxID] = whatToWrite[boxID].Replace("false", "true");
- }
- else
- {
- whatToWrite[boxID] = whatToWrite[boxID].Replace("true", "false");
- }
- // for testing purposes
- InfoText.Text = whatToWrite[boxID];
- }
Add Comment
Please, Sign In to add comment