No more 9999 date on Never (Update Page)

This commit is contained in:
Krowe Moh 2026-03-24 19:29:38 +11:00
parent d6f706d803
commit ceb6d08268
5 changed files with 26 additions and 5 deletions

View File

@ -104,7 +104,7 @@ public class ApplicationViewModel : ViewModel
if (UserSettings.Default.CurrentDir is null)
{
//If no game is selected, many things will break before a shutdown request is processed in the normal way.
//A hard exit is preferable to an unhandled expection in this case
//A hard exit is preferable to an unhandled exception in this case
Environment.Exit(0);
}
@ -126,7 +126,6 @@ public class ApplicationViewModel : ViewModel
if (sender is not IAesVfsReader reader) return;
CUE4Parse.GameDirectory.Disable(reader);
};
CustomDirectories = new CustomDirectoriesViewModel();
SettingsView = new SettingsViewModel();
AesManager = new AesManagerViewModel(CUE4Parse);

View File

@ -91,7 +91,7 @@ public partial class EndpointEditor
private void OnEvaluator(object sender, RoutedEventArgs e)
{
Process.Start(new ProcessStartInfo { FileName = "https://jsonpath.herokuapp.com/", UseShellExecute = true });
Process.Start(new ProcessStartInfo { FileName = "https://jsonpath.com/", UseShellExecute = true });
}
}

View File

@ -1,7 +1,6 @@
using System;
using System.Globalization;
using System.Windows.Data;
using FModel.Extensions;
namespace FModel.Views.Resources.Converters;

View File

@ -0,0 +1,23 @@
using System;
using System.Globalization;
using System.Windows.Data;
namespace FModel.Views.Resources.Converters;
public class TextToRefreshConverter : IValueConverter
{
public static readonly TextToRefreshConverter Instance = new();
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
if (value is DateTime dt && dt != DateTime.MaxValue)
return $"Next Refresh: {dt:MMM d, yyyy}";
return "Next Refresh: Never";
}
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
{
throw new NotImplementedException();
}
}

View File

@ -63,7 +63,7 @@
</adonisControls:SplitButton.SplitMenu>
</adonisControls:SplitButton>
<TextBlock VerticalAlignment="Bottom" HorizontalAlignment="Right" FontSize="10" Margin="0 2.5 0 0"
Text="{Binding NextUpdateCheck, Source={x:Static local:Settings.UserSettings.Default}, StringFormat=Next Refresh: {0:MMM d, yyyy}}" />
Text="{Binding NextUpdateCheck, Source={x:Static local:Settings.UserSettings.Default}, Converter={x:Static converters:TextToRefreshConverter.Instance}}" />
</StackPanel>
</Grid>