Skip to content
This repository has been archived by the owner on Aug 17, 2023. It is now read-only.

Commit

Permalink
Merge pull request #178 from Leo-Corporation/vNext
Browse files Browse the repository at this point in the history
Version 2.5.0.2304
  • Loading branch information
lpeyr authored Apr 21, 2023
2 parents f2e6b47 + 6ce40dd commit c7bc29f
Show file tree
Hide file tree
Showing 19 changed files with 553 additions and 90 deletions.
396 changes: 396 additions & 0 deletions Gerayis.Setup/Languages/ChineseSimplified.isl

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions Gerayis.Setup/Setup.iss
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!

#define MyAppName "Gerayis"
#define MyAppVersion "2.4.0.2302"
#define MyAppFullVersion "2.4.0.2302"
#define MyAppVersion "2.5.0.2304"
#define MyAppFullVersion "2.5.0.2304"
#define MyAppPublisher "Léo Corporation"
#define MyAppURL "https://leocorporation.dev/"
#define MyAppExeName "Gerayis.exe"
Expand Down Expand Up @@ -39,7 +39,7 @@ WizardStyle=modern
Name: "english"; MessagesFile: "compiler:Default.isl"
Name: "french"; MessagesFile: "compiler:Languages\French.isl"
; Remove the line below if there are compilation errors
Name: "chinesesimplified"; MessagesFile: "compiler:Languages\ChineseSimplified.isl"
Name: "chinesesimplified"; MessagesFile: "Languages\ChineseSimplified.isl"

[Tasks]
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
Expand Down
10 changes: 4 additions & 6 deletions Gerayis/App.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@
</Style>
<SolidColorBrush x:Key="Button.Static.Background" Color="#FFDDDDDD"/>
<SolidColorBrush x:Key="Button.Static.Border" Color="#FF707070"/>
<SolidColorBrush x:Key="Button.MouseOver.Background" Color="#8B2DF0"/>
<SolidColorBrush x:Key="Button.MouseOver.Border" Color="#8B2DF0"/>
<SolidColorBrush x:Key="Button.Pressed.Background" Color="#FF7925D4"/>
<SolidColorBrush x:Key="Button.Pressed.Border" Color="#FF7925D4"/>
<SolidColorBrush x:Key="Button.MouseOver.Background" Color="{Binding Source={StaticResource LightAccentColor}}"/>
<SolidColorBrush x:Key="Button.MouseOver.Border" Color="{Binding Source={StaticResource LightAccentColor}}"/>
<SolidColorBrush x:Key="Button.Pressed.Background" Color="{Binding Source={StaticResource LightAccentColor}}"/>
<SolidColorBrush x:Key="Button.Pressed.Border" Color="{Binding Source={StaticResource LightAccentColor}}"/>
<SolidColorBrush x:Key="Button.Disabled.Background" Color="#FFF4F4F4"/>
<SolidColorBrush x:Key="Button.Disabled.Border" Color="#FFADB2B5"/>
<SolidColorBrush x:Key="Button.Disabled.Foreground" Color="#FF838383"/>
Expand All @@ -59,12 +59,10 @@
<Trigger Property="IsMouseOver" Value="true">
<Setter Property="Background" TargetName="border" Value="{StaticResource Button.MouseOver.Background}"/>
<Setter Property="BorderBrush" TargetName="border" Value="{StaticResource Button.MouseOver.Border}"/>
<Setter Property="TextElement.Foreground" TargetName="contentPresenter" Value="White"/>
</Trigger>
<Trigger Property="IsPressed" Value="true">
<Setter Property="Background" TargetName="border" Value="{StaticResource Button.Pressed.Background}"/>
<Setter Property="BorderBrush" TargetName="border" Value="{StaticResource Button.Pressed.Border}"/>
<Setter Property="TextElement.Foreground" TargetName="contentPresenter" Value="White"/>
</Trigger>
<Trigger Property="IsEnabled" Value="false">
<Setter Property="Background" TargetName="border" Value="{StaticResource Button.Disabled.Background}"/>
Expand Down
2 changes: 1 addition & 1 deletion Gerayis/Classes/Global.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public static class Global
/// <summary>
/// The current version of Gerayis.
/// </summary>
public static string Version => "2.4.0.2302";
public static string Version => "2.5.0.2304";

/// <summary>
/// List of the available languages.
Expand Down
8 changes: 4 additions & 4 deletions Gerayis/Gerayis.csproj
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>net6.0-windows</TargetFramework>
<UseWPF>true</UseWPF>
<ApplicationManifest>app.manifest</ApplicationManifest>
<ApplicationIcon>Gerayis.ico</ApplicationIcon>
<Version>2.4.0.2302</Version>
<Version>2.5.0.2304</Version>
<Authors>Léo Corporation</Authors>
<Description>A modern Bar/QR Code generator for Windows.</Description>
<Copyright>© 2023</Copyright>
Expand All @@ -33,8 +33,8 @@

<ItemGroup>
<PackageReference Include="BarcodeLib" Version="2.4.0" />
<PackageReference Include="MouseKeyHook" Version="5.6.0" />
<PackageReference Include="PeyrSharp" Version="1.3.0.2302" />
<PackageReference Include="MouseKeyHook" Version="5.7.1" />
<PackageReference Include="PeyrSharp" Version="1.5.0.2304" />
<PackageReference Include="QRCoder" Version="1.4.3" />
</ItemGroup>

Expand Down
12 changes: 6 additions & 6 deletions Gerayis/MainWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@
</Grid.ColumnDefinitions>

<StackPanel Margin="10" Grid.Column="0">
<Button Click="BarCodeTabBtn_Click" x:Name="BarCodeTabBtn" Margin="5" Background="{Binding Source={StaticResource Background1}}" Foreground="{Binding Source={StaticResource Foreground1}}" FontWeight="ExtraBold" Padding="8" Style="{DynamicResource TabButtonStyle}" FontSize="20" HorizontalAlignment="Left" Width="190" HorizontalContentAlignment="Left" MouseEnter="TabEnter" MouseLeave="TabLeave" Cursor="Hand">
<Button Click="BarCodeTabBtn_Click" x:Name="BarCodeTabBtn" Margin="5" Background="{Binding Source={StaticResource Background1}}" Foreground="{Binding Source={StaticResource AccentColor}}" FontWeight="ExtraBold" Padding="8" Style="{DynamicResource TabButtonStyle}" FontSize="20" HorizontalAlignment="Left" Width="190" HorizontalContentAlignment="Left" MouseLeave="TabLeave" Cursor="Hand">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="33"/>
Expand All @@ -177,13 +177,13 @@
<SplineThicknessKeyFrame KeyTime="00:00:00" Value="40,0,10,0" />
<SplineThicknessKeyFrame KeyTime="00:00:0.3" Value="0,0,10,0" />
</ThicknessAnimationUsingKeyFrames>
<ColorAnimation From="{Binding Source={StaticResource Background1}}" To="{Binding Source={StaticResource AccentColor}}" Duration="0:0:0.2" Storyboard.TargetName="BarCodeTabBtn" Storyboard.TargetProperty="(Button.Background).(SolidColorBrush.Color)"/>
<ColorAnimation From="{Binding Source={StaticResource Background1}}" To="{Binding Source={StaticResource LightAccentColor}}" Duration="0:0:0.2" Storyboard.TargetName="BarCodeTabBtn" Storyboard.TargetProperty="(Button.Background).(SolidColorBrush.Color)"/>
</Storyboard>
</BeginStoryboard>
</EventTrigger>
</Button.Triggers>
</Button>
<Button Click="QRCodeTabBtn_Click" x:Name="QRCodeTabBtn" Margin="5" Background="{Binding Source={StaticResource Background1}}" Foreground="{Binding Source={StaticResource Foreground1}}" FontWeight="ExtraBold" Padding="8" Style="{DynamicResource TabButtonStyle}" FontSize="20" HorizontalAlignment="Left" Width="190" HorizontalContentAlignment="Left" MouseEnter="TabEnter" MouseLeave="TabLeave">
<Button Click="QRCodeTabBtn_Click" x:Name="QRCodeTabBtn" Margin="5" Background="{Binding Source={StaticResource Background1}}" Foreground="{Binding Source={StaticResource AccentColor}}" FontWeight="ExtraBold" Padding="8" Style="{DynamicResource TabButtonStyle}" FontSize="20" HorizontalAlignment="Left" Width="190" HorizontalContentAlignment="Left" MouseLeave="TabLeave">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="33"/>
Expand All @@ -199,13 +199,13 @@
<BeginStoryboard>
<Storyboard>
<DoubleAnimation From="5" To="20" Duration="0:0:0.2" Storyboard.TargetName="QRIcon" Storyboard.TargetProperty="FontSize"/>
<ColorAnimation From="{Binding Source={StaticResource Background1}}" To="{Binding Source={StaticResource AccentColor}}" Duration="0:0:0.2" Storyboard.TargetName="QRCodeTabBtn" Storyboard.TargetProperty="(Button.Background).(SolidColorBrush.Color)"/>
<ColorAnimation From="{Binding Source={StaticResource Background1}}" To="{Binding Source={StaticResource LightAccentColor}}" Duration="0:0:0.2" Storyboard.TargetName="QRCodeTabBtn" Storyboard.TargetProperty="(Button.Background).(SolidColorBrush.Color)"/>
</Storyboard>
</BeginStoryboard>
</EventTrigger>
</Button.Triggers>
</Button>
<Button Click="SettingsTabBtn_Click" x:Name="SettingsTabBtn" Margin="5" Background="{Binding Source={StaticResource Background1}}" Foreground="{Binding Source={StaticResource Foreground1}}" FontWeight="ExtraBold" Padding="8" Style="{DynamicResource TabButtonStyle}" FontSize="20" HorizontalAlignment="Left" Width="190" HorizontalContentAlignment="Left" MouseEnter="TabEnter" MouseLeave="TabLeave" Cursor="Hand">
<Button Click="SettingsTabBtn_Click" x:Name="SettingsTabBtn" Margin="5" Background="{Binding Source={StaticResource Background1}}" Foreground="{Binding Source={StaticResource AccentColor}}" FontWeight="ExtraBold" Padding="8" Style="{DynamicResource TabButtonStyle}" FontSize="20" HorizontalAlignment="Left" Width="190" HorizontalContentAlignment="Left" MouseLeave="TabLeave" Cursor="Hand">
<StackPanel Orientation="Horizontal">
<TextBlock Text="&#xF6AB;" FontSize="23" FontWeight="Regular" FontFamily="/Fonts/#FluentSystemIcons-Regular" Margin="0 0 10 0" VerticalAlignment="Center" RenderTransformOrigin="0.5,0.5">
<TextBlock.RenderTransform>
Expand All @@ -222,7 +222,7 @@
<BeginStoryboard>
<Storyboard>
<DoubleAnimation From="0" To="45" Duration="0:0:0.2" Storyboard.TargetName="Rotator" Storyboard.TargetProperty="Angle"/>
<ColorAnimation From="{Binding Source={StaticResource Background1}}" To="{Binding Source={StaticResource AccentColor}}" Duration="0:0:0.2" Storyboard.TargetName="SettingsTabBtn" Storyboard.TargetProperty="(Button.Background).(SolidColorBrush.Color)"/>
<ColorAnimation From="{Binding Source={StaticResource Background1}}" To="{Binding Source={StaticResource LightAccentColor}}" Duration="0:0:0.2" Storyboard.TargetName="SettingsTabBtn" Storyboard.TargetProperty="(Button.Background).(SolidColorBrush.Color)"/>
</Storyboard>
</BeginStoryboard>
</EventTrigger>
Expand Down
19 changes: 5 additions & 14 deletions Gerayis/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public partial class MainWindow : Window

readonly ColorAnimation colorAnimation = new()
{
From = (Color)ColorConverter.ConvertFromString(App.Current.Resources["AccentColor"].ToString()),
From = (Color)ColorConverter.ConvertFromString(App.Current.Resources["LightAccentColor"].ToString()),
To = (Color)ColorConverter.ConvertFromString(App.Current.Resources["Background1"].ToString()),
Duration = new(TimeSpan.FromSeconds(0.2d))
};
Expand Down Expand Up @@ -106,38 +106,29 @@ private void InitUI()

private void CheckButton(Button button)
{
button.Foreground = new SolidColorBrush { Color = (Color)ColorConverter.ConvertFromString(App.Current.Resources["WindowButtonsHoverForeground1"].ToString()) }; // Set the foreground
button.Background = new SolidColorBrush { Color = (Color)ColorConverter.ConvertFromString(App.Current.Resources["AccentColor"].ToString()) }; // Set the background
button.Background = new SolidColorBrush { Color = (Color)ColorConverter.ConvertFromString(App.Current.Resources["LightAccentColor"].ToString()) }; // Set the background

CheckedButton = button; // Set the "checked" button
}

private void ResetAllCheckStatus()
{
BarCodeTabBtn.Foreground = new SolidColorBrush { Color = (Color)ColorConverter.ConvertFromString(App.Current.Resources["Foreground1"].ToString()) }; // Set the foreground
BarCodeTabBtn.Foreground = new SolidColorBrush { Color = (Color)ColorConverter.ConvertFromString(App.Current.Resources["AccentColor"].ToString()) }; // Set the foreground
BarCodeTabBtn.Background = new SolidColorBrush { Color = (Color)ColorConverter.ConvertFromString(App.Current.Resources["Background1"].ToString()) }; // Set the background

QRCodeTabBtn.Foreground = new SolidColorBrush { Color = (Color)ColorConverter.ConvertFromString(App.Current.Resources["Foreground1"].ToString()) }; // Set the foreground
QRCodeTabBtn.Foreground = new SolidColorBrush { Color = (Color)ColorConverter.ConvertFromString(App.Current.Resources["AccentColor"].ToString()) }; // Set the foreground
QRCodeTabBtn.Background = new SolidColorBrush { Color = (Color)ColorConverter.ConvertFromString(App.Current.Resources["Background1"].ToString()) }; // Set the background

SettingsTabBtn.Foreground = new SolidColorBrush { Color = (Color)ColorConverter.ConvertFromString(App.Current.Resources["Foreground1"].ToString()) }; // Set the foreground
SettingsTabBtn.Foreground = new SolidColorBrush { Color = (Color)ColorConverter.ConvertFromString(App.Current.Resources["AccentColor"].ToString()) }; // Set the foreground
SettingsTabBtn.Background = new SolidColorBrush { Color = (Color)ColorConverter.ConvertFromString(App.Current.Resources["Background1"].ToString()) }; // Set the background
}

private void TabEnter(object sender, MouseEventArgs e)
{
Button button = (Button)sender; // Create button

button.Foreground = new SolidColorBrush { Color = (Color)ColorConverter.ConvertFromString(App.Current.Resources["WindowButtonsHoverForeground1"].ToString()) }; // Set the foreground
}

private void TabLeave(object sender, MouseEventArgs e)
{
Button button = (Button)sender; // Create button

if (button != CheckedButton)
{
button.Foreground = new SolidColorBrush { Color = (Color)ColorConverter.ConvertFromString(App.Current.Resources["Foreground1"].ToString()) }; // Set the foreground
button.Background.BeginAnimation(SolidColorBrush.ColorProperty, colorAnimation); // Play animation
}
}
Expand Down
21 changes: 13 additions & 8 deletions Gerayis/Pages/BarCodePage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,12 @@
</Grid.RowDefinitions>

<StackPanel Margin="10,40,10,5" Grid.Row="0">
<Grid>
<StackPanel Orientation="Horizontal" Margin="0,0,0,10">
<TextBlock Foreground="{Binding Source={StaticResource AccentColor}}" Text="&#xF210;" FontSize="17" FontFamily="..\Fonts\#FluentSystemIcons-Regular" Margin="0,0,10,0" VerticalAlignment="Center"/>
<TextBlock Text="{x:Static lang:Resources.BarCode}" Foreground="{Binding Source={StaticResource Foreground1}}" FontSize="16" VerticalAlignment="Center"/>
</StackPanel>

<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition Width="Auto"/>
Expand All @@ -40,19 +45,19 @@
</ComboBox>
</StackPanel>
<StackPanel Orientation="Horizontal" Grid.Column="1">
<TextBlock x:Name="ValidIconTxt" FontFamily="..\Fonts\#FluentSystemIcons-Regular" FontSize="22" Margin="0,0,5,0" VerticalAlignment="Center"/>
<Button Padding="5 0" x:Name="BarCodeInfoBtn" Click="BarCodeInfoBtn_Click" FontFamily="..\Fonts\#FluentSystemIcons-Regular" Grid.Column="1" Style="{DynamicResource TabButtonStyle}" Foreground="{Binding Source={StaticResource WindowButtonsHoverForeground1}}" FontSize="14" Margin="0,0,5,0" Background="{x:Null}">
<TextBlock x:Name="ValidIconTxt" FontFamily="..\Fonts\#FluentSystemIcons-Filled" FontSize="16" VerticalAlignment="Center"/>

<Button Content="&#xF160;" Padding="5" x:Name="SeeFullBarCodeBtn" Click="SeeFullBarCodeBtn_Click" FontFamily="..\Fonts\#FluentSystemIcons-Regular" Grid.Column="1" Style="{DynamicResource TabButtonStyle}" Background="{Binding Source={StaticResource AccentColor}}" Foreground="{Binding Source={StaticResource WindowButtonsHoverForeground1}}" FontSize="14" Margin="0,0,5,0">
<Button.ToolTip>
<ToolTip Content="{x:Static lang:Resources.SeeFullBarCode}" Foreground="{Binding Source={StaticResource Foreground1}}" Background="{Binding Source={StaticResource Background1}}"/>
</Button.ToolTip>
</Button>
<Button Content="&#xF4A4;" Padding="5" x:Name="BarCodeInfoBtn" Click="BarCodeInfoBtn_Click" FontFamily="..\Fonts\#FluentSystemIcons-Regular" Grid.Column="1" Style="{DynamicResource TabButtonStyle}" Background="{Binding Source={StaticResource AccentColor}}" Foreground="{Binding Source={StaticResource WindowButtonsHoverForeground1}}" FontSize="14" Margin="0,0,5,0">
<Button Content="&#xF160;" Padding="5" x:Name="SeeFullBarCodeBtn" Click="SeeFullBarCodeBtn_Click" FontFamily="..\Fonts\#FluentSystemIcons-Regular" Grid.Column="1" Style="{DynamicResource TabButtonStyle}" Background="{Binding Source={StaticResource LightAccentColor}}" Foreground="{Binding Source={StaticResource AccentColor}}" FontSize="14" Margin="0,0,5,0">
<Button.ToolTip>
<ToolTip Content="{x:Static lang:Resources.SeeFullBarCode}" Foreground="{Binding Source={StaticResource Foreground1}}" Background="{Binding Source={StaticResource Background1}}"/>
</Button.ToolTip>
</Button>
<Button Content="&#xF47F;" Padding="5" x:Name="HistoryBtn" Click="HistoryBtn_Click" FontFamily="..\Fonts\#FluentSystemIcons-Regular" Grid.Column="1" Style="{DynamicResource TabButtonStyle}" Background="{Binding Source={StaticResource AccentColor}}" Foreground="{Binding Source={StaticResource WindowButtonsHoverForeground1}}" FontSize="14">
</Button>
<Button Content="&#xF47F;" Padding="5" x:Name="HistoryBtn" Click="HistoryBtn_Click" FontFamily="..\Fonts\#FluentSystemIcons-Regular" Grid.Column="1" Style="{DynamicResource TabButtonStyle}" Background="{Binding Source={StaticResource LightAccentColor}}" Foreground="{Binding Source={StaticResource AccentColor}}" FontSize="14">
<Button.ToolTip>
<ToolTip Content="{x:Static lang:Resources.History}" Foreground="{Binding Source={StaticResource Foreground1}}" Background="{Binding Source={StaticResource Background1}}"/>
</Button.ToolTip>
Expand Down Expand Up @@ -107,15 +112,15 @@
</ScrollViewer>
</StackPanel>

<Border x:Name="border" Background="{Binding Source={StaticResource LightAccentColor}}" CornerRadius="5" Padding="10 8" Margin="10,5,10,10" Grid.Row="2">
<Border x:Name="border" Background="{Binding Source={StaticResource LightAccentColor}}" CornerRadius="5" Padding="10 8" Margin="10,0,10,10" Grid.Row="2">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>

<StackPanel Orientation="Horizontal" VerticalAlignment="Center">
<TextBlock x:Name="BorderIconTxt" Foreground="{Binding Source={StaticResource AccentColor}}" Text="&#xF4A5;" FontSize="17" FontFamily="..\Fonts\#FluentSystemIcons-Regular" Margin="0,0,10,0" VerticalAlignment="Center"/>
<TextBlock x:Name="BorderIconTxt" Foreground="{Binding Source={StaticResource AccentColor}}" Text="&#xF4AB;" FontSize="17" FontFamily="..\Fonts\#FluentSystemIcons-Filled" Margin="0,0,10,0" VerticalAlignment="Center"/>
<TextBlock x:Name="BorderMsgTxt" Foreground="{Binding Source={StaticResource AccentColor}}" Text="{x:Static lang:Resources.NoUseSpecialChars}" FontSize="14" TextWrapping="Wrap" VerticalAlignment="Center" HorizontalAlignment="Left" MaxWidth="766" Width="500"/>
</StackPanel>

Expand Down
3 changes: 0 additions & 3 deletions Gerayis/Pages/BarCodePage.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -285,16 +285,13 @@ private void BarCodeInfoBtn_Click(object sender, RoutedEventArgs e)
InfoPanel.Visibility = Visibility.Collapsed; // Hide
Content.Visibility = Visibility.Visible; // Show
infoPanelToggled = false; // Set to false

BarCodeInfoBtn.Content = "\uF4A4"; // Set text
}
else
{
InfoPanel.Visibility = Visibility.Visible; // Show
Content.Visibility = Visibility.Collapsed; // Hide
infoPanelToggled = true; // Set to true

BarCodeInfoBtn.Content = "\uF36B"; // Set text
LoadInfoPanel((Barcodes)BarCodeTypeComboBox.SelectedIndex); // Load info panel
}
}
Expand Down
Loading

0 comments on commit c7bc29f

Please sign in to comment.