[Settings UI] Updated General Settings (#2676)

* updated general settings view

* moved text to string resource

* Update App.xaml.cs

* set run-elevated as a start-up argument
This commit is contained in:
Lavius Motileng
2020-05-05 10:02:31 -07:00
committed by GitHub
parent 67b2f28064
commit a722ce460c
11 changed files with 411 additions and 47 deletions

View File

@@ -24,15 +24,22 @@ namespace Microsoft.PowerToys.Settings.UI.Views
public static ShellPage ShellHandler { get; set; }
/// <summary>
/// Gets or sets iPC callback function for run on start up.
/// Gets or sets iPC default callback function.
/// </summary>
public static IPCMessageCallback DefaultSndMSGCallback { get; set; }
/// <summary>
/// Gets or sets iPC callback function for restart as admin.
/// </summary>
public static IPCMessageCallback SndRestartAsAdminMsgCallback { get; set; }
/// <summary>
/// Gets view model.
/// </summary>
public ShellViewModel ViewModel { get; } = new ShellViewModel();
public static bool IsElevated { get; set; }
/// <summary>
/// Initializes a new instance of the <see cref="ShellPage"/> class.
/// Shell page constructor.
@@ -48,12 +55,31 @@ namespace Microsoft.PowerToys.Settings.UI.Views
}
/// <summary>
/// Run on start up callback function elevated initialization.
/// Set Default IPC Message callback function.
/// </summary>
/// <param name="implmentation">delegate function implementation.</param>
public void SetDefaultSndMessageCallback(IPCMessageCallback implmentation)
{
DefaultSndMSGCallback = implmentation;
}
/// <summary>
/// Set restart as admin IPC callback function.
/// </summary>
/// <param name="implmentation">delegate function implementation.</param>
public void SetRestartAdminSndMessageCallback(IPCMessageCallback implmentation)
{
SndRestartAsAdminMsgCallback = implmentation;
}
public void SetElevationStatus(bool isElevated)
{
IsElevated = isElevated;
}
public void Refresh()
{
shellFrame.Navigate(typeof(GeneralPage));
}
}
}