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 #156 from Leo-Corporation/vNext
Browse files Browse the repository at this point in the history
Version 2.3.1.2211
  • Loading branch information
lpeyr authored Nov 26, 2022
2 parents 6efb82e + d7fabf2 commit d5e9483
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 23 deletions.
4 changes: 2 additions & 2 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.3.0.2209"
#define MyAppFullVersion "2.3.0.2209"
#define MyAppVersion "2.3.1.2211"
#define MyAppFullVersion "2.3.1.2211"
#define MyAppPublisher "Léo Corporation"
#define MyAppURL "https://leocorporation.dev/"
#define MyAppExeName "Gerayis.exe"
Expand Down
4 changes: 2 additions & 2 deletions Gerayis/App.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE

using Gerayis.Classes;
using Gerayis.Windows;
using LeoCorpLibrary;
using PeyrSharp.Env;
using System.IO;
using System.Windows;

Expand All @@ -46,7 +46,7 @@ protected override void OnStartup(StartupEventArgs e)
Global.BarCodePage = new(); // Create a new BarCodePage
Global.QRCodePage = new(); // Create a new QRCodePage

if (!File.Exists(Env.AppDataPath + @"\Léo Corporation\Gerayis\JumpList.txt")) // Checks if the jumplists have already been generated
if (!File.Exists(FileSys.AppDataPath + @"\Léo Corporation\Gerayis\JumpList.txt")) // Checks if the jumplists have already been generated
{
Global.CreateJumpLists(); // Create the JumpLists
}
Expand Down
10 changes: 5 additions & 5 deletions Gerayis/Classes/Global.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/
using Gerayis.Pages;
using LeoCorpLibrary;
using LeoCorpLibrary.Enums;
using Microsoft.Win32;
using PeyrSharp.Enums;
using PeyrSharp.Env;
using System;
using System.Collections.Generic;
using System.IO;
Expand All @@ -44,7 +44,7 @@ public static class Global
/// <summary>
/// The current version of Gerayis.
/// </summary>
public static string Version => "2.3.0.2209";
public static string Version => "2.3.1.2211";

/// <summary>
/// List of the available languages.
Expand Down Expand Up @@ -143,7 +143,7 @@ public static void ChangeTheme()

public static bool IsSystemThemeDark()
{
if (Env.WindowsVersion != WindowsVersion.Windows10 && Env.WindowsVersion != WindowsVersion.Windows11)
if (Sys.CurrentWindowsVersion != WindowsVersion.Windows10 && Sys.CurrentWindowsVersion != WindowsVersion.Windows11)
{
return false; // Avoid errors on older OSs
}
Expand Down Expand Up @@ -232,6 +232,6 @@ internal static void CreateJumpLists()
jumpList.ShowRecentCategory = false;

JumpList.SetJumpList(Application.Current, jumpList);
File.Create(Env.AppDataPath + @"\Léo Corporation\Gerayis\JumpList.txt"); // Create a file
File.Create(FileSys.AppDataPath + @"\Léo Corporation\Gerayis\JumpList.txt"); // Create a file
}
}
12 changes: 6 additions & 6 deletions Gerayis/Classes/Settings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/
using Gerayis.Enums;
using LeoCorpLibrary;
using PeyrSharp.Env;
using System;
using System.Diagnostics;
using System.IO;
Expand Down Expand Up @@ -129,7 +129,7 @@ public static class SettingsManager
/// </summary>
public static void Load()
{
string path = Env.AppDataPath + @"\Léo Corporation\Gerayis\Settings.xml"; // The path of the settings file
string path = FileSys.AppDataPath + @"\Léo Corporation\Gerayis\Settings.xml"; // The path of the settings file

if (File.Exists(path)) // If the file exist
{
Expand Down Expand Up @@ -172,14 +172,14 @@ public static void Load()
/// </summary>
public static void Save()
{
string path = Env.AppDataPath + @"\Léo Corporation\Gerayis\Settings.xml"; // The path of the settings file
string path = FileSys.AppDataPath + @"\Léo Corporation\Gerayis\Settings.xml"; // The path of the settings file

XmlSerializer xmlSerializer = new(typeof(Settings)); // Create XML Serializer

if (!Directory.Exists(Env.AppDataPath + @"\Léo Corporation\Gerayis")) // If the directory doesn't exist
if (!Directory.Exists(FileSys.AppDataPath + @"\Léo Corporation\Gerayis")) // If the directory doesn't exist
{
Directory.CreateDirectory(Env.AppDataPath + @"\Léo Corporation\"); // Create the directory
Directory.CreateDirectory(Env.AppDataPath + @"\Léo Corporation\Gerayis"); // Create the directory
Directory.CreateDirectory(FileSys.AppDataPath + @"\Léo Corporation\"); // Create the directory
Directory.CreateDirectory(FileSys.AppDataPath + @"\Léo Corporation\Gerayis"); // Create the directory
}

StreamWriter streamWriter = new(path); // The place where the file is going to be written
Expand Down
4 changes: 2 additions & 2 deletions Gerayis/Gerayis.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<UseWPF>true</UseWPF>
<ApplicationManifest>app.manifest</ApplicationManifest>
<ApplicationIcon>Gerayis.ico</ApplicationIcon>
<Version>2.3.0.2209</Version>
<Version>2.3.1.2211</Version>
<Authors>Léo Corporation</Authors>
<Description>A modern Bar/QR Code generator for Windows.</Description>
<Copyright>© 2022</Copyright>
Expand All @@ -32,8 +32,8 @@

<ItemGroup>
<PackageReference Include="BarcodeLib" Version="2.4.0" />
<PackageReference Include="LeoCorpLibrary" Version="4.9.0.2208" />
<PackageReference Include="MouseKeyHook" Version="5.6.0" />
<PackageReference Include="PeyrSharp" Version="1.0.0.2211" />
<PackageReference Include="QRCoder" Version="1.4.3" />
</ItemGroup>

Expand Down
11 changes: 6 additions & 5 deletions Gerayis/Pages/SettingsPage.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,9 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
*/
using Gerayis.Classes;
using Gerayis.Enums;
using LeoCorpLibrary;
using Microsoft.Win32;
using PeyrSharp.Core;
using PeyrSharp.Env;
using System;
using System.Diagnostics;
using System.IO;
Expand All @@ -51,7 +52,7 @@ public SettingsPage()
string lastVersion = await Update.GetLastVersionAsync(Global.LastVersionLink); // Get last version
if (MessageBox.Show(Properties.Resources.InstallConfirmMsg, $"{Properties.Resources.InstallVersion} {lastVersion}", MessageBoxButton.YesNo, MessageBoxImage.Information) == MessageBoxResult.Yes)
{
Env.ExecuteAsAdmin(Directory.GetCurrentDirectory() + @"\Xalyus Updater.exe"); // Start the updater
Sys.ExecuteAsAdmin(Directory.GetCurrentDirectory() + @"\Xalyus Updater.exe"); // Start the updater
Environment.Exit(0); // Close
}
};
Expand Down Expand Up @@ -173,7 +174,7 @@ private async void InitUI()
// Update the UpdateStatusTxt
if (Global.Settings.CheckUpdatesOnStart.Value)
{
if (await NetworkConnection.IsAvailableAsync())
if (await Internet.IsAvailableAsync())
{
isAvailable = Update.IsAvailable(Global.Version, await Update.GetLastVersionAsync(Global.LastVersionLink));

Expand Down Expand Up @@ -263,14 +264,14 @@ private async void RefreshInstallBtn_Click(object sender, RoutedEventArgs e)
{
if (Global.Settings.CheckUpdatesOnStart.Value)
{
if (await NetworkConnection.IsAvailableAsync()) // If there is Internet
if (await Internet.IsAvailableAsync()) // If there is Internet
{
if (isAvailable) // If there is updates
{
string lastVersion = await Update.GetLastVersionAsync(Global.LastVersionLink); // Get last version
if (MessageBox.Show(Properties.Resources.InstallConfirmMsg, $"{Properties.Resources.InstallVersion} {lastVersion}", MessageBoxButton.YesNo, MessageBoxImage.Information) == MessageBoxResult.Yes)
{
Env.ExecuteAsAdmin(Directory.GetCurrentDirectory() + @"\Xalyus Updater.exe"); // Start the updater
Sys.ExecuteAsAdmin(Directory.GetCurrentDirectory() + @"\Xalyus Updater.exe"); // Start the updater
Environment.Exit(0); // Close
}
}
Expand Down
2 changes: 1 addition & 1 deletion Gerayis/UserControls/HistoryItem.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public HistoryItem(string value, BitmapSource bitmapSource, WrapPanel wrapPanel,
private void InitUI()
{
HistoryImage.Source = BitmapSource;
BarCodeTxt.Text = ContentText;
BarCodeTxt.Text = ContentText.Length > 15 ? $"{ContentText[..15]}..." : ContentText;
if (AppPages == AppPages.BarCode) // If the item is a barcode
{
BarCodeTypeTxt.Text = BarcodeType switch
Expand Down

0 comments on commit d5e9483

Please sign in to comment.