mirror of
https://github.com/Microsoft/calculator.git
synced 2025-08-20 13:23:13 -07:00
restore session
This commit is contained in:
parent
a683e2346b
commit
bcedac85a1
2 changed files with 2 additions and 2 deletions
|
@ -558,7 +558,7 @@ void ApplicationViewModel::Initialize(ViewMode mode)
|
||||||
|
|
||||||
void ApplicationViewModel::Initialize(CalculatorApp::ViewModel::Snapshot::ApplicationSnapshot ^ snapshot)
|
void ApplicationViewModel::Initialize(CalculatorApp::ViewModel::Snapshot::ApplicationSnapshot ^ snapshot)
|
||||||
{
|
{
|
||||||
// TODO: restore
|
m_CalculatorViewModel = ref new StandardCalculatorViewModel(snapshot->StandardCalculator);
|
||||||
Initialize(static_cast<ViewMode>(snapshot->Mode));
|
Initialize(static_cast<ViewMode>(snapshot->Mode));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -74,7 +74,7 @@ namespace CalculatorApp
|
||||||
string embeddedData;
|
string embeddedData;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
var json = JsonSerializer.Serialize(new ApplicationSnapshotAlias { Value = Model.Snapshot });
|
var json = JsonSerializer.Serialize(new ApplicationSnapshotAlias(Model.Snapshot));
|
||||||
embeddedData = Convert.ToBase64String(DeflateUtils.Compress(json));
|
embeddedData = Convert.ToBase64String(DeflateUtils.Compress(json));
|
||||||
}
|
}
|
||||||
catch (Exception)
|
catch (Exception)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue