Added OOBE to shellpage

This commit is contained in:
Niels Laute
2021-07-22 11:46:46 +02:00
parent a6c3ca3165
commit 468709b488
5 changed files with 32 additions and 28 deletions

View File

@@ -187,7 +187,7 @@ Disabling this module or closing PowerToys will unmute the microphone and camera
</data>
<data name="VideoConference.ModuleTitle" xml:space="preserve">
<value>Video Conference</value>
<comment>do not loc the product name</comment>
<comment>do not loc the product name</comment>
</data>
<data name="VideoConference_Camera.Text" xml:space="preserve">
<value>Camera</value>
@@ -487,7 +487,7 @@ Disabling this module or closing PowerToys will unmute the microphone and camera
</data>
<data name="PowerToys.ModuleTitle" xml:space="preserve">
<value>PowerToys</value>
<comment>do not loc the product name</comment>
<comment>do not loc the product name</comment>
</data>
<data name="GeneralPage_CheckForUpdates.Content" xml:space="preserve">
<value>Check for updates</value>
@@ -757,11 +757,11 @@ Disabling this module or closing PowerToys will unmute the microphone and camera
</data>
<data name="FancyZones.ModuleTitle" xml:space="preserve">
<value>FancyZones</value>
<comment>do not loc the product name</comment>
<comment>do not loc the product name</comment>
</data>
<data name="FileExplorerPreview.ModuleTitle" xml:space="preserve">
<value>File Explorer</value>
<comment>do not loc the product name</comment>
<comment>do not loc the product name</comment>
</data>
<data name="FileExplorerPreview_Image.AutomationProperties.Name" xml:space="preserve">
<value>File Explorer</value>
@@ -769,19 +769,19 @@ Disabling this module or closing PowerToys will unmute the microphone and camera
</data>
<data name="ImageResizer.ModuleTitle" xml:space="preserve">
<value>Image Resizer</value>
<comment>do not loc the product name</comment>
<comment>do not loc the product name</comment>
</data>
<data name="KeyboardManager.ModuleTitle" xml:space="preserve">
<value>Keyboard Manager</value>
<comment>do not loc the product name</comment>
<comment>do not loc the product name</comment>
</data>
<data name="ColorPicker.ModuleTitle" xml:space="preserve">
<value>Color Picker</value>
<comment>do not loc the product name</comment>
<comment>do not loc the product name</comment>
</data>
<data name="PowerLauncher.ModuleTitle" xml:space="preserve">
<value>PowerToys Run</value>
<comment>do not loc the product name</comment>
<comment>do not loc the product name</comment>
</data>
<data name="PowerToys_Run_Image.AutomationProperties.Name" xml:space="preserve">
<value>PowerToys Run</value>
@@ -796,7 +796,7 @@ Disabling this module or closing PowerToys will unmute the microphone and camera
</data>
<data name="ShortcutGuide.ModuleTitle" xml:space="preserve">
<value>Shortcut Guide</value>
<comment>do not loc the product name</comment>
<comment>do not loc the product name</comment>
</data>
<data name="Shortcut_Guide_Image.AutomationProperties.Name" xml:space="preserve">
<value>Shortcut Guide</value>
@@ -1267,7 +1267,7 @@ From there, simply click on a Markdown file or SVG icon in the File Explorer and
</data>
<data name="Awake.ModuleTitle" xml:space="preserve">
<value>Awake</value>
<comment>do not loc the product name</comment>
<comment>do not loc the product name</comment>
</data>
<data name="Awake.ModuleDescription" xml:space="preserve">
<value>A convenient way to keep your PC awake on-demand.</value>

View File

@@ -24,19 +24,6 @@
ModuleImageLink="https://aka.ms/powertoys">
<controls:SettingsPageControl.ModuleContent>
<StackPanel Orientation="Vertical">
<Button Click="OobeButton_Click"
Style="{StaticResource AccentButtonStyle}"
Margin="0,12,0,24">
<Button.Content>
<StackPanel Orientation="Horizontal">
<FontIcon FontSize="13" Glyph="&#xF133;" />
<TextBlock Margin="8,0,0,0"
x:Uid="Oobe_Button"/>
</StackPanel>
</Button.Content>
</Button>
<TextBlock x:Uid="Admin_Mode"
FontWeight="SemiBold"
TextWrapping="Wrap"

View File

@@ -85,10 +85,5 @@ namespace Microsoft.PowerToys.Settings.UI.Views
{
Helpers.StartProcessHelper.Start(Helpers.StartProcessHelper.ColorsSettings);
}
private void OobeButton_Click(object sender, RoutedEventArgs e)
{
ShellPage.OpenOobeWindowCallback();
}
}
}

View File

@@ -129,6 +129,22 @@
</winui:NavigationViewItem>-->
</winui:NavigationView.MenuItems>
<winui:NavigationView.PaneFooter>
<Button Click="OobeButton_Click"
Background="Transparent"
Style="{StaticResource AccentButtonStyle}"
BorderBrush="Transparent"
Foreground="{StaticResource AccentTextFillColorPrimaryBrush}"
Margin="4,0,4,-4">
<Button.Content>
<StackPanel Orientation="Horizontal">
<FontIcon FontSize="13" Glyph="&#xF133;" Margin="2,0,0,0" />
<TextBlock Margin="20,0,0,0"
x:Uid="Oobe_Button"/>
</StackPanel>
</Button.Content>
</Button>
</winui:NavigationView.PaneFooter>
<i:Interaction.Behaviors>
<ic:EventTriggerBehavior EventName="ItemInvoked">

View File

@@ -8,6 +8,7 @@ using System.Diagnostics.CodeAnalysis;
using Microsoft.PowerToys.Settings.UI.Services;
using Microsoft.PowerToys.Settings.UI.ViewModels;
using Windows.Data.Json;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
namespace Microsoft.PowerToys.Settings.UI.Views
@@ -156,6 +157,11 @@ namespace Microsoft.PowerToys.Settings.UI.Views
shellFrame.Navigate(typeof(GeneralPage));
}
private void OobeButton_Click(object sender, RoutedEventArgs e)
{
OpenOobeWindowCallback();
}
[SuppressMessage("Usage", "CA1801:Review unused parameters", Justification = "Params are required for event handler signature requirements.")]
private void NavigationView_SelectionChanged(Microsoft.UI.Xaml.Controls.NavigationView sender, Microsoft.UI.Xaml.Controls.NavigationViewSelectionChangedEventArgs args)
{