private void Form3_FormClosed(object sender, FormClosedEventArgs e) { XMLUnit xmlunit = new XMLUnit(); List <ATCommand> acs = xmlunit.XMLUnitRead(); if (acs.Count <= 0) { xmlunit.XMLUnitWrite(new ModuleCommand(), acs); } }
private void ButtonWrite_Click(object sender, EventArgs e) { //string messAge = "是否确定将内容保存到:" + _moduleList[checkedNum].Module + "的\"" // + _moduleList[checkedNum].Function + "\"功能命令列表"; //string caption = "警告!!!!"; //MessageBoxButtons buttons = MessageBoxButtons.YesNo; //DialogResult result = MessageBox.Show(messAge, caption, buttons); //if (result == DialogResult.Yes) //{ XMLUnit xmlUnit = new XMLUnit(); if (_moduleList.Count > 0 && _moduleList[checkedNum].Function != "") { xmlUnit.XMLUnitWrite(_moduleList[checkedNum], atCommands); this.Close(); } savedNum = checkedNum; //} }