mirror of
https://github.com/Microsoft/calculator.git
synced 2025-08-22 06:13:14 -07:00
Use general format in Graphing Calculator share
This commit is contained in:
parent
441bf39c0b
commit
89ede714ab
3 changed files with 1 additions and 10 deletions
|
@ -239,13 +239,6 @@ String^ CalculatorApp::ViewModel::Common::Utilities::EscapeHtmlSpecialCharacters
|
||||||
return replaceCharacters ? replacementString : originalString;
|
return replaceCharacters ? replacementString : originalString;
|
||||||
}
|
}
|
||||||
|
|
||||||
Platform::String^ CalculatorApp::ViewModel::Common::Utilities::TrimTrailingZeros(Platform::String^ input)
|
|
||||||
{
|
|
||||||
std::wstring tmp(input->Data());
|
|
||||||
CalcManager::NumberFormattingUtils::TrimTrailingZeros(tmp);
|
|
||||||
return ref new Platform::String(tmp.c_str());
|
|
||||||
}
|
|
||||||
|
|
||||||
bool CalculatorApp::ViewModel::Common::Utilities::AreColorsEqual(Windows::UI::Color color1, Windows::UI::Color color2)
|
bool CalculatorApp::ViewModel::Common::Utilities::AreColorsEqual(Windows::UI::Color color1, Windows::UI::Color color2)
|
||||||
{
|
{
|
||||||
return Utils::AreColorsEqual(color1, color2);
|
return Utils::AreColorsEqual(color1, color2);
|
||||||
|
|
|
@ -713,7 +713,6 @@ namespace CalculatorApp
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
static Platform::String ^ EscapeHtmlSpecialCharacters(Platform::String ^ originalString);
|
static Platform::String ^ EscapeHtmlSpecialCharacters(Platform::String ^ originalString);
|
||||||
static Platform::String^ TrimTrailingZeros(Platform::String^ input);
|
|
||||||
static bool AreColorsEqual(Windows::UI::Color color1, Windows::UI::Color color2);
|
static bool AreColorsEqual(Windows::UI::Color color1, Windows::UI::Color color2);
|
||||||
static Windows::UI::Xaml::Media::SolidColorBrush ^ GetContrastColor(Windows::UI::Color backgroundColor);
|
static Windows::UI::Xaml::Media::SolidColorBrush ^ GetContrastColor(Windows::UI::Color backgroundColor);
|
||||||
static int GetWindowId();
|
static int GetWindowId();
|
||||||
|
|
|
@ -467,8 +467,7 @@ namespace CalculatorApp
|
||||||
var value = variables[i].Value;
|
var value = variables[i].Value;
|
||||||
|
|
||||||
rawHtml += name + "=";
|
rawHtml += name + "=";
|
||||||
var formattedValue = value.ToString("R");
|
var formattedValue = value.ToString();
|
||||||
formattedValue = Utilities.TrimTrailingZeros(formattedValue);
|
|
||||||
rawHtml += formattedValue;
|
rawHtml += formattedValue;
|
||||||
|
|
||||||
if (variables.Count - 1 != i)
|
if (variables.Count - 1 != i)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue