mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-06 03:07:04 +02:00
Setting v2: added power preview settings (#1702)
* added power preview settings * Added link to module oververview * create settings file if one is not found * removed run oon start up speficic callback * Update src/core/Microsoft.PowerToys.Settings.UI.Lib/ModuleSettings.cs Co-Authored-By: Andrey Nekrasov <yuyoyuppe@users.noreply.github.com> * fixed merge conflicts Co-authored-by: Andrey Nekrasov <yuyoyuppe@users.noreply.github.com>
This commit is contained in:
@@ -7,10 +7,8 @@
|
||||
xmlns:Controls="clr-namespace:Microsoft.Toolkit.Wpf.UI.Controls;assembly=Microsoft.Toolkit.Wpf.UI.Controls"
|
||||
xmlns:xaml="clr-namespace:Microsoft.Toolkit.Wpf.UI.XamlHost;assembly=Microsoft.Toolkit.Wpf.UI.XamlHost"
|
||||
mc:Ignorable="d"
|
||||
Title="PowerToys Settings" Height="800" Width="800">
|
||||
|
||||
<Grid >
|
||||
<!--<xaml:WindowsXamlHost InitialTypeName="Microsoft.PowerToys.Settings.UI.Controls.DummyUserControl" ChildChanged="WindowsXamlHost_ChildChanged" />-->
|
||||
Title="PowerToys Settings" Height="800" Width="1000">
|
||||
<Grid>
|
||||
<xaml:WindowsXamlHost InitialTypeName="Microsoft.PowerToys.Settings.UI.Views.ShellPage" ChildChanged="WindowsXamlHost_ChildChanged" />
|
||||
</Grid>
|
||||
</Window>
|
||||
|
||||
@@ -25,30 +25,12 @@ namespace Microsoft.PowerToys.Settings.UI.Runner
|
||||
|
||||
if (shellPage != null)
|
||||
{
|
||||
shellPage.SetRestartElevatedCallback(delegate(string msg)
|
||||
// send IPC Message
|
||||
shellPage.SetDefaultSndMessageCallback(delegate (string msg)
|
||||
{
|
||||
MessageBox.Show(
|
||||
msg,
|
||||
"Restart Elevated",
|
||||
MessageBoxButton.OK);
|
||||
|
||||
Program.ipcmanager.SendMessage(msg);
|
||||
|
||||
int milliseconds = 2000;
|
||||
Thread.Sleep(milliseconds);
|
||||
|
||||
System.Windows.Application.Current.Shutdown();
|
||||
});
|
||||
|
||||
shellPage.SetRunOnStartUpCallback(delegate (string msg)
|
||||
{
|
||||
MessageBox.Show(
|
||||
msg,
|
||||
"Run On Start Up",
|
||||
MessageBoxButton.OK);
|
||||
|
||||
Program.ipcmanager.SendMessage(msg);
|
||||
});
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user