Exemplo n.º 1
0
 public void Save()
 {
     lock (lockable)
     {
         LocalSettingsHelper.GetContainer(SETTINGS_CONTAINER).WriteGroupSettings(this);
         SettingsChanged?.Invoke(null, EventArgs.Empty);
     }
 }
Exemplo n.º 2
0
 private static Settings Load()
 {
     try
     {
         if (LocalSettingsHelper.GetContainer(SETTINGS_CONTAINER).ReadGroupSettings(out Settings s))
         {
             return(s);
         }
         else
         {
             return(new Settings());
         }
     }
     catch (Exception)
     {
         return(new Settings());
     }
 }