GUI: Implement plugin interface

This commit is contained in:
Katy Coe
2020-12-19 20:49:39 +01:00
parent 3ee658d5ac
commit 637952f360
11 changed files with 621 additions and 15 deletions

View File

@@ -16,7 +16,16 @@ namespace Il2CppInspector.GUI
if (value == null || targetType != typeof(string))
return DependencyProperty.UnsetValue;
return ((ulong) value).ToString("x16");
return value switch {
ulong n => n.ToString("x16"),
long n => n.ToString("x16"),
uint n => n.ToString("x8"),
int n => n.ToString("x8"),
ushort n => n.ToString("x4"),
short n => n.ToString("x4"),
byte n => n.ToString("x2"),
_ => throw new NotImplementedException("Unknown number format")
};
}
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) {