diff --git a/Directory.Build.props b/Directory.Build.props
new file mode 100644
index 0000000..1452ed3
--- /dev/null
+++ b/Directory.Build.props
@@ -0,0 +1,13 @@
+
+
+
+ latest
+ true
+ 1591
+ MIT
+ https://git.pilzinsel64.de/sm64-rom-manager/sm64-rom-manager
+ Pilzinsel64
+ enable
+
+
+
\ No newline at end of file
diff --git a/NuGet.Config b/NuGet.Config
index b9b6491..5deed28 100644
--- a/NuGet.Config
+++ b/NuGet.Config
@@ -1,6 +1,6 @@
-
+
\ No newline at end of file
diff --git a/Project64Savestater/App.config b/Project64Savestater/App.config
index 565b94b..baaedee 100644
--- a/Project64Savestater/App.config
+++ b/Project64Savestater/App.config
@@ -2,6 +2,6 @@
-
+
diff --git a/Project64Savestater/AppGlobals.cs b/Project64Savestater/AppGlobals.cs
new file mode 100644
index 0000000..37d8067
--- /dev/null
+++ b/Project64Savestater/AppGlobals.cs
@@ -0,0 +1,23 @@
+using Pilz.UI.Telerik.Symbols;
+using System.Reflection;
+using System.Runtime.CompilerServices;
+
+namespace PJ64Savestater;
+
+public static class AppGlobals
+{
+ public static IRadSymbolFactory Symbols { get; } = new AppSymbolFactory();
+
+ private class AppSymbolFactory : RadSymbolFactory
+ {
+ public override Assembly GetImageResourceAssembly()
+ {
+ return Assembly.GetExecutingAssembly();
+ }
+
+ public override string GetImageRessourcePath(AppSymbols svgImage)
+ {
+ return $"{typeof(AppGlobals).Namespace}.Symbols.{svgImage}.svg";
+ }
+ }
+}
diff --git a/Project64Savestater/AppSymbols.cs b/Project64Savestater/AppSymbols.cs
new file mode 100644
index 0000000..133ed16
--- /dev/null
+++ b/Project64Savestater/AppSymbols.cs
@@ -0,0 +1,11 @@
+namespace PJ64Savestater;
+
+public enum AppSymbols
+{
+ browse_folder,
+ circled_play,
+ game_controller,
+ refresh,
+ save,
+ stop_cicled,
+}
diff --git a/Project64Savestater/ControllerTypes.cs b/Project64Savestater/ControllerTypes.cs
index 868d466..73272b1 100644
--- a/Project64Savestater/ControllerTypes.cs
+++ b/Project64Savestater/ControllerTypes.cs
@@ -1,14 +1,7 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
+namespace PJ64Savestater;
-namespace PJ64Savestater
+public enum ControllerTypes : byte
{
- public enum ControllerTypes : byte
- {
- Keyboard,
- DirectInput
- }
+ Keyboard,
+ DirectInput
}
diff --git a/Project64Savestater/Globals.cs b/Project64Savestater/Globals.cs
index 3824b87..c7dcb6c 100644
--- a/Project64Savestater/Globals.cs
+++ b/Project64Savestater/Globals.cs
@@ -1,24 +1,18 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
+namespace PJ64Savestater;
-namespace PJ64Savestater
+internal static class Globals
{
- internal static class Globals
+ public static bool CompareTwoByteArrays(byte[] arr1, byte[] arr2)
{
- public static bool CompareTwoByteArrays(byte[] arr1, byte[] arr2)
- {
- if (arr2.Count() != arr1.Count())
- return false;
- for (int i = 0, loopTo = arr1.Count() - 1; i <= loopTo; i++)
- {
- if (arr1[i] != arr2[i])
- return false;
- }
+ if (arr2.Length != arr1.Length)
+ return false;
- return true;
+ for (int i = 0, loopTo = arr1.Length - 1; i <= loopTo; i++)
+ {
+ if (arr1[i] != arr2[i])
+ return false;
}
+
+ return true;
}
}
diff --git a/Project64Savestater/InputControl.cs b/Project64Savestater/InputControl.cs
index 8e88c33..63591c7 100644
--- a/Project64Savestater/InputControl.cs
+++ b/Project64Savestater/InputControl.cs
@@ -1,43 +1,38 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
+namespace PJ64Savestater;
-namespace PJ64Savestater
+public class InputControl
{
- public class InputControl
+ public InputKeys? InputKey { get; set; } = null;
+ public int? KeyIndex { get; set; } = null;
+ public object? Value { get; set; } = null;
+
+ public static bool operator ==(InputControl left, InputControl right)
{
- public InputKeys? InputKey { get; set; } = null;
- public int? KeyIndex { get; set; } = null;
- public object Value { get; set; } = null;
+ return left.InputKey == right.InputKey && left.KeyIndex == right.KeyIndex && (left.Value == null && right.Value == null || left.Value != null && right.Value != null && left.Value.Equals(right.Value));
+ }
- public static bool operator ==(InputControl left, InputControl right)
- {
- return left.InputKey == right.InputKey && left.KeyIndex == right.KeyIndex && ((left.Value == null && right.Value == null) || (left.Value != null && right.Value != null && left.Value.Equals(right.Value)));
- }
+ public static bool operator !=(InputControl left, InputControl right)
+ {
+ return !(left == right);
+ }
- public static bool operator !=(InputControl left, InputControl right)
- {
- return !(left == right);
- }
+ public override bool Equals(object? obj)
+ {
+ return obj is InputControl control
+ && EqualityComparer.Default.Equals(InputKey, control.InputKey)
+ && EqualityComparer.Default.Equals(KeyIndex, control.KeyIndex)
+ && EqualityComparer