mirror of
https://github.com/4sval/FModel.git
synced 2026-05-07 13:31:58 -05:00
No more 9999 date on Never (Update Page)
This commit is contained in:
parent
d6f706d803
commit
ceb6d08268
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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 });
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
using System;
|
||||
using System.Globalization;
|
||||
using System.Windows.Data;
|
||||
using FModel.Extensions;
|
||||
|
||||
namespace FModel.Views.Resources.Converters;
|
||||
|
||||
|
|
|
|||
23
FModel/Views/Resources/Converters/TextToRefreshConverter.cs
Normal file
23
FModel/Views/Resources/Converters/TextToRefreshConverter.cs
Normal 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();
|
||||
}
|
||||
}
|
||||
|
|
@ -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>
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user