This commit is contained in:
JonatanRek 2024-09-15 14:54:59 +02:00
parent 027ec1f0d9
commit 987ccad5b9
3 changed files with 17 additions and 5 deletions

View File

@ -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");
}

View File

@ -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">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="270"/>
<RowDefinition Height="50*"/>
</Grid.RowDefinitions>
<Image x:Name="qr_code" Width="250px" Height="250px" Margin="10,10,10,10"/>
<TextBox Margin="10,10,10,0" TextWrapping="Wrap" Text="TextBox" VerticalAlignment="Top" Grid.Row="1"/>
<Image x:Name="qr_code" Margin="10,10,10,0"/>
<TextBox Margin="10,10,10,10" TextWrapping="Wrap" Text="TextBox" Grid.Row="1" Height="20" VerticalAlignment="Center"/>
</Grid>
</Window>

View File

@ -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));
try
{
AutoUpdateHelper updater = new AutoUpdateHelper();
}
catch (Exception ex)
{
Debug.WriteLine(ex.Message);
}
}
}
}