Beispiel #1
0
        public static ReplaceSettings GetSetting()
        {
            ReplaceSettings settings = XmlUtil<ReplaceSettings>.XmlDeserializeFromFile("Config.xml");
            if (settings == null)
            {
                settings = new ReplaceSettings();
                settings.GroupSettings = new List<ReplaceGroupSetting>();
                settings.AllReplaceStrings = new List<string>();

            }
            ConfigSetting = settings;
            return settings;
        }
Beispiel #2
0
 public static bool SaveSetting(ReplaceSettings settings)
 {
     if (settings != null)
     {
         ConfigSetting = settings;
         XmlUtil<ReplaceSettings>.XmlSerializeToFile(settings, "Config.xml");
         Thread.Sleep(300);
         return true;
     }
     else
     {
         return false;
     }
 }