-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
30 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,28 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.IO; | ||
using System.Linq; | ||
using System.Runtime.InteropServices.WindowsRuntime; | ||
using Microsoft.UI.Xaml; | ||
using Microsoft.UI.Xaml.Controls; | ||
using Microsoft.UI.Xaml.Controls.Primitives; | ||
using Microsoft.UI.Xaml.Data; | ||
using Microsoft.UI.Xaml.Input; | ||
using Microsoft.UI.Xaml.Media; | ||
using Microsoft.UI.Xaml.Navigation; | ||
using Windows.Foundation; | ||
using Windows.Foundation.Collections; | ||
|
||
// To learn more about WinUI, the WinUI project structure, | ||
// and more about our project templates, see: http://aka.ms/winui-project-info. | ||
using Windows.ApplicationModel; | ||
|
||
namespace TailscaleClient.Views; | ||
/// <summary> | ||
/// An empty page that can be used on its own or navigated to within a Frame. | ||
/// </summary> | ||
|
||
public sealed partial class Settings : Page | ||
{ | ||
private readonly string Version; | ||
|
||
public static string GetAppVersion() | ||
{ | ||
try | ||
{ | ||
var version = Package.Current.Id.Version; | ||
return string.Format("{0}.{1}.{2}", version.Major, version.Minor, version.Build); | ||
} | ||
catch | ||
{ | ||
return "Unpackaged build"; | ||
} | ||
} | ||
|
||
public Settings() | ||
{ | ||
this.InitializeComponent(); | ||
Version = GetAppVersion(); | ||
} | ||
} |