Changeset 17097 for stable/HeuristicLab.Core.Views/3.3/Clipboard.cs
- Timestamp:
- 07/07/19 23:40:10 (5 years ago)
- Location:
- stable
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
stable
-
stable/HeuristicLab.Core.Views
- Property svn:mergeinfo changed
/branches/2520_PersistenceReintegration/HeuristicLab.Core.Views (added) merged: 16452-16454,16462,16480,16529,16539,16558-16559 /trunk/HeuristicLab.Core.Views merged: 16565,16568
- Property svn:mergeinfo changed
-
stable/HeuristicLab.Core.Views/3.3/Clipboard.cs
r15584 r17097 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 8Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2019 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 28 28 using System.Threading; 29 29 using System.Windows.Forms; 30 using HEAL.Attic; 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.