По нажатию кнопки нифига сложного не происходит. Нечему там ломаться 
private void SaveSettings_Click(object sender, EventArgs e)
{
XmlDocument xmlDoc = new XmlDocument();
XmlDeclaration newChild = xmlDoc.CreateXmlDeclaration("1.0", "windows-1251", null);
xmlDoc.InsertBefore(newChild, xmlDoc.DocumentElement);
XmlNode node = xmlDoc.CreateElement("Account");
xmlDoc.AppendChild(node);
this.WriteXMLValue(xmlDoc, "Login", this.SLogin.Text);
this.WriteXMLValue(xmlDoc, "Password", this.SPassword.Text);
this.WriteXMLValue(xmlDoc, "BattleWithInjury", this.SBattleWithInjury.Checked.ToString());
this.WriteXMLValue(xmlDoc, "CureInjuries", this.SCureInjuries.Checked.ToString());
this.WriteXMLValue(xmlDoc, "BattleAbovePercent", this.SBattleAbovePercent.Text);
this.MainTimer.Interval = int.Parse(this.SActionsInterval.Text);
this.WriteXMLValue(xmlDoc, "ActionsInterval", this.SActionsInterval.Text);
this.WriteXMLValue(xmlDoc, "BattleStartType", this.SBattleStartType.SelectedIndex.ToString());
this.WriteXMLValue(xmlDoc, "RepairType", this.SRepairType.SelectedIndex.ToString());
this.WriteXMLValue(xmlDoc, "RepairNumber", this.SRepairNumber.Text);
this.WriteXMLValue(xmlDoc, "CharType", this.SCharType.SelectedIndex.ToString());
this.WriteXMLValue(xmlDoc, "AnimalEat", this.SAnimalEat.Checked.ToString());
this.WriteXMLValue(xmlDoc, "AnimalBattle", this.SAnimalBattle.Checked.ToString());
this.WriteXMLValue(xmlDoc, "StatsAdder", this.SStatsAdder.Checked.ToString());
for (int i = 0; i < 120; i++)
{
this.WriteXMLValue(xmlDoc, "Stat" + i.ToString(), this.SStatsList.Rows[i].Cells[1].Value.ToString());
}
this.WriteXMLValue(xmlDoc, "BattlePercent1", this.SBattlePercent1.Value.ToString());
this.WriteXMLValue(xmlDoc, "BattlePercent2", this.SBattlePercent2.Value.ToString());
this.WriteXMLValue(xmlDoc, "BattlePercent3", this.SBattlePercent3.Value.ToString());
this.WriteXMLValue(xmlDoc, "BattlePercent4", this.SBattlePercent4.Value.ToString());
this.WriteXMLValue(xmlDoc, "BattlePercent5", this.SBattlePercent5.Value.ToString());
this.WriteXMLValue(xmlDoc, "BattlePercent6", this.SBattlePercent6.Value.ToString());
this.WriteXMLValue(xmlDoc, "BattlePercent7", this.SBattlePercent7.Value.ToString());
this.WriteXMLValue(xmlDoc, "BattlePercent8", this.SBattlePercent8.Value.ToString());
this.WriteXMLValue(xmlDoc, "BattlePercent9", this.SBattlePercent9.Value.ToString());
this.WriteXMLValue(xmlDoc, "BattlePercent10", this.SBattlePercent10.Value.ToString());
this.WriteXMLValue(xmlDoc, "BattlePercent11", this.SBattlePercent11.Value.ToString());
this.WriteXMLValue(xmlDoc, "BattlePercent12", this.SBattlePercent12.Value.ToString());
this.WriteXMLValue(xmlDoc, "BattlePercent13", this.SBattlePercent13.Value.ToString());
this.WriteXMLValue(xmlDoc, "BattlePercent14", this.SBattlePercent14.Value.ToString());
this.WriteXMLValue(xmlDoc, "BattlePercent15", this.SBattlePercent15.Value.ToString());
this.WriteXMLValue(xmlDoc, "BattleType", this.SBattleType.SelectedIndex.ToString());
this.WriteXMLValue(xmlDoc, "BattleDogovorZayavkaType", this.SBattleDogovorZayavkaType.SelectedIndex.ToString());
this.WriteXMLValue(xmlDoc, "BattleDogovorType", this.SBattleDogovorType.SelectedIndex.ToString());
this.WriteXMLValue(xmlDoc, "BattleDogovorTimeout", this.SBattleDogovorTimeout.SelectedIndex.ToString());
this.WriteXMLValue(xmlDoc, "BattleDogovorStatsAnalyze", this.SBattleDogovorStatsAnalyze.SelectedIndex.ToString());
this.WriteXMLValue(xmlDoc, "BattleGroupTime", this.SBattleGroupTime.SelectedIndex.ToString());
this.WriteXMLValue(xmlDoc, "BattleGroupTimeout", this.SBattleGroupTimeout.SelectedIndex.ToString());
this.WriteXMLValue(xmlDoc, "BattleGroupAllies", this.SBattleGroupAllies.Text);
this.WriteXMLValue(xmlDoc, "BattleGroupEnemies", this.SBattleGroupEnemies.Text);
this.WriteXMLValue(xmlDoc, "BattleGroupKulak", this.SBattleGroupKulak.Checked.ToString());
this.WriteXMLValue(xmlDoc, "BattleGroupDeath", this.SBattleGroupDeath.Checked.ToString());
this.WriteXMLValue(xmlDoc, "BattleGroupBlood", this.SBattleGroupBlood.Checked.ToString());
this.WriteXMLValue(xmlDoc, "BattleGroupOtmoroz", this.SBattleGroupOtmoroz.Checked.ToString());
this.WriteXMLValue(xmlDoc, "BattleHaotZayavkaType", this.SBattleHaotZayavkaType.SelectedIndex.ToString());
this.WriteXMLValue(xmlDoc, "BattleHaotTime", this.SBattleHaotTime.SelectedIndex.ToString());
this.WriteXMLValue(xmlDoc, "BattleHaotTimeout", this.SBattleHaotTimeout.SelectedIndex.ToString());
this.WriteXMLValue(xmlDoc, "BattleHaotType", this.SBattleHaotType.SelectedIndex.ToString());
this.WriteXMLValue(xmlDoc, "BattleHaotInvisible", this.SBattleHaotInvisible.Checked.ToString());
this.WriteXMLValue(xmlDoc, "BattleHaotDeath", this.SBattleHaotDeath.Checked.ToString());
this.WriteXMLValue(xmlDoc, "BattleHaotBlood", this.SBattleHaotBlood.Checked.ToString());
this.WriteXMLValue(xmlDoc, "BattleHaotOtmoroz", this.SBattleHaotOtmoroz.Checked.ToString());
this.WriteXMLValue(xmlDoc, "Priem1", this.SPriem1.Text);
this.WriteXMLValue(xmlDoc, "Priem2", this.SPriem2.Text);
this.WriteXMLValue(xmlDoc, "Priem3", this.SPriem3.Text);
this.WriteXMLValue(xmlDoc, "Priem4", this.SPriem4.Text);
this.WriteXMLValue(xmlDoc, "Priem5", this.SPriem5.Text);
this.WriteXMLValue(xmlDoc, "Priem6", this.SPriem6.Text);
this.WriteXMLValue(xmlDoc, "Priem7", this.SPriem7.Text);
this.WriteXMLValue(xmlDoc, "Priem8", this.SPriem8.Text);
this.WriteXMLValue(xmlDoc, "Priem9", this.SPriem9.Text);
this.WriteXMLValue(xmlDoc, "Priem10", this.SPriem10.Text);
this.WriteXMLValue(xmlDoc, "Priem11", this.SPriem11.Text);
this.WriteXMLValue(xmlDoc, "Priem12", this.SPriem12.Text);
this.WriteXMLValue(xmlDoc, "Priem13", this.SPriem13.Text);
this.WriteXMLValue(xmlDoc, "Priem14", this.SPriem14.Text);
this.WriteXMLValue(xmlDoc, "Priem15", this.SPriem15.Text);
this.WriteXMLValue(xmlDoc, "Priem16", this.SPriem16.Text);
this.WriteXMLValue(xmlDoc, "ProxyServerEnabled", this.SProxyServerEnabled.Checked.ToString());
this.WriteXMLValue(xmlDoc, "ProxyServerIP", this.SProxyServerIP.Text);
this.WriteXMLValue(xmlDoc, "ProxyServerPort", this.SProxyServerPort.Text);
if (this.newAcc)
{
this.accFile = Path.Combine(this.accountsPath, this.SLogin.Text + ".ca");
this.newAcc = false;
}
xmlDoc.Save(this.accFile);
this.Tabs.SelectedIndex = 0;
if (this.Browser.Url.AbsoluteUri == "about:blank")
{
this.Browser.Navigate("http://" + this.SCity.Text + ".combats.com/index.html");
}
}