Esempio n. 1
0
 public static void LoadClientPreset(string filePath)
 {
     try {
         using (var fs = new FileStream(filePath, FileMode.Open, FileAccess.Read))
             using (var reader = XmlReader.Create(fs)) {
                 XmlSerializer ser = new XmlSerializer(typeof(ClientPresetFile));
                 Presets = (ClientPresetFile)ser.Deserialize(reader);
             }
     } catch (Exception ex) {
         Debug.Print(ex.ToString());
     }
 }
Esempio n. 2
0
 public static void LoadClientPreset(string filePath)
 {
     try {
         using (var fs = new FileStream(filePath, FileMode.Open, FileAccess.Read))
         using (var reader = XmlReader.Create(fs)) {
             XmlSerializer ser = new XmlSerializer(typeof(ClientPresetFile));
             Presets = (ClientPresetFile)ser.Deserialize(reader);
         }
     } catch (Exception ex) {
         Debug.Print(ex.ToString());
     }
 }