private void buttonPreviousStep_Click(object sender, EventArgs e) { File.Delete(".\\xml\\common\\countries\\" + countryName + ".txt.xml"); File.Delete(".\\xml\\history\\countries\\" + countryTagName + " - " + countryName + ".txt.xml"); XmlDocument countries = new XmlDocument(); countries.Load(".\\xml\\common\\countries.txt.xml"); countries.ChildNodes[1].RemoveChild(countries.ChildNodes[1].SelectSingleNode(countryTagName)); countries.Save(".\\xml\\common\\countries.txt.xml"); NewCountry nc = new NewCountry(countryTagName, countryName, mf); nc.Show(); this.Close(); }
private void buttonPreviousStep_Click(object sender, EventArgs e) { countryHistory.ChildNodes [1].RemoveAll( ); countryHistory.Save(".\\xml\\history\\countries\\" + CountryTagName + " - " + CountryName + ".txt.xml"); XmlDocument countries = new XmlDocument( ); countries.Load(".\\xml\\common\\countries\\" + CountryName + ".txt.xml"); countries.ChildNodes [1].SelectSingleNode("color").InnerText = ""; countries.ChildNodes [1].SelectSingleNode("graphical_culture").InnerText = ""; File.Delete(".\\xml\\common\\countries\\" + CountryName + ".txt.xml"); File.Delete(".\\xml\\history\\countries\\" + CountryTagName + " - " + CountryName + ".txt.xml"); countries.ChildNodes [1].RemoveChild(countries.ChildNodes [1].SelectSingleNode(CountryTagName)); countries.Save(".\\xml\\common\\countries.txt.xml"); NewCountry nc = new NewCountry(CountryTagName, CountryName, mf); nc.Show( ); this.Close( ); }