33 lines
		
	
	
		
			931 B
		
	
	
	
		
			C#
		
	
	
	
	
	
			
		
		
	
	
			33 lines
		
	
	
		
			931 B
		
	
	
	
		
			C#
		
	
	
	
	
	
| 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);
 | |
|         }
 | |
|     }
 | |
| }
 | 
