- Timestamp:
- 01/02/19 16:07:07 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2520_PersistenceReintegration/HeuristicLab.Core.Views/3.3/Clipboard.cs
r16453 r16480 28 28 using System.Threading; 29 29 using System.Windows.Forms; 30 using HEAL.Fossil; 30 31 using HeuristicLab.Common; 31 32 using HeuristicLab.MainForm; … … 156 157 foreach (string filename in items) { 157 158 try { 158 T item = XmlParser.Deserialize<T>(filename); 159 var ser = new ProtoBufSerializer(); 160 T item = (T)ser.Deserialize(filename); 159 161 OnItemLoaded(item, progressBar.Maximum / items.Length); 160 } 161 catch (Exception) { } 162 } catch (Exception) { 163 try { 164 // try old format if protobuf deserialization fails 165 T item = XmlParser.Deserialize<T>(filename); 166 OnItemLoaded(item, progressBar.Maximum / items.Length); 167 } catch (Exception) { } 168 } 162 169 } 163 170 OnAllItemsLoaded(); … … 199 206 i++; 200 207 SetEnabledStateOfContentViews(item, false); 201 XmlGenerator.Serialize(item, ItemsPath + Path.DirectorySeparatorChar + i.ToString("00000000") + ".hl", CompressionLevel.Optimal); 208 var ser = new ProtoBufSerializer(); 209 ser.Serialize(item, ItemsPath + Path.DirectorySeparatorChar + i.ToString("00000000") + ".hl"); 202 210 OnItemSaved(item, progressBar.Maximum / listView.Items.Count); 203 211 }
Note: See TracChangeset
for help on using the changeset viewer.