Skip to content

Commit

Permalink
Merge pull request #448 from Leo-Corporation/vNext
Browse files Browse the repository at this point in the history
Version 4.4.0.2403
  • Loading branch information
lpeyr committed Mar 3, 2024
2 parents 62ebea8 + 9e1144d commit da236d6
Show file tree
Hide file tree
Showing 51 changed files with 434 additions and 288 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/dotnet-desktop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
- name: Install .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: 6.0.x
dotnet-version: 8.0.x

# Add MSBuild to the PATH: https://github.com/microsoft/setup-msbuild
- name: Setup MSBuild.exe
Expand Down
8 changes: 4 additions & 4 deletions Gavilya.Setup/Setup.iss
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!

#define MyAppName "Gavilya"
#define MyAppVersion GetFileVersion('..\Gavilya\bin\Release\net6.0-windows\Gavilya.exe')
#define MyAppVersion GetFileVersion('..\Gavilya\bin\Release\net8.0-windows\Gavilya.exe')
#define MyAppPublisher "Léo Corporation"
#define MyAppURL "https://leocorporation.dev/"
#define MyAppExeName "Gavilya.exe"
Expand Down Expand Up @@ -50,10 +50,10 @@ Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{
Name: "quicklaunchicon"; Description: "{cm:CreateQuickLaunchIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked; OnlyBelowVersion: 6.1; Check: not IsAdminInstallMode

[Files]
Source: "H:\Gavilya\Gavilya\bin\Release\net6.0-windows\Gavilya.exe"; DestDir: "{app}"; Flags: ignoreversion
Source: "H:\Gavilya\Gavilya\bin\Release\net6.0-windows\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs
Source: "H:\Gavilya\Gavilya\bin\Release\net8.0-windows\Gavilya.exe"; DestDir: "{app}"; Flags: ignoreversion
Source: "H:\Gavilya\Gavilya\bin\Release\net8.0-windows\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs
Source: "H:\Gavilya\Gavilya.Fps\bin\Release\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs
Source: "H:\Gavilya\Xalyus Updater\bin\Release\net6.0-windows\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs
Source: "H:\Gavilya\Xalyus Updater\bin\Release\net8.0-windows\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs
; NOTE: Don't use "Flags: ignoreversion" on any shared system files

[Icons]
Expand Down
6 changes: 5 additions & 1 deletion Gavilya/App.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -633,12 +633,16 @@
Value="{TemplateBinding VerticalOffset}">
<ScrollBar.Template>
<ControlTemplate TargetType="{x:Type ScrollBar}">
<Track x:Name="PART_Track" IsDirectionReversed="true">
<Track
x:Name="PART_Track"
MinHeight="20"
IsDirectionReversed="true">
<Track.Thumb>
<Thumb Background="{DynamicResource SelectedBackground}">
<Thumb.Template>
<ControlTemplate TargetType="{x:Type Thumb}">
<Border
MinHeight="20"
Margin="5"
Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
Expand Down
4 changes: 2 additions & 2 deletions Gavilya/App.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ protected override void OnStartup(StartupEventArgs e)
base.OnStartup(e);
}

private bool IsSaveDay(int day)
private static bool IsSaveDay(int day)
{
// Get the current date
DateTime currentDate = DateTime.Today;
Expand Down Expand Up @@ -124,7 +124,7 @@ private bool IsSaveDay(int day)
return false;
}

private void CreateJumpLists(GameList games)
private static void CreateJumpLists(GameList games)
{
JumpList jumpList = new();

Expand Down
3 changes: 1 addition & 2 deletions Gavilya/Commands/DropBehavior.cs
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,7 @@ private static ICommand GetPreviewDropCommand(UIElement inUIElement)

private static void PreviewDropCommandPropertyChangedCallBack(DependencyObject inDependencyObject, DependencyPropertyChangedEventArgs inEventArgs)
{
UIElement uiElement = inDependencyObject as UIElement;
if (null == uiElement) return;
if (inDependencyObject is not UIElement uiElement) return;

uiElement.Drop += (sender, args) =>
{
Expand Down
13 changes: 3 additions & 10 deletions Gavilya/Commands/RelayCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,25 +27,18 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE

namespace Gavilya.Commands;

public class RelayCommand : ICommand
public class RelayCommand(Action<object> execute, Func<object, bool> canExecute) : ICommand
{
private readonly Action<object> _execute;
private readonly Func<object, bool> _canExecute;
private readonly Action<object> _execute = execute ?? throw new ArgumentNullException(nameof(execute));

public RelayCommand(Action<object> execute) : this(execute, null)

Check warning on line 34 in Gavilya/Commands/RelayCommand.cs

View workflow job for this annotation

GitHub Actions / build

Cannot convert null literal to non-nullable reference type.

Check warning on line 34 in Gavilya/Commands/RelayCommand.cs

View workflow job for this annotation

GitHub Actions / build

Cannot convert null literal to non-nullable reference type.
{

}

public RelayCommand(Action<object> execute, Func<object, bool> canExecute)
{
_execute = execute ?? throw new ArgumentNullException(nameof(execute));
_canExecute = canExecute;
}

public bool CanExecute(object parameter)

Check warning on line 39 in Gavilya/Commands/RelayCommand.cs

View workflow job for this annotation

GitHub Actions / build

Nullability of reference types in type of parameter 'parameter' of 'bool RelayCommand.CanExecute(object parameter)' doesn't match implicitly implemented member 'bool ICommand.CanExecute(object? parameter)' (possibly because of nullability attributes).

Check warning on line 39 in Gavilya/Commands/RelayCommand.cs

View workflow job for this annotation

GitHub Actions / build

Nullability of reference types in type of parameter 'parameter' of 'bool RelayCommand.CanExecute(object parameter)' doesn't match implicitly implemented member 'bool ICommand.CanExecute(object? parameter)' (possibly because of nullability attributes).
{
return _canExecute?.Invoke(parameter) ?? true;
return canExecute?.Invoke(parameter) ?? true;
}

public void Execute(object parameter)

Check warning on line 44 in Gavilya/Commands/RelayCommand.cs

View workflow job for this annotation

GitHub Actions / build

Nullability of reference types in type of parameter 'parameter' of 'void RelayCommand.Execute(object parameter)' doesn't match implicitly implemented member 'void ICommand.Execute(object? parameter)' (possibly because of nullability attributes).

Check warning on line 44 in Gavilya/Commands/RelayCommand.cs

View workflow job for this annotation

GitHub Actions / build

Nullability of reference types in type of parameter 'parameter' of 'void RelayCommand.Execute(object parameter)' doesn't match implicitly implemented member 'void ICommand.Execute(object? parameter)' (possibly because of nullability attributes).
Expand Down
93 changes: 73 additions & 20 deletions Gavilya/Components/ExecutableSelectorComponent.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,30 +3,83 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:lang="clr-namespace:Gavilya.Properties"
xmlns:local="clr-namespace:Gavilya.Components"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
MinWidth="300"
MaxWidth="350"
FontFamily="..\Fonts\#Hauora"
Foreground="{DynamicResource Foreground}"
mc:Ignorable="d">
<Button
Padding="5"
<Border
Margin="10 5"
Padding="10"
Background="{DynamicResource Background2}"
Command="{Binding ClickCommand}"
Cursor="Hand"
Style="{DynamicResource RegularButton2}">
<StackPanel
Grid.Column="1"
Width="380"
VerticalAlignment="Center">
<TextBlock
x:Name="GameNameTxt"
FontSize="18"
FontWeight="ExtraBold"
Text="{Binding Name}" />
<TextBlock
x:Name="FilePathTxt"
FontSize="10"
Text="{Binding FilePath}" />
</StackPanel>
</Button>
BorderBrush="{DynamicResource SelectedBackground}"
BorderThickness="2"
CornerRadius="10">

<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition />
</Grid.RowDefinitions>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<TextBlock
x:Name="SsidTxt"
Grid.Column="1"
d:Text="Game Name"
FontSize="16"
FontWeight="ExtraBold"
Text="{Binding Name}" />
<StackPanel Grid.Column="2" Orientation="Horizontal">
<Button
x:Name="SelectBtn"
Grid.Row="1"
Margin="0 0 5 0"
Padding="5 2"
HorizontalAlignment="Right"
Background="{DynamicResource Accent}"
Command="{Binding ClickCommand}"
Content="{x:Static lang:Resources.Select}"
Cursor="Hand"
FontWeight="ExtraBold"
Style="{DynamicResource AccentButton}" />


<Button
x:Name="ExpanderBtn"
Grid.Column="1"
Padding="5"
Background="Transparent"
Command="{Binding CollapseCommand}"
Content="{Binding CollapseIcon}"
FontFamily="../Fonts/#FluentSystemIcons-Regular"
Foreground="{DynamicResource Foreground}"
Style="{DynamicResource RegularButton}" />
</StackPanel>


</Grid>
<Grid
x:Name="CollapseGrid"
Grid.Row="1"
Margin="5"
d:Visibility="Visible"
Visibility="{Binding CollapseGridVid}">
<TextBlock
x:Name="FilePathTxt"
d:Text="C:/File"
FontSize="10"
Text="{Binding FilePath}"
TextWrapping="Wrap" />
</Grid>
</Grid>
</Border>

</UserControl>
6 changes: 4 additions & 2 deletions Gavilya/Components/RawgResultComponent.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,11 @@
Foreground="{DynamicResource Foreground}"
mc:Ignorable="d">
<Border
Margin="10"
Margin="10 5"
Padding="10"
Background="{DynamicResource SelectedBackground}"
Background="{DynamicResource Background2}"
BorderBrush="{DynamicResource SelectedBackground}"
BorderThickness="2"
CornerRadius="10">

<Grid>
Expand Down
110 changes: 90 additions & 20 deletions Gavilya/Components/UwpSelectorComponent.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,30 +3,100 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:lang="clr-namespace:Gavilya.Properties"
xmlns:local="clr-namespace:Gavilya.Components"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
MaxWidth="340"
FontFamily="..\Fonts\#Hauora"
Foreground="{DynamicResource Foreground}"
mc:Ignorable="d">
<Button
Padding="5"
<Border
Margin="10 5"
Padding="10"
Background="{DynamicResource Background2}"
Command="{Binding ClickCommand}"
Cursor="Hand"
Style="{DynamicResource RegularButton2}">
<StackPanel
Grid.Column="1"
Width="380"
VerticalAlignment="Center">
<TextBlock
x:Name="GameNameTxt"
FontSize="18"
FontWeight="ExtraBold"
Text="{Binding Name}" />
<TextBlock
x:Name="GamePackageInfoTxt"
FontSize="10"
Text="{Binding InfoText}" />
</StackPanel>
</Button>
BorderBrush="{DynamicResource SelectedBackground}"
BorderThickness="2"
CornerRadius="10">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition />
</Grid.RowDefinitions>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<TextBlock
x:Name="SsidTxt"
Grid.Column="1"
d:Text="Game Name"
FontSize="16"
FontWeight="ExtraBold"
Text="{Binding Name}" />
<StackPanel Grid.Column="2" Orientation="Horizontal">
<Button
x:Name="SelectBtn"
Grid.Row="1"
Margin="0 0 5 0"
Padding="5 2"
HorizontalAlignment="Right"
Background="{DynamicResource Accent}"
Command="{Binding ClickCommand}"
Content="{x:Static lang:Resources.Select}"
Cursor="Hand"
FontWeight="ExtraBold"
Style="{DynamicResource AccentButton}" />
<Button
x:Name="ExpanderBtn"
Grid.Column="1"
Padding="5"
Background="Transparent"
Command="{Binding CollapseCommand}"
Content="{Binding CollapseIcon}"
FontFamily="../Fonts/#FluentSystemIcons-Regular"
Foreground="{DynamicResource Foreground}"
Style="{DynamicResource RegularButton}" />
</StackPanel>
</Grid>
<Grid
x:Name="CollapseGrid"
Grid.Row="1"
Margin="5"
d:Visibility="Visible"
Visibility="{Binding CollapseGridVid}">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<TextBlock FontSize="10" Text="{x:Static lang:Resources.Package}" />
<TextBlock
Grid.Row="1"
FontSize="10"
Text="{x:Static lang:Resources.AppID}" />
<TextBlock
x:Name="FilePathTxt"
Grid.Column="1"
Margin="5 0 0 0"
d:Text="C:/File"
FontSize="10"
Text="{Binding PackageName}"
TextWrapping="Wrap" />
<TextBlock
x:Name="AppTxt"
Grid.Row="1"
Grid.Column="1"
Margin="5 0 0 0"
d:Text="C:/File"
FontSize="10"
Text="{Binding AppId}"
TextWrapping="Wrap" />
</Grid>
</Grid>
</Border>
</UserControl>
10 changes: 5 additions & 5 deletions Gavilya/Gavilya.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@

<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>net6.0-windows</TargetFramework>
<TargetFramework>net8.0-windows</TargetFramework>
<Nullable>enable</Nullable>
<UseWPF>true</UseWPF>
<UseWindowsForms>True</UseWindowsForms>
<ApplicationManifest>app.manifest</ApplicationManifest>
<Title>Gavilya</Title>
<Version>4.3.0.2312</Version>
<Version>4.4.0.2403</Version>
<Authors>Léo Corporation</Authors>
<Description>Gavilya is a simple game launcher for Windows.</Description>
<Copyright2023</Copyright>
<Copyright2024</Copyright>
<PackageProjectUrl>gavilya.leocorporation.dev</PackageProjectUrl>
<PackageIcon>Gavilya.png</PackageIcon>
<RepositoryUrl>https://github.com/Leo-Corporation/Gavilya</RepositoryUrl>
Expand Down Expand Up @@ -53,8 +53,8 @@
<ItemGroup>
<PackageReference Include="Microsoft.Xaml.Behaviors.Wpf" Version="1.1.77" />
<PackageReference Include="MouseKeyHook" Version="5.7.1" />
<PackageReference Include="PeyrSharp.Core" Version="1.10.0.2310" />
<PackageReference Include="PeyrSharp.Env" Version="1.10.0.2310" />
<PackageReference Include="PeyrSharp.Core" Version="2.1.0.2312" />
<PackageReference Include="PeyrSharp.Env" Version="2.1.0.2312" />
<PackageReference Include="RestSharp" Version="110.2.0" />
</ItemGroup>

Expand Down
2 changes: 1 addition & 1 deletion Gavilya/Helpers/Context.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,6 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
namespace Gavilya.Helpers;
public static class Context
{
public static string Version => "4.3.0.2312";
public static string Version => "4.4.0.2403";
public static string LastVersionLink => "https://raw.githubusercontent.com/Leo-Corporation/LeoCorp-Docs/master/Liens/Update%20System/Gavilya/Version.txt";
}
Loading

0 comments on commit da236d6

Please sign in to comment.