Initial commit
This commit is contained in:
32
Example/MainWindow.xaml.cs
Normal file
32
Example/MainWindow.xaml.cs
Normal file
@ -0,0 +1,32 @@
|
||||
using System;
|
||||
using System.Reflection;
|
||||
using System.Windows;
|
||||
using Katteker.Gui;
|
||||
|
||||
namespace Example
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaction logic for MainWindow.xaml
|
||||
/// </summary>
|
||||
public partial class MainWindow
|
||||
{
|
||||
public MainWindow()
|
||||
{
|
||||
InitializeComponent();
|
||||
var version = GetType().Assembly.GetName().Version.ToString();
|
||||
var a = Assembly.GetExecutingAssembly();
|
||||
a.ManifestModule.GetPEKind(out var peKind, out var machine);
|
||||
Title = $"{version} | {peKind} | {machine}";
|
||||
}
|
||||
|
||||
private async void MainWindow_OnContentRendered(object sender, EventArgs e)
|
||||
{
|
||||
await Wrapper.CheckForUpdateAsync(true).ConfigureAwait(false);
|
||||
}
|
||||
|
||||
private async void ButtonBase_OnClick(object sender, RoutedEventArgs e)
|
||||
{
|
||||
await Wrapper.CheckForUpdateAsync().ConfigureAwait(false);
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user