mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-07 19:57:07 +02:00
35 lines
1.0 KiB
C#
35 lines
1.0 KiB
C#
|
|
// Copyright (c) Microsoft Corporation
|
||
|
|
// The Microsoft Corporation licenses this file to you under the MIT license.
|
||
|
|
// See the LICENSE file in the project root for more information.
|
||
|
|
|
||
|
|
using Microsoft.CmdPal.UI.ViewModels;
|
||
|
|
using Microsoft.Extensions.DependencyInjection;
|
||
|
|
using Microsoft.UI.Xaml.Controls;
|
||
|
|
using Windows.ApplicationModel;
|
||
|
|
|
||
|
|
namespace Microsoft.CmdPal.UI.Settings;
|
||
|
|
|
||
|
|
public sealed partial class GeneralPage : Page
|
||
|
|
{
|
||
|
|
private readonly TaskScheduler _mainTaskScheduler = TaskScheduler.FromCurrentSynchronizationContext();
|
||
|
|
|
||
|
|
private readonly SettingsViewModel? viewModel;
|
||
|
|
|
||
|
|
public GeneralPage()
|
||
|
|
{
|
||
|
|
this.InitializeComponent();
|
||
|
|
|
||
|
|
var settings = App.Current.Services.GetService<SettingsModel>()!;
|
||
|
|
viewModel = new SettingsViewModel(settings, App.Current.Services, _mainTaskScheduler);
|
||
|
|
}
|
||
|
|
|
||
|
|
public string ApplicationVersion
|
||
|
|
{
|
||
|
|
get
|
||
|
|
{
|
||
|
|
var version = Package.Current.Id.Version;
|
||
|
|
return $"Version {version.Major}.{version.Minor}.{version.Build}.{version.Revision}";
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|