mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-08 04:07:40 +02:00
[OOBE] Out of box experience window (#9973)
This commit is contained in:
@@ -2,8 +2,10 @@
|
||||
// The Microsoft Corporation licenses this file to you under the MIT license.
|
||||
// See the LICENSE file in the project root for more information.
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using Microsoft.PowerToys.Settings.UI.Services;
|
||||
using Microsoft.PowerToys.Settings.UI.ViewModels;
|
||||
using Windows.Data.Json;
|
||||
using Windows.UI.Xaml.Controls;
|
||||
@@ -21,6 +23,11 @@ namespace Microsoft.PowerToys.Settings.UI.Views
|
||||
/// <param name="msg">message.</param>
|
||||
public delegate void IPCMessageCallback(string msg);
|
||||
|
||||
/// <summary>
|
||||
/// Declaration for the opening oobe window callback function.
|
||||
/// </summary>
|
||||
public delegate void OobeOpeningCallback();
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a shell handler to be used to update contents of the shell dynamically from page within the frame.
|
||||
/// </summary>
|
||||
@@ -41,6 +48,11 @@ namespace Microsoft.PowerToys.Settings.UI.Views
|
||||
/// </summary>
|
||||
public static IPCMessageCallback CheckForUpdatesMsgCallback { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets callback function for opening oobe window
|
||||
/// </summary>
|
||||
public static OobeOpeningCallback OpenOobeWindowCallback { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets view model.
|
||||
/// </summary>
|
||||
@@ -114,6 +126,15 @@ namespace Microsoft.PowerToys.Settings.UI.Views
|
||||
CheckForUpdatesMsgCallback = implementation;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Set oobe opening callback function
|
||||
/// </summary>
|
||||
/// <param name="implementation">delegate function implementation.</param>
|
||||
public static void SetOpenOobeCallback(OobeOpeningCallback implementation)
|
||||
{
|
||||
OpenOobeWindowCallback = implementation;
|
||||
}
|
||||
|
||||
public static void SetElevationStatus(bool isElevated)
|
||||
{
|
||||
IsElevated = isElevated;
|
||||
@@ -124,6 +145,11 @@ namespace Microsoft.PowerToys.Settings.UI.Views
|
||||
IsUserAnAdmin = isAdmin;
|
||||
}
|
||||
|
||||
public static void Navigate(Type type)
|
||||
{
|
||||
NavigationService.Navigate(type);
|
||||
}
|
||||
|
||||
public void Refresh()
|
||||
{
|
||||
shellFrame.Navigate(typeof(GeneralPage));
|
||||
|
||||
Reference in New Issue
Block a user