Modify how Calculator manages the visibility of the History button (#712)

* Modify how Calculator manages the History button + code cleaning

* remove extra include
This commit is contained in:
Rudy Huyn 2019-11-05 15:04:28 -08:00 committed by Pepe Rivera
commit e38e911bfa
9 changed files with 41 additions and 105 deletions

View file

@ -12,7 +12,6 @@
#include "CalcViewModel/Common/Automation/NarratorNotifier.h"
#include "CalcViewModel/Common/AppResourceProvider.h"
#include "CalcViewModel/Common/LocalizationSettings.h"
#include "CalcViewModel/ViewState.h"
#include "Views/MainPage.xaml.h"
using namespace CalculatorApp;
@ -94,26 +93,6 @@ bool App::IsAnimationEnabled()
return App::m_isAnimationEnabled;
}
/// <summary>
/// Return the current application view state. The value
/// will match one of the constants in the ViewState namespace.
/// </summary>
String ^ App::GetAppViewState()
{
String ^ newViewState;
CoreWindow ^ window = CoreWindow::GetForCurrentThread();
if ((window->Bounds.Width >= 560) && (window->Bounds.Height >= 356))
{
newViewState = ViewState::DockedView;
}
else
{
newViewState = ViewState::Snap;
}
return newViewState;
}
void App::AddWindowToMap(_In_ WindowFrameService ^ frameService)
{
reader_writer_lock::scoped_lock lock(m_windowsMapLock);
@ -468,10 +447,5 @@ void App::DismissedEventHandler(SplashScreen ^ sender, Object ^ e)
SetupJumpList();
}
float App::GetAppWindowHeight()
{
CoreWindow ^ window = CoreWindow::GetForCurrentThread();
return window->Bounds.Height;
}