This commit is contained in:
4sval 2022-08-25 20:23:20 +02:00
parent 4a6b12ade1
commit 0f120f26ea
6 changed files with 20 additions and 12 deletions

View File

@ -69,7 +69,7 @@ public partial class MainWindow
#if !DEBUG
await _applicationView.CUE4Parse.InitInformation();
#endif
await _applicationView.CUE4Parse.InitBenMappings();
await _applicationView.CUE4Parse.InitMappings();
await _applicationView.InitVgmStream();
await _applicationView.InitOodle();
@ -127,7 +127,7 @@ public partial class MainWindow
private async void OnMappingsReload(object sender, ExecutedRoutedEventArgs e)
{
await _applicationView.CUE4Parse.InitBenMappings();
await _applicationView.CUE4Parse.InitMappings();
}
private void OnAutoTriggerExecuted(object sender, ExecutedRoutedEventArgs e)

View File

@ -117,7 +117,7 @@ public class AssetsFolderViewModel
{
for (var i = 0; i < list.Count; i++)
{
if (list[i].Header.Equals(header, StringComparison.OrdinalIgnoreCase))
if (list[i].Header == header)
return list[i];
}

View File

@ -321,7 +321,7 @@ public class CUE4ParseViewModel : ViewModel
});
}
public async Task InitBenMappings()
public async Task InitMappings()
{
if (!UserSettings.IsEndpointValid(Game, EEndpointType.Mapping, out var endpoint))
return;

View File

@ -77,7 +77,7 @@
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<TextBlock Grid.Column="0" Text="Path" VerticalAlignment="Center" Margin="0 0 0 5" />
<TextBlock Grid.Column="0" Text="Expression" VerticalAlignment="Center" Margin="0 0 0 5" />
<TextBox Grid.Column="2" Margin="0 0 0 5" Text="{Binding Path, Mode=TwoWay}" TextChanged="OnTextChanged" />
<Button Grid.Column="4" Content="Test" HorizontalAlignment="Right" Margin="0 0 0 5"
Style="{DynamicResource {x:Static adonisUi:Styles.AccentButton}}" Click="OnTest"/>
@ -96,6 +96,7 @@
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<TextBlock Grid.Column="0" Text="{Binding Label}"
@ -105,6 +106,8 @@
<Button Grid.Column="1" MinWidth="78" Margin="0 0 12 0" IsDefault="True" IsCancel="False"
HorizontalAlignment="Right" VerticalAlignment="Bottom" Content="OK" Click="OnClick" />
<Button Grid.Column="2" MinWidth="78" Margin="0 0 12 0" IsDefault="False" IsCancel="False"
HorizontalAlignment="Right" VerticalAlignment="Bottom" Content="Expression Syntax" Click="OnSyntax" />
<Button Grid.Column="3" MinWidth="78" Margin="0 0 12 0" IsDefault="False" IsCancel="False"
HorizontalAlignment="Right" VerticalAlignment="Bottom" Content="Online Evaluator" Click="OnEvaluator" />
</Grid>
</Border>

View File

@ -31,21 +31,21 @@ public partial class EndpointEditor
InstructionBox.Text = type switch
{
EEndpointType.Aes =>
@"In order to make this work, you first need to understand JSON and its query language. If you don't, please close this window. If your game never changes its AES keys or is not even encrypted, please close this window. If you do understand what you are doing, you have to know that the AES path supports up to 2 tokens.
@"In order to make this work, you first need to understand JSON and its query language. If you don't, please close this window. If your game never changes its AES keys or is not even encrypted, please close this window. If you do understand what you are doing, you have to know that the AES expression supports up to 2 elements.
The first token is mandatory and will be assigned to the main AES key. It has to be looking like a key, else your configuration will not be valid (the key validity against your files will not be checked). Said key must be hexadecimal and can start without ""0x"".
The first element is mandatory and will be assigned to the main AES key. It has to be looking like a key, else your configuration will not be valid (the key validity against your files will not be checked). Said key must be hexadecimal and can start without ""0x"".
If your game uses several AES keys, you can specify a second token that will be your list of dynamic keys. The format needed is a list of objects with, at least, the next 2 variables:
If your game uses several AES keys, you can specify a second element that will be your list of dynamic keys. The format needed is a list of objects with, at least, the next 2 variables:
{
""guid"": ""the archive guid"",
""key"": ""the archive aes key""
}",
EEndpointType.Mapping =>
@"In order to make this work, you first need to understand JSON and its query language. If you don't, please close this window. If your game does not use unversioned package properties, please close this window. If you do understand what you are doing, you have to know that the mapping path supports up to 2 tokens.
@"In order to make this work, you first need to understand JSON and its query language. If you don't, please close this window. If your game does not use unversioned package properties, please close this window. If you do understand what you are doing, you have to know that the mapping expression supports up to 2 elements.
The first token is mandatory and will be assigned to the mapping download URL, which can be all kinds of mapping but not Brotli compressed.
The first element is mandatory and will be assigned to the mapping download URL, which can be all kinds of mapping but not Brotli compressed.
The second token is optional and will be assigned to the mapping file name. If unspecified, said file name will be grabbed from the URL.",
The second element is optional and will be assigned to the mapping file name. If unspecified, said file name will be grabbed from the URL.",
_ => ""
};
}
@ -86,6 +86,11 @@ public partial class EndpointEditor
endpoint.IsValid = false;
}
private void OnSyntax(object sender, RoutedEventArgs e)
{
Process.Start(new ProcessStartInfo { FileName = "https://support.smartbear.com/alertsite/docs/monitors/api/endpoint/jsonpath.html", UseShellExecute = true });
}
private void OnEvaluator(object sender, RoutedEventArgs e)
{
Process.Start(new ProcessStartInfo { FileName = "https://jsonpath.herokuapp.com/", UseShellExecute = true });

View File

@ -52,7 +52,7 @@ public partial class SettingsView
await _applicationView.CUE4Parse.LoadLocalizedResources();
break;
case SettingsOut.ReloadMappings:
await _applicationView.CUE4Parse.InitBenMappings();
await _applicationView.CUE4Parse.InitMappings();
break;
case SettingsOut.CheckForUpdates:
ApplicationService.ApiEndpointView.FModelApi.CheckForUpdates(UserSettings.Default.UpdateMode);