mirror of
https://github.com/Microsoft/calculator.git
synced 2025-08-22 22:23:29 -07:00
fixes: calculator doesn't remember its previous mode
This commit is contained in:
parent
9017f074d3
commit
91949d0394
1 changed files with 4 additions and 6 deletions
|
@ -134,14 +134,12 @@ namespace CalculatorApp
|
||||||
protected override void OnNavigatedTo(NavigationEventArgs e)
|
protected override void OnNavigatedTo(NavigationEventArgs e)
|
||||||
{
|
{
|
||||||
ViewMode initialMode = ViewMode.Standard;
|
ViewMode initialMode = ViewMode.Standard;
|
||||||
if (e.Parameter != null)
|
|
||||||
{
|
|
||||||
string stringParameter = (e.Parameter as string);
|
string stringParameter = (e.Parameter as string);
|
||||||
if (!string.IsNullOrEmpty(stringParameter))
|
if (!string.IsNullOrEmpty(stringParameter))
|
||||||
{
|
{
|
||||||
initialMode = (ViewMode)Convert.ToInt32(stringParameter);
|
initialMode = (ViewMode)Convert.ToInt32(stringParameter);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ApplicationDataContainer localSettings = ApplicationData.Current.LocalSettings;
|
ApplicationDataContainer localSettings = ApplicationData.Current.LocalSettings;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue