private void ShowOptions() { RaiseLogger("Открытие настроек"); using (FormSettings form = new FormSettings(Menus)) { form.ShowDialog(); XmlSerializer serial = new XmlSerializer(typeof(List <Menu>)); if (Menus.Count == 0) { File.Delete(SelfPath + "/menus.dat"); } else { using (FileStream f = File.Create(SelfPath + "/menus.dat")) { serial.Serialize(f, Menus); f.Close(); } } } RaiseLogger("Настройки сохранены"); }
private void ShowOptions() { RaiseLogger("Открытие настроек"); using (FormSettings form = new FormSettings(Menus)) { form.ShowDialog(); XmlSerializer serial = new XmlSerializer(typeof (List<Menu>)); if (Menus.Count == 0) File.Delete(SelfPath + "/menus.dat"); else { using (FileStream f = File.Create(SelfPath + "/menus.dat")) { serial.Serialize(f, Menus); f.Close(); } } } RaiseLogger("Настройки сохранены"); }