Changeset 16992 for trunk/HeuristicLab.Core.Views/3.3/Clipboard.cs
- Timestamp:
- 05/29/19 11:20:22 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/HeuristicLab.Core.Views/3.3/Clipboard.cs
r16565 r16992 157 157 foreach (string filename in items) { 158 158 try { 159 var ser = new ProtoBufSerializer(); 160 T item = (T)ser.Deserialize(filename); 159 T item = (T)ContentManager.Load(filename); 161 160 OnItemLoaded(item, progressBar.Maximum / items.Length); 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) { } 161 } catch(Exception) { 162 // ignore if loading a clipboad item fails. 168 163 } 169 164 }
Note: See TracChangeset
for help on using the changeset viewer.