Exemple #1
0
 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("Настройки сохранены");
 }
Exemple #2
0
 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("Настройки сохранены");
 }