diff --git a/SatisfactorySaveEditor/App.config b/SatisfactorySaveEditor/App.config
index 601c141..1ba27eb 100644
--- a/SatisfactorySaveEditor/App.config
+++ b/SatisfactorySaveEditor/App.config
@@ -34,11 +34,15 @@
-
+
-
+
+
+
+
+
diff --git a/SatisfactorySaveEditor/NLog.xsd b/SatisfactorySaveEditor/NLog.xsd
index 578682a..eefeec8 100644
--- a/SatisfactorySaveEditor/NLog.xsd
+++ b/SatisfactorySaveEditor/NLog.xsd
@@ -1101,6 +1101,7 @@
+
@@ -1139,6 +1140,11 @@
Type of the parameter.
+
+
+ Whether empty value should translate into DbNull. Requires database column to allow NULL values.
+
+
Convert format of the database parameter value.
@@ -2757,6 +2763,7 @@
+
@@ -2810,6 +2817,11 @@
Web service URL.
+
+
+ Value of the User-agent HTTP header.
+
+
Value whether escaping be done according to the old NLog style (Very non-standard)
@@ -2978,6 +2990,7 @@
+
@@ -3000,6 +3013,11 @@
Option to suppress the extra spaces in the output json
+
+
+ Option to exclude null/empty properties from the log event (as JSON)
+
+
List of property names to exclude when is true
diff --git a/SatisfactorySaveEditor/SatisfactorySaveEditor.csproj b/SatisfactorySaveEditor/SatisfactorySaveEditor.csproj
index 27d262e..4cff77d 100644
--- a/SatisfactorySaveEditor/SatisfactorySaveEditor.csproj
+++ b/SatisfactorySaveEditor/SatisfactorySaveEditor.csproj
@@ -41,14 +41,14 @@
satisfactorysaveeditorlogo_powershard.ico
-
- ..\packages\AsyncAwaitBestPractices.4.2.0\lib\netstandard1.0\AsyncAwaitBestPractices.dll
+
+ ..\packages\AsyncAwaitBestPractices.6.0.4\lib\netstandard2.0\AsyncAwaitBestPractices.dll
-
- ..\packages\AsyncAwaitBestPractices.MVVM.4.2.0\lib\netstandard1.0\AsyncAwaitBestPractices.MVVM.dll
+
+ ..\packages\AsyncAwaitBestPractices.MVVM.6.0.4\lib\netstandard2.0\AsyncAwaitBestPractices.MVVM.dll
-
- ..\packages\CommonServiceLocator.2.0.5\lib\net47\CommonServiceLocator.dll
+
+ ..\packages\CommonServiceLocator.2.0.6\lib\net47\CommonServiceLocator.dll
..\packages\MvvmLightLibs.5.4.1.1\lib\net45\GalaSoft.MvvmLight.dll
@@ -59,14 +59,17 @@
..\packages\MvvmLightLibs.5.4.1.1\lib\net45\GalaSoft.MvvmLight.Platform.dll
-
- ..\packages\gong-wpf-dragdrop.2.2.0\lib\net47\GongSolutions.WPF.DragDrop.dll
+
+ ..\packages\gong-wpf-dragdrop.3.1.1\lib\net47\GongSolutions.WPF.DragDrop.dll
-
- ..\packages\Newtonsoft.Json.12.0.3\lib\net45\Newtonsoft.Json.dll
+
+ ..\packages\Microsoft.Xaml.Behaviors.Wpf.1.1.39\lib\net45\Microsoft.Xaml.Behaviors.dll
+
+
+ ..\packages\Newtonsoft.Json.13.0.1\lib\net45\Newtonsoft.Json.dll
- ..\packages\NLog.4.7.2\lib\net45\NLog.dll
+ ..\packages\NLog.4.7.13\lib\net45\NLog.dll
@@ -74,8 +77,8 @@
-
- ..\packages\System.Runtime.CompilerServices.Unsafe.4.7.1\lib\net461\System.Runtime.CompilerServices.Unsafe.dll
+
+ ..\packages\System.Runtime.CompilerServices.Unsafe.6.0.0\lib\net461\System.Runtime.CompilerServices.Unsafe.dll
diff --git a/SatisfactorySaveEditor/View/PropertyTemplateDictionary.xaml b/SatisfactorySaveEditor/View/PropertyTemplateDictionary.xaml
index 43a12a1..19d48c4 100644
--- a/SatisfactorySaveEditor/View/PropertyTemplateDictionary.xaml
+++ b/SatisfactorySaveEditor/View/PropertyTemplateDictionary.xaml
@@ -5,7 +5,10 @@
xmlns:structs="clr-namespace:SatisfactorySaveParser.PropertyTypes.Structs;assembly=SatisfactorySaveParser"
xmlns:control="clr-namespace:SatisfactorySaveEditor.View.Control"
xmlns:struct="clr-namespace:SatisfactorySaveEditor.ViewModel.Struct"
- xmlns:converter="clr-namespace:SatisfactorySaveEditor.Converter">
+ xmlns:converter="clr-namespace:SatisfactorySaveEditor.Converter"
+ xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
+ xmlns:ei="http://schemas.microsoft.com/expression/2010/interactions"
+ xmlns:b="http://schemas.microsoft.com/xaml/behaviors">
@@ -130,8 +133,12 @@
-
-
+
+
+
+
+
@@ -150,8 +157,10 @@
-
-
+
+
diff --git a/SatisfactorySaveEditor/ViewModel/MainViewModel.cs b/SatisfactorySaveEditor/ViewModel/MainViewModel.cs
index 3e34c4b..6ecdba3 100644
--- a/SatisfactorySaveEditor/ViewModel/MainViewModel.cs
+++ b/SatisfactorySaveEditor/ViewModel/MainViewModel.cs
@@ -22,6 +22,7 @@
using AsyncAwaitBestPractices.MVVM;
using NLog;
using System.ComponentModel;
+using System.Collections.Generic;
namespace SatisfactorySaveEditor.ViewModel
{
@@ -373,6 +374,35 @@ private void CreateBackupAsync(bool manual)
MessageBox.Show("Backup created. Find it in your save file folder.");
}
+ class CachedCanJumpItem
+ {
+ public bool Result;
+ public DateTime LastQueried;
+ }
+
+
+ class CachedCanJump
+ {
+ public bool SeekCanJump(SaveObjectModel rootItem, string Target)
+ {
+ if (CachedCanJumpRecord.ContainsKey(Target))
+ {
+ var time_diff = DateTime.Now - CachedCanJumpRecord[Target].LastQueried;
+ if (time_diff.TotalSeconds <= 600) // Only check every 10 minutes.
+ return CachedCanJumpRecord[Target].Result;
+ }
+ else
+ {
+ CachedCanJumpRecord.Add(Target, new CachedCanJumpItem());
+ }
+ CachedCanJumpRecord[Target].Result = rootItem.FindChild(Target, false) != null;
+ CachedCanJumpRecord[Target].LastQueried = DateTime.Now;
+ return CachedCanJumpRecord[Target].Result;
+ }
+ private Dictionary CachedCanJumpRecord = new Dictionary();
+ }
+
+ CachedCanJump CanJumpCache = new CachedCanJump();
///
/// Checks if it's possible to jump to the passed EntityName string
///
@@ -380,7 +410,13 @@ private void CreateBackupAsync(bool manual)
/// True if rootItem contains the EntitiyName, false otherwise.
private bool CanJump(string target)
{
- return rootItem.FindChild(target, false) != null;
+ if (target == null)
+ return false;
+ return CanJumpCache.SeekCanJump(rootItem, target);
+ //if (target.Contains("/Recipes/"))
+ // return false;
+
+ //return rootItem.FindChild(target, false) != null;
}
///
@@ -706,6 +742,11 @@ private void ResetSearch()
SearchText = null;
}
+ public void DragEnter(IDropInfo dropInfo)
+ {
+ // Do nothing
+ }
+
public void DragOver(IDropInfo dropInfo)
{
if (!(dropInfo.Data is DataObject data)) return;
@@ -717,6 +758,11 @@ public void DragOver(IDropInfo dropInfo)
dropInfo.Effects = DragDropEffects.Copy;
}
+ public void DragLeave(IDropInfo dropInfo)
+ {
+ // Do nothing
+ }
+
///
/// Handle drag and drop opening of save files
///
diff --git a/SatisfactorySaveEditor/packages.config b/SatisfactorySaveEditor/packages.config
index 40d93e5..eee31dd 100644
--- a/SatisfactorySaveEditor/packages.config
+++ b/SatisfactorySaveEditor/packages.config
@@ -1,15 +1,17 @@
-
-
-
-
+
+
+
+
+
-
-
-
-
-
+
+
+
+
+
+
\ No newline at end of file
diff --git a/SatisfactorySaveParser.Tests/SatisfactorySaveParser.Tests.csproj b/SatisfactorySaveParser.Tests/SatisfactorySaveParser.Tests.csproj
index bdddd28..349bcff 100644
--- a/SatisfactorySaveParser.Tests/SatisfactorySaveParser.Tests.csproj
+++ b/SatisfactorySaveParser.Tests/SatisfactorySaveParser.Tests.csproj
@@ -1,7 +1,7 @@
- netcoreapp2.1
+ net5.0
false