private void button_loadProfile_Click(object sender, EventArgs e) { try { xmlRW xml = new xmlRW(); int GCD = 100; bool breast, damage, autobuff, backRun, fight, JLG, ZJXN; xml.xmlRead(xmlFilePath, out breast, out damage, out autobuff, out backRun, out fight, out JLG, out ZJXN, out GCD); if (breast == true) //摇乳选择框 { checkBox_Breast.Checked = true; } else { checkBox_Breast.Checked = false; } if (damage == true) //6人伤害 { checkBox_Six.Checked = true; } else { checkBox_Six.Checked = false; } if (autobuff == true) //BUFF自动排序 { checkBox_autoBUFF.Checked = false; } else { checkBox_autoBUFF.Checked = true; } if (backRun == true) //后退加速 { checkBox_backrun.Checked = true; } else { checkBox_backrun.Checked = false; } if (fight == true) //战斗加速 { checkBox_fight.Checked = true; } else { checkBox_fight.Checked = false; } cbGCD.SelectedItem = GCD.ToString(); label_Now.Text = "载入成功!"; } catch (Exception e_load) { MessageBox.Show(e_load.ToString(), "载入按钮"); label_Now.Text = "载入失败!"; } }
private void button_save_Click(object sender, EventArgs e) { try { label_Now.Text = "正在保存..."; xmlRW xml = new xmlRW(); bool breast = false, damage = false, autobuff = true, backRun = false, fight = false, JLG = false, ZJXN = false; if (checkBox_Breast.Checked) { breast = true; } if (checkBox_Six.Checked) { damage = true; } if (checkBox_autoBUFF.Checked == true) { autobuff = false; } if (checkBox_backrun.Checked == true) { backRun = true; } if (checkBox_fight.Checked == true) { fight = true; } if (checkBox_JLG.Checked == true) { JLG = true; } if (checkBox_ZuiJiaXingNeng.Checked == true) { ZJXN = true; } xml.xmlWrite(xmlFilePath, breast, damage, autobuff, backRun, fight, JLG, ZJXN); label_Now.Text = "保存完毕"; } catch (Exception e_bt_save) { MessageBox.Show(e_bt_save.ToString(), "保存按钮"); } }
private void button_save_Click(object sender, EventArgs e) { try { label_Now.Text = "正在保存..."; xmlRW xml = new xmlRW(); int GCD = 100; bool breast = false, damage = false, autobuff = true, backRun = false, fight = false; if (checkBox_Breast.Checked) { breast = true; } if (checkBox_Six.Checked) { damage = true; } if (checkBox_autoBUFF.Checked == true) { autobuff = false; } if (checkBox_backrun.Checked == true) { backRun = true; } if (checkBox_fight.Checked == true) { fight = true; } if (cbGCD.SelectedIndex != -1) { GCD = int.Parse(cbGCD.SelectedItem.ToString()); } xml.xmlWrite(xmlFilePath, breast, damage, autobuff, backRun, fight, GCD); label_Now.Text = "保存完毕"; } catch (Exception e_bt_save) { MessageBox.Show(e_bt_save.ToString(), "保存按钮"); } }