- Timestamp:
- 05/04/17 19:53:35 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/PersistenceReintegration/HeuristicLab.Core.Views/3.3/Clipboard.cs
r14927 r14930 30 30 using HeuristicLab.Common; 31 31 using HeuristicLab.MainForm; 32 using HeuristicLab.Persistence; 32 33 using HeuristicLab.Persistence.Default.Xml; 33 34 using HeuristicLab.PluginInfrastructure; … … 155 156 foreach (string filename in items) { 156 157 try { 157 T item = XmlParser.Deserialize<T>(filename); 158 159 #region backwards compatibility 160 T item = null; 161 try { 162 item = XmlParser.Deserialize<T>(filename); 163 } catch(Exception e) { } 164 if (item == null) 165 item = (T)(new ProtoBufSerializer()).Deserialize(filename); 166 #endregion 158 167 OnItemLoaded(item, progressBar.Maximum / items.Length); 159 168 } catch (Exception) { } … … 197 206 i++; 198 207 SetEnabledStateOfContentViews(item, false); 199 XmlGenerator.Serialize(item, ItemsPath + Path.DirectorySeparatorChar + i.ToString("00000000") + ".hl", CompressionLevel.Optimal);208 (new ProtoBufSerializer()).Serialize(item, ItemsPath + Path.DirectorySeparatorChar + i.ToString("00000000") + ".hl"); 200 209 OnItemSaved(item, progressBar.Maximum / listView.Items.Count); 201 210 } catch (Exception) { } finally {
Note: See TracChangeset
for help on using the changeset viewer.