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:
Lavius Motileng
2020-03-30 02:02:25 -07:00
parent a84be2ba60
commit f1951d0d5f
14 changed files with 423 additions and 132 deletions

View File

@@ -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>

View File

@@ -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);
});
}
}