From 987ccad5b9c4f66611e6477eea5d21cb5ca8b6c7 Mon Sep 17 00:00:00 2001 From: JonatanRek Date: Sun, 15 Sep 2024 14:54:59 +0200 Subject: [PATCH] Fixes --- FakeDeckUI/FakeDeck/Class/AutoUpdateHelper.cs | 2 +- FakeDeckUI/FakeDeck/MainWindow.xaml | 9 ++++++--- FakeDeckUI/FakeDeck/MainWindow.xaml.cs | 11 ++++++++++- 3 files changed, 17 insertions(+), 5 deletions(-) diff --git a/FakeDeckUI/FakeDeck/Class/AutoUpdateHelper.cs b/FakeDeckUI/FakeDeck/Class/AutoUpdateHelper.cs index 9b02641..5470aaa 100644 --- a/FakeDeckUI/FakeDeck/Class/AutoUpdateHelper.cs +++ b/FakeDeckUI/FakeDeck/Class/AutoUpdateHelper.cs @@ -20,7 +20,7 @@ namespace FakeDeck.Class AutoUpdater.ParseUpdateInfoEvent += AutoUpdaterOnParseUpdateInfoEvent; AutoUpdater.Synchronous = true; AutoUpdater.ShowRemindLaterButton = false; - AutoUpdater.ReportErrors = Debugger.IsAttached; + //AutoUpdater.ReportErrors = Debugger.IsAttached; AutoUpdater.HttpUserAgent = ("FakeDeck-v" + Assembly.GetExecutingAssembly().GetName().Version); AutoUpdater.Start("https://api.github.com/repos/GamerClassN7/FakeDeck/releases/latest"); } diff --git a/FakeDeckUI/FakeDeck/MainWindow.xaml b/FakeDeckUI/FakeDeck/MainWindow.xaml index 8af6181..1319e6a 100644 --- a/FakeDeckUI/FakeDeck/MainWindow.xaml +++ b/FakeDeckUI/FakeDeck/MainWindow.xaml @@ -5,13 +5,16 @@ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:local="clr-namespace:FakeDeck" mc:Ignorable="d" - Title="MainWindow" Activated="FakeDeckUI_Activated" WindowStartupLocation="CenterScreen"> + Title="MainWindow" + Activated="FakeDeckUI_Activated" + WindowStartupLocation="CenterScreen" + Width="280" Height="340"> - - + + diff --git a/FakeDeckUI/FakeDeck/MainWindow.xaml.cs b/FakeDeckUI/FakeDeck/MainWindow.xaml.cs index da2a043..2c7721a 100644 --- a/FakeDeckUI/FakeDeck/MainWindow.xaml.cs +++ b/FakeDeckUI/FakeDeck/MainWindow.xaml.cs @@ -17,6 +17,7 @@ using static System.Runtime.CompilerServices.RuntimeHelpers; using System.Drawing; using Color = System.Drawing.Color; using AutoUpdaterDotNET; +using System.Diagnostics; namespace FakeDeck { @@ -32,6 +33,7 @@ namespace FakeDeck private void FakeDeckUI_Activated(object sender, EventArgs e) { + string port = ((App)Application.Current).yaml.getData().GetProperty("server").GetProperty("port").ToString(); string url = "http://localhost:" + port; @@ -41,7 +43,14 @@ namespace FakeDeck QRCode qrCode = new QRCode(qrCodeData); qr_code.Source = GeneralHelper.BitmapToImageSource(qrCode.GetGraphic(20, Color.Black, Color.White, false)); - AutoUpdateHelper updater = new AutoUpdateHelper(); + try + { + AutoUpdateHelper updater = new AutoUpdateHelper(); + } + catch (Exception ex) + { + Debug.WriteLine(ex.Message); + } } } } \ No newline at end of file