Esempio n. 1
0
 public static void SaveDevices()
 {
     foreach (var device in persistedDevices)
     {
         CompressFolders(device.MainFolder);
     }
     if (persistedDevices != null)
     {
         File.WriteAllText(DEVICES_FILENAME, XMLUtils.ToXML(persistedDevices));
     }
     else
     {
         File.Delete(DEVICES_FILENAME);
     }
 }
Esempio n. 2
0
 public static void SaveSettings()
 {
     File.WriteAllText(SETTINGS_FILE, XMLUtils.ToXML(settings));
 }
Esempio n. 3
0
 public static T DeepClone <T>(this T obj)
 {
     return((T)XMLUtils.FromXML <T>(XMLUtils.ToXML(obj)));
 }