mirror of
https://github.com/Microsoft/calculator.git
synced 2025-08-19 12:59:30 -07:00
renaming
This commit is contained in:
parent
950f92da00
commit
f23786ce5e
3 changed files with 4 additions and 30 deletions
|
@ -167,7 +167,7 @@
|
||||||
<Compile Include="Selectors\NavViewMenuItemTemplateSelector.cs" />
|
<Compile Include="Selectors\NavViewMenuItemTemplateSelector.cs" />
|
||||||
<Compile Include="Utils\ResourceVirtualKey.cs" />
|
<Compile Include="Utils\ResourceVirtualKey.cs" />
|
||||||
<Compile Include="Utils\ResourceString.cs" />
|
<Compile Include="Utils\ResourceString.cs" />
|
||||||
<Compile Include="Utils\SerdeUtils.cs" />
|
<Compile Include="Utils\JsonUtils.cs" />
|
||||||
<Compile Include="Utils\ThemeHelper.cs" />
|
<Compile Include="Utils\ThemeHelper.cs" />
|
||||||
<Compile Include="Views\GraphingCalculator\EquationStylePanelControl.xaml.cs">
|
<Compile Include="Views\GraphingCalculator\EquationStylePanelControl.xaml.cs">
|
||||||
<DependentUpon>EquationStylePanelControl.xaml</DependentUpon>
|
<DependentUpon>EquationStylePanelControl.xaml</DependentUpon>
|
||||||
|
|
|
@ -1,11 +1,10 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Security.Cryptography.X509Certificates;
|
|
||||||
using System.Text.Json.Serialization;
|
using System.Text.Json.Serialization;
|
||||||
using CalculatorApp.ViewModel.Snapshot;
|
using CalculatorApp.ViewModel.Snapshot;
|
||||||
|
|
||||||
namespace CalculatorApp.SerdeUtils
|
namespace CalculatorApp.JsonUtils
|
||||||
{
|
{
|
||||||
internal class CalcManagerHistoryTokenAlias
|
internal class CalcManagerHistoryTokenAlias
|
||||||
{
|
{
|
|
@ -4,7 +4,6 @@ using System.ComponentModel;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
using Windows.ApplicationModel.UserActivities;
|
using Windows.ApplicationModel.UserActivities;
|
||||||
using Windows.Data.Json;
|
|
||||||
using Windows.Foundation;
|
using Windows.Foundation;
|
||||||
using Windows.Graphics.Display;
|
using Windows.Graphics.Display;
|
||||||
using Windows.Storage;
|
using Windows.Storage;
|
||||||
|
@ -18,6 +17,7 @@ using Microsoft.UI.Xaml.Controls;
|
||||||
|
|
||||||
using CalculatorApp.Common;
|
using CalculatorApp.Common;
|
||||||
using CalculatorApp.Converters;
|
using CalculatorApp.Converters;
|
||||||
|
using CalculatorApp.JsonUtils;
|
||||||
using CalculatorApp.ViewModel;
|
using CalculatorApp.ViewModel;
|
||||||
using CalculatorApp.ViewModel.Common;
|
using CalculatorApp.ViewModel.Common;
|
||||||
using CalculatorApp.ViewModel.Common.Automation;
|
using CalculatorApp.ViewModel.Common.Automation;
|
||||||
|
@ -77,11 +77,8 @@ namespace CalculatorApp
|
||||||
string embeddedData;
|
string embeddedData;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
var json = JsonSerializer.Serialize(new SerdeUtils.ApplicationSnapshotAlias { Value = Model.Snapshot });
|
var json = JsonSerializer.Serialize(new ApplicationSnapshotAlias { Value = Model.Snapshot });
|
||||||
var json2 = JsonSerializer.Serialize(Model.Snapshot);
|
|
||||||
embeddedData = Convert.ToBase64String(Compress(json));
|
embeddedData = Convert.ToBase64String(Compress(json));
|
||||||
var e2 = Convert.ToBase64String(Compress(json2));
|
|
||||||
var diff = embeddedData.Length - e2.Length;
|
|
||||||
}
|
}
|
||||||
catch (Exception)
|
catch (Exception)
|
||||||
{
|
{
|
||||||
|
@ -734,28 +731,6 @@ namespace CalculatorApp
|
||||||
}
|
}
|
||||||
return compressed.ToArray();
|
return compressed.ToArray();
|
||||||
}
|
}
|
||||||
|
|
||||||
//encodedSnapshot = null;
|
|
||||||
//try
|
|
||||||
//{
|
|
||||||
// var rawJson = Encoding.UTF8.GetBytes(JsonSerializer.Serialize(new SerdeUtils.ApplicationSnapshotAlias { Value = Model.Snapshot }));
|
|
||||||
// using (var compressed = new MemoryStream())
|
|
||||||
// {
|
|
||||||
// using (var deflater = new DeflateStream(compressed, CompressionLevel.Optimal, true))
|
|
||||||
// {
|
|
||||||
// deflater.Write(rawJson, 0, rawJson.Length);
|
|
||||||
// }
|
|
||||||
// byte[] data;
|
|
||||||
// compressed.Read(data, 0, );
|
|
||||||
// Convert.ToBase64String(compressed.GetBuffer());
|
|
||||||
// }
|
|
||||||
//}
|
|
||||||
//catch (Exception)
|
|
||||||
//{
|
|
||||||
// // TODO: trace errors
|
|
||||||
// return false;
|
|
||||||
//}
|
|
||||||
//return true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private Calculator m_calculator;
|
private Calculator m_calculator;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue