示例#1
0
 public void Save()
 {
     lock (lockable)
     {
         LocalSettingsHelper.GetContainer(SETTINGS_CONTAINER).WriteGroupSettings(this);
         SettingsChanged?.Invoke(null, EventArgs.Empty);
     }
 }
示例#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());
     }
 }