Skip to content

Commit

Permalink
- Updated to .NET 8
Browse files Browse the repository at this point in the history
- The game type filter now replaces the previous entry when you select a new one
- Bug fix: Admin tab reindex button did nothing
- Bug fix: Crash on startup if the installed .NET version is too old for some use cases
  • Loading branch information
Yelo420 committed Oct 30, 2024
1 parent 074aa73 commit eb29f66
Show file tree
Hide file tree
Showing 8 changed files with 36 additions and 23 deletions.
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# GameVault App Changelog

## 1.13.1
Recommended Gamevault Server Version: `v13.1.0`
### Changes

- Updated to .NET 8
- The game type filter now replaces the previous entry when you select a new one
- Bug fix: Admin tab reindex button did nothing
- Bug fix: Crash on startup if the installed .NET version is too old for some use cases

## 1.13.0
Recommended Gamevault Server Version: `v13.1.0`
### Changes
Expand Down
13 changes: 0 additions & 13 deletions gamevault/App.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,27 +8,14 @@
using System.Windows;
using System.Windows.Forms;
using Application = System.Windows.Application;
using ButtonBase = System.Windows.Controls.Primitives.ButtonBase;
using System.Linq;
using gamevault.Helper;
using System.Threading.Tasks;
using System.IO.Pipes;
using System.Windows.Threading;
using System.Text.Json;
using System.Diagnostics;
using System.Drawing;
using System.Windows.Shell;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;
using System.Windows.Media;
using gamevault.UserControls;
using System.Windows.Controls;
using System.Reflection;
using System.Windows.Controls.Primitives;
using System.ComponentModel;
using System.Collections.Generic;
using Button = System.Windows.Controls.Button;
using System.Reflection.Metadata;

namespace gamevault
{
Expand Down
2 changes: 1 addition & 1 deletion gamevault/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
//(used if a resource is not found in the page,
// app, or any theme specific resource dictionaries)
)]
[assembly: AssemblyVersion("1.13.0.0")]
[assembly: AssemblyVersion("1.13.1.0")]
[assembly: AssemblyCopyright("© Phalcode™. All Rights Reserved.")]
#if DEBUG
[assembly: XmlnsDefinition("debug-mode", "Namespace")]
Expand Down
20 changes: 14 additions & 6 deletions gamevault/Helper/AnalyticsHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
using System.Net.Http;
using System.Net.Http.Headers;
using System.Reflection;
using System.Runtime.Intrinsics.Arm;
using System.Text;
using System.Text.Json;
using System.Text.Json.Serialization;
Expand Down Expand Up @@ -258,12 +259,19 @@ public void SendCustomEvent(string eventName, object meta)
}
public object GetSysInfo()
{
var OS = new ManagementObjectSearcher("select * from Win32_OperatingSystem").Get().Cast<ManagementObject>().First();
string os = $"{OS["Caption"]} - {OS["OSArchitecture"]} - Version.{OS["Version"]}"; os = os.Replace("NT 5.1.2600", "XP"); os = os.Replace("NT 5.2.3790", "Server 2003");
string ram = $"{OS["TotalVisibleMemorySize"]} KB";
var CPU = new ManagementObjectSearcher("select * from Win32_Processor").Get().Cast<ManagementObject>().First();
string cpu = $"{CPU["Name"]} - {CPU["MaxClockSpeed"]} MHz - {CPU["NumberOfCores"]} Core";
return new { app_version = SettingsViewModel.Instance.Version, hardware_os = os, hardware_ram = ram, hardware_cpu = cpu, };
try
{
var OS = new ManagementObjectSearcher("select * from Win32_OperatingSystem").Get().Cast<ManagementObject>().First();
string os = $"{OS["Caption"]} - {OS["OSArchitecture"]} - Version.{OS["Version"]}"; os = os.Replace("NT 5.1.2600", "XP"); os = os.Replace("NT 5.2.3790", "Server 2003");
string ram = $"{OS["TotalVisibleMemorySize"]} KB";
var CPU = new ManagementObjectSearcher("select * from Win32_Processor").Get().Cast<ManagementObject>().First();
string cpu = $"{CPU["Name"]} - {CPU["MaxClockSpeed"]} MHz - {CPU["NumberOfCores"]} Core";
return new { app_version = SettingsViewModel.Instance.Version, hardware_os = os, hardware_ram = ram, hardware_cpu = cpu, };
}
catch (Exception ex)
{
return new { app_version = SettingsViewModel.Instance.Version, hardware_os = $"The system information could not be loaded due to an {ex.GetType().Name}" };
}
}
private bool IsWineRunning()
{
Expand Down
1 change: 0 additions & 1 deletion gamevault/UserControls/AdminConsoleUserControl.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,6 @@ private void ShowUser_Click(object sender, RoutedEventArgs e)
private async void Reindex_Click(object sender, RoutedEventArgs e)
{
((FrameworkElement)sender).IsEnabled = false;
return;
await Task.Run(() =>
{
try
Expand Down
10 changes: 10 additions & 0 deletions gamevault/UserControls/GeneralControls/PillSelector.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,12 @@ public int MaxSelection
get => (int)GetValue(MaxSelectionProperty);
set => SetValue(MaxSelectionProperty, value);
}
public static readonly DependencyProperty IsMultiSelectionProperty = DependencyProperty.Register(name: "IsMultiSelection", propertyType: typeof(bool), ownerType: typeof(PillSelector), new PropertyMetadata(true));
public bool IsMultiSelection
{
get => (bool)GetValue(IsMultiSelectionProperty);
set => SetValue(IsMultiSelectionProperty, value);
}
public event EventHandler EntriesUpdated;
private bool loaded = false;
private InputTimer debounceTimer { get; set; }
Expand Down Expand Up @@ -181,6 +187,10 @@ private void AddEntry_Click(object sender, MouseButtonEventArgs e)
{
if (selectedEntries.Contains((Pill)((FrameworkElement)sender).DataContext)) return;
if (MaxSelection > 0 && selectedEntries.Count >= MaxSelection) return;
if(!IsMultiSelection)
{
selectedEntries.Clear();
}

selectedEntries.Add((Pill)((FrameworkElement)sender).DataContext);
uiSelectedEntries.ItemsSource = null;
Expand Down
2 changes: 1 addition & 1 deletion gamevault/UserControls/LibraryUserControl.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@
<local:PillSelector x:Name="uiFilterGameTypeSelector" SelectionType="GameType" Margin="12,0,24,0" Width="175" EntriesUpdated="FilterUpdated"/>
<local:PillSelector x:Name="uiFilterTagSelector" SelectionType="Tags" Margin="0,0,24,0" Width="175" EntriesUpdated="FilterUpdated"/>
<local:PillSelector x:Name="uiFilterGenreSelector" SelectionType="Genres" Margin="0,0,24,0" Width="175" EntriesUpdated="FilterUpdated"/>
<local:PillSelector x:Name="uiFilterGameStateSelector" SelectionType="GameState" MaxSelection="1" Margin="0,0,23,0" Width="175" EntriesUpdated="FilterUpdated"/>
<local:PillSelector x:Name="uiFilterGameStateSelector" SelectionType="GameState" IsMultiSelection="False" Margin="0,0,23,0" Width="175" EntriesUpdated="FilterUpdated"/>
<StackPanel Margin="0,0,97,0">
<TextBlock Text="Release Year" FontSize="15"/>
<local:DateRangeSelector x:Name="uiFilterReleaseDateRangeSelector" EntriesUpdated="FilterUpdated"/>
Expand Down
2 changes: 1 addition & 1 deletion gamevault/gamevault.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>net6.0-windows10.0.22000.0</TargetFramework>
<TargetFramework>net8.0-windows10.0.22000.0</TargetFramework>
<Nullable>enable</Nullable>
<UseWPF>true</UseWPF>
<Platforms>AnyCPU;x64</Platforms>
Expand Down

0 comments on commit eb29f66

Please sign in to comment.