Utilities/Config.cs
changeset 128 cea5477b4d72
parent 63 1a7c13ac7348
child 157 0b5cc38501e1
     1.1 --- a/Utilities/Config.cs	Tue May 25 18:57:28 2010 +0000
     1.2 +++ b/Utilities/Config.cs	Tue May 25 22:33:03 2010 +0000
     1.3 @@ -60,7 +60,7 @@
     1.4          System.Configuration.ConfigurationUserLevel.None);
     1.5      }
     1.6  
     1.7 -    ~Config() {
     1.8 +    private void SaveConfig() {
     1.9        string tempName = Path.ChangeExtension(fileName, ".tmp");
    1.10  
    1.11        if (File.Exists(tempName))
    1.12 @@ -73,6 +73,10 @@
    1.13        } catch (System.Configuration.ConfigurationErrorsException) { }
    1.14      }
    1.15  
    1.16 +    public static void Save() {
    1.17 +      instance.SaveConfig();
    1.18 +    }
    1.19 +
    1.20      public static Config Settings {
    1.21        get {
    1.22          return instance;